61 TYPE(t_region
) :: region
64 INTEGER :: ipatch, icont,
i,
j,
k
67 CHARACTER(CHRLEN) :: rcsidentstring
69 INTEGER :: bctype, distrib, i2dvals,
ibeg, icoff,
idir,
iend, &
70 ijcoff, ijnoff, ijkc, ijkd, ijkn, ilev,
inode, inoff, &
72 knode, lbound, n1, n2, ncont, noff, npatches
73 INTEGER,
POINTER,
DIMENSION(:) :: pcvtilemass
75 REAL(RFREAL) :: area, heatcapsum, injcvelratio, massfluxsum, mrate, &
76 rhomixtbcond, tburn, tiletemp, tilevelnrm
77 REAL(RFREAL),
POINTER,
DIMENSION(:) :: injcmassfluxratio, specheat
78 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: prhs, sface, vals
80 TYPE(t_patch),
POINTER :: ppatch
86 rcsidentstring =
'$RCSfile: PLAG_InjcTileCalcRhs.F90,v $ $Revision: 1.4 $'
88 global => region%global
91 'PLAG_InjcTileCalcRhs.F90' )
95 ilev = region%currLevel
96 npatches = region%nPatches
98 ncont = region%plagInput%nCont
99 injcvelratio = region%plagInput%injcVelRatio
101 injcmassfluxratio => region%plagInput%injcMassFluxRatio
102 specheat => region%plagInput%spht
108 ppatch => region%levels(ilev)%patches(ipatch)
110 bctype = ppatch%bcType
114 IF (bctype>=bc_injection .AND. bctype<=bc_injection+bc_range)
THEN
118 lbound = ppatch%lbound
126 noff = abs(ppatch%l1end-ppatch%l1beg) + 1
127 distrib = ppatch%mixt%distrib
129 vals => ppatch%mixt%vals
136 IF (lbound==2 .OR. lbound==4 .OR. lbound==6)
THEN
144 IF (lbound==1 .OR. lbound==2) sface => region%levels(ilev)%plag%si
145 IF (lbound==3 .OR. lbound==4) sface => region%levels(ilev)%plag%sj
146 IF (lbound==5 .OR. lbound==6) sface => region%levels(ilev)%plag%sk
153 ijkc = indijk(
i,
j,
k,icoff,ijcoff)
156 area =
sqrt(sface(xcoord,ijkn)*sface(xcoord,ijkn)+ &
157 sface(ycoord,ijkn)*sface(ycoord,ijkn)+ &
158 sface(zcoord,ijkn)*sface(zcoord,ijkn))
160 IF (lbound==1 .OR. lbound==2)
THEN
163 ELSE IF (lbound==3 .OR. lbound==4)
THEN
166 ELSE IF (lbound==5 .OR. lbound==6)
THEN
171 i2dvals = distrib * indij(n1-1,n2-1,noff)
172 mrate = vals(bcdat_inject_mfrate,i2dvals)
173 tburn = vals(bcdat_inject_temp ,i2dvals)
178 rhomixtbcond = 0.5_rfreal * &
179 (region%levels(ilev)%mixt%cv(cv_mixt_dens,ijkc) + &
180 region%levels(ilev)%mixt%cv(cv_mixt_dens,ijkd) )
184 itile = indij(n1,n2,noff)
185 ptileplag => ppatch%tilePlag
187 prhs => ptileplag%rhs
188 pcvtilemass => ptileplag%cvTileMass
190 massfluxsum =
sum( mrate * injcmassfluxratio(:) )
192 injcmassfluxratio(:) )
195 tilevelnrm = injcvelratio * mrate / rhomixtbcond
198 prhs(pcvtilemass(icont),itile) = -area *mrate * &
199 injcmassfluxratio(icont)
202 prhs(cv_tile_momnrm,itile) = -area *massfluxsum *tilevelnrm
204 prhs(cv_tile_ener ,itile) = -area * &
205 ( 0.5_rfreal*massfluxsum*tilevelnrm**2 &
206 + heatcapsum *tiletemp )
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ibeg
subroutine plag_injctilecalcrhs(region)
Tfloat sum() const
Return the sum of all the pixel values in an image.
subroutine rflo_getpatchdirection(patch, idir, jdir, kdir)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE inode
subroutine registerfunction(global, funName, fileName)
subroutine rflo_getpatchindices(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdir
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idir
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode jend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kdir
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode jbeg
long double dot_product(pnt vec1, pnt vec2)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode kbeg
subroutine deregisterfunction(global)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jnode