66 TYPE(t_region
) :: region
70 INTEGER ::
i,
j,
k, n1, n2
73 INTEGER :: ilev, lbound, bctype, distrib, flowmodel, bcopt
75 INTEGER :: icoff, ijcoff, inoff, ijnoff, ijkcd, ijkcb0, ijkcb1, ijknb
77 INTEGER :: idbeg, idend, jdbeg, jdend, kdbeg, kdend, i2d, noff
79 REAL(RFREAL) :: sgn, gfaca, flima, coefa, tempa, tburn, twall, mrate
80 REAL(RFREAL) :: stboltz, rati, beta, qrx, qry, qrz, fr, modsf, sf(3)
81 REAL(RFREAL),
POINTER ::
rhs(:,:), sface(:,:), vals(:,:), grad(:,:)
82 REAL(RFREAL),
POINTER :: rdv(:,:), coef(:,:), gofact(:), flim(:), qr(:)
83 REAL(RFREAL),
POINTER :: wvint(:,:)
88 'RADI_DiffRadFluxPatch.F90' )
92 ilev = region%currLevel
100 bctype =
patch%bcType
102 distrib =
patch%mixt%distrib
103 flowmodel = region%mixtInput%flowModel
105 rhs => region%levels(ilev)%mixt%rhs
106 vals =>
patch%mixt%vals
107 rdv => region%levels(ilev)%radi%dv
108 flim => region%levels(ilev)%radi%fluxLim
109 coef => region%levels(ilev)%radi%radCoef
110 gofact=> region%levels(ilev)%radi%goFact
111 wvint => region%levels(ilev)%radi%wvInt
119 IF (lbound==2 .OR. lbound==4 .OR. lbound==6)
THEN
128 IF (lbound==1 .OR. lbound==2)
THEN
129 sface => region%levels(ilev)%grid%si
130 grad => region%levels(ilev)%mixt%gradi
131 qr => region%levels(ilev)%radi%qri
132 ELSE IF (lbound==3 .OR. lbound==4)
THEN
133 sface => region%levels(ilev)%grid%sj
134 grad => region%levels(ilev)%mixt%gradj
135 qr => region%levels(ilev)%radi%qrj
136 ELSE IF (lbound==5 .OR. lbound==6)
THEN
137 sface => region%levels(ilev)%grid%sk
138 grad => region%levels(ilev)%mixt%gradk
139 qr => region%levels(ilev)%radi%qrk
144 stboltz = region%radiInput%stBoltz
146 beta = region%mixtInput%betrk(region%irkStep)
151 IF (bctype>=bc_slipwall .AND. bctype<=bc_slipwall+bc_range)
THEN
156 ijkcb0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
160 gfaca = gofact(ijkcb0)
161 flima = 0.5_rfreal*(3._rfreal*flim(ijkcb0)-flim(ijkcb1))
162 tempa = 0.5_rfreal*(3._rfreal*rdv(dv_radi_teff,ijkcb0)- &
163 rdv(dv_radi_teff,ijkcb1))
164 coefa = 0.5_rfreal*(3._rfreal*coef(ijkcb0,radi_coeff_extinct)- &
165 coef(ijkcb1,radi_coeff_extinct))
167 coefa = gfaca*rati*flima*stboltz*tempa**3/coefa
169 qrx = coefa*grad(gr_mixt_tx,ijknb)
170 qry = coefa*grad(gr_mixt_ty,ijknb)
171 qrz = coefa*grad(gr_mixt_tz,ijknb)
173 sf(1) = sgn*sface(xcoord,ijknb)
174 sf(2) = sgn*sface(ycoord,ijknb)
175 sf(3) = sgn*sface(zcoord,ijknb)
177 fr = qrx*sf(1) + qry*sf(2) + qrz*sf(3)
179 rhs(cv_mixt_ener,ijkcb0) =
rhs(cv_mixt_ener,ijkcb0) - fr*beta
182 modsf =
sqrt( sf(1)*sf(1) + sf(2)*sf(2) + sf(3)*sf(3) )
183 qr(ijknb) = -sgn*fr/modsf
190 ELSE IF (bctype>=bc_noslipwall .AND. bctype<=bc_noslipwall+bc_range)
THEN
192 bcopt =
patch%mixt%switches(bcswi_noslip_adiabat)
197 ijkcb0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
201 IF (bcopt == bcopt_adiabat)
THEN
202 tempa = rdv(dv_radi_teff,ijkcb0)
206 IF (lbound==1 .OR. lbound==2)
THEN
209 ELSE IF (lbound==3 .OR. lbound==4)
THEN
212 ELSE IF (lbound==5 .OR. lbound==6)
THEN
216 i2d = distrib * indij(n1,n2,noff)
217 twall = vals(bcdat_noslip_twall,i2d)
221 gfaca = gofact(ijkcb0)
223 coefa = coef(ijkcb0,radi_coeff_extinct)
224 coefa = gfaca*rati*flima*stboltz*tempa**3/coefa
226 qrx = coefa*grad(gr_mixt_tx,ijknb)
227 qry = coefa*grad(gr_mixt_ty,ijknb)
228 qrz = coefa*grad(gr_mixt_tz,ijknb)
230 sf(1) = sgn*sface(xcoord,ijknb)
231 sf(2) = sgn*sface(ycoord,ijknb)
232 sf(3) = sgn*sface(zcoord,ijknb)
234 fr = qrx*sf(1) + qry*sf(2) + qrz*sf(3)
236 rhs(cv_mixt_ener,ijkcb0) =
rhs(cv_mixt_ener,ijkcb0) - fr*beta
239 modsf =
sqrt( sf(1)*sf(1) + sf(2)*sf(2) + sf(3)*sf(3) )
240 qr(ijknb) = -sgn*fr/modsf
247 ELSE IF (bctype>=bc_injection .AND. bctype<=bc_injection+bc_range)
THEN
253 ijkcb0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
257 IF (lbound==1 .OR. lbound==2)
THEN
260 ELSE IF (lbound==3 .OR. lbound==4)
THEN
263 ELSE IF (lbound==5 .OR. lbound==6)
THEN
267 i2d = distrib * indij(n1,n2,noff)
268 mrate = vals(bcdat_inject_mfrate,i2d)
269 tburn = vals(bcdat_inject_temp ,i2d)
270 gfaca = gofact(ijkcb0)
272 IF (mrate > 0._rfreal)
THEN
275 coefa = coef(ijkcb0,radi_coeff_extinct)
278 IF (flowmodel == flow_euler)
THEN
279 flima = 0.5_rfreal*(3._rfreal*flim(ijkcb0)-flim(ijkcb1))
280 tempa = 0.5_rfreal*(3._rfreal*rdv(dv_radi_teff,ijkcb0)- &
281 rdv(dv_radi_teff,ijkcb1))
282 coefa = 0.5_rfreal*(3._rfreal*coef(ijkcb0,radi_coeff_extinct)- &
283 coef(ijkcb1,radi_coeff_extinct))
287 tempa = rdv(dv_radi_teff,ijkcb0)
288 coefa = coef(ijkcb0,radi_coeff_extinct)
292 coefa = gfaca*rati*flima*stboltz*tempa**3/coefa
294 qrx = coefa*grad(gr_mixt_tx,ijknb)
295 qry = coefa*grad(gr_mixt_ty,ijknb)
296 qrz = coefa*grad(gr_mixt_tz,ijknb)
298 sf(1) = sgn*sface(xcoord,ijknb)
299 sf(2) = sgn*sface(ycoord,ijknb)
300 sf(3) = sgn*sface(zcoord,ijknb)
302 fr = qrx*sf(1) + qry*sf(2) + qrz*sf(3)
304 rhs(cv_mixt_ener,ijkcb0) =
rhs(cv_mixt_ener,ijkcb0) - fr*beta
307 modsf =
sqrt( sf(1)*sf(1) + sf(2)*sf(2) + sf(3)*sf(3) )
308 qr(ijknb) = -sgn*fr/modsf
315 ELSE IF (bctype>=bc_regionint .AND. bctype<=bc_regionint +bc_range)
THEN
317 ELSE IF (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range)
THEN
326 ijkcb0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
330 gfaca = 0.5_rfreal*(gofact(ijkcb0)+gofact(ijkcd))
331 flima = 0.5_rfreal*(flim(ijkcb0)+flim(ijkcd))
332 tempa = 0.5_rfreal*(rdv(dv_radi_teff,ijkcb0) + &
333 rdv(dv_radi_teff,ijkcd))
334 coefa = 0.5_rfreal*(coef(ijkcb0,radi_coeff_extinct) + &
335 coef(ijkcd ,radi_coeff_extinct))
337 coefa = gfaca*rati*flima*stboltz*tempa**3/coefa
339 qrx = coefa*grad(gr_mixt_tx,ijknb)
340 qry = coefa*grad(gr_mixt_ty,ijknb)
341 qrz = coefa*grad(gr_mixt_tz,ijknb)
343 sf(1) = sgn*sface(xcoord,ijknb)
344 sf(2) = sgn*sface(ycoord,ijknb)
345 sf(3) = sgn*sface(zcoord,ijknb)
347 fr = qrx*sf(1) + qry*sf(2) + qrz*sf(3)
349 rhs(cv_mixt_ener,ijkcb0) =
rhs(cv_mixt_ener,ijkcb0) - fr*beta
352 modsf =
sqrt( sf(1)*sf(1) + sf(2)*sf(2) + sf(3)*sf(3) )
353 qr(ijknb) = -sgn*fr/modsf
362 IF (lbound==1 .OR. lbound==2)
THEN
363 idbeg =
ibeg -
idir*region%nDumCells
364 idend =
iend -
idir*region%nDumCells
365 jdbeg =
jbeg - region%nDumCells
366 jdend =
jend + region%nDumCells
367 kdbeg =
kbeg - region%nDumCells
368 kdend = kend + region%nDumCells
370 ELSE IF (lbound==3 .OR. lbound==4)
THEN
371 jdbeg =
jbeg -
jdir*region%nDumCells
372 jdend =
jend -
jdir*region%nDumCells
373 idbeg =
ibeg - region%nDumCells
374 idend =
iend + region%nDumCells
375 kdbeg =
kbeg - region%nDumCells
376 kdend = kend + region%nDumCells
378 ELSE IF (lbound==5 .OR. lbound==6)
THEN
379 kdbeg =
kbeg -
kdir*region%nDumCells
380 kdend = kend -
kdir*region%nDumCells
381 jdbeg =
jbeg - region%nDumCells
382 jdend =
jend + region%nDumCells
383 idbeg =
ibeg - region%nDumCells
384 idend =
iend + region%nDumCells
390 ijkcb0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
393 wvint(xcoord,ijkcb0) = wvint(xcoord,ijkcb0) + grad(gr_mixt_tx,ijknb)
394 wvint(ycoord,ijkcb0) = wvint(ycoord,ijkcb0) + grad(gr_mixt_ty,ijknb)
395 wvint(zcoord,ijkcb0) = wvint(zcoord,ijkcb0) + grad(gr_mixt_tz,ijknb)
**********************************************************************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 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
**********************************************************************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
subroutine radi_diffradfluxpatch(region, patch)