60 TYPE(t_region
) :: region
64 INTEGER ::
i,
j,
k, n1, n2
67 INTEGER :: ilev, lbound, bctype, distrib, flowmodel, gasmodel, indcp, indmol
68 INTEGER ::
ibeg,
iend,
jbeg,
jend,
kbeg, kend,
idir,
jdir,
kdir, i2d, noff
69 INTEGER :: icoff, ijcoff, ijkcd, ijkcd1, ijkcd2, ijkcb0, ijkcb1, ijknb
70 INTEGER :: inoff, ijnoff,
inode,
jnode, knode, indsvel, spaceorder
72 REAL(RFREAL) :: sgn, rhoa, rhoua, rhova, rhowa, rhoea, rhovrel(3), pa, &
73 mrate, tburn, rgas, ds, sv, limfac, limfac3, rvolref, &
74 eps2n, uinj, vinj, winj, vcont, rhl, rhr, qsl, qsr, vola, &
75 gam, ggm1, rl, rr, ul, ur, vl, vr, wl, wr, pl, pr, &
76 hl, hr, qsrl, qsrr, eps2(3), dvar(4), dvarm(4), dvarp(4), &
77 deltl(4), deltr(4), sf(3)
78 REAL(RFREAL) :: rnutila
79 REAL(RFREAL),
POINTER :: cv(:,:), dv(:,:), gv(:,:), vol(:)
80 REAL(RFREAL),
POINTER :: tcv(:,:), trhs(:,:), sface(:,:), svel(:), vals(:,:)
83 REAL(RFREAL) :: muscl3, af, bf, eps
88 muscl3(af,bf,eps) = (bf*(2._rfreal*af*af+eps)+af*(bf*bf+2._rfreal*eps))/ &
89 (2._rfreal*af*af+2._rfreal*bf*bf-af*bf+ &
90 3._rfreal*eps+1.e-30_rfreal)
93 'TURB_floRansSARoeFluxPatch.F90' )
97 ilev = region%currLevel
105 bctype =
patch%bcType
107 distrib =
patch%mixt%distrib
108 flowmodel = region%mixtInput%flowModel
109 gasmodel = region%mixtInput%gasModel
110 spaceorder = discr_order_1
111 indcp = region%levels(ilev)%mixt%indCp
112 indmol = region%levels(ilev)%mixt%indMol
113 indsvel = region%levels(ilev)%grid%indSvel
114 limfac = region%mixtInput%limFac
116 cv => region%levels(ilev)%mixt%cv
117 dv => region%levels(ilev)%mixt%dv
118 gv => region%levels(ilev)%mixt%gv
119 vol => region%levels(ilev)%grid%vol
120 tcv => region%levels(ilev)%turb%cv
121 trhs => region%levels(ilev)%turb%rhs
122 vals =>
patch%mixt%vals
130 IF (lbound==2 .OR. lbound==4 .OR. lbound==6)
THEN
139 IF (lbound==1 .OR. lbound==2)
THEN
140 sface => region%levels(ilev)%grid%si
141 svel => region%levels(ilev)%grid%siVel
142 ELSE IF (lbound==3 .OR. lbound==4)
THEN
143 sface => region%levels(ilev)%grid%sj
144 svel => region%levels(ilev)%grid%sjVel
145 ELSE IF (lbound==5 .OR. lbound==6)
THEN
146 sface => region%levels(ilev)%grid%sk
147 svel => region%levels(ilev)%grid%skVel
152 limfac3 = limfac*limfac*limfac
153 rvolref = 1._rfreal/region%global%limVolRef**1.5_rfreal
154 eps2(1) = limfac3*region%global%limRef(1)*region%global%limRef(1)*rvolref
155 eps2(2) = limfac3*region%global%limRef(2)*region%global%limRef(2)*rvolref
156 eps2(3) = limfac3*region%global%limRef(3)*region%global%limRef(3)*rvolref
160 IF (bctype>=bc_slipwall .AND. bctype<=bc_slipwall+bc_range)
THEN
162 ELSE IF (bctype>=bc_noslipwall .AND. bctype<=bc_noslipwall+bc_range)
THEN
164 ELSE IF (bctype>=bc_symmetry .AND. bctype<=bc_symmetry+bc_range)
THEN
166 ELSE IF (bctype>=bc_injection .AND. bctype<=bc_injection+bc_range)
THEN
173 ijkcb0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
176 sf(1) = sgn*sface(xcoord,ijknb)
177 sf(2) = sgn*sface(ycoord,ijknb)
178 sf(3) = sgn*sface(zcoord,ijknb)
179 sv = sgn*svel(ijknb*indsvel)
181 IF (lbound==1 .OR. lbound==2)
THEN
184 ELSE IF (lbound==3 .OR. lbound==4)
THEN
187 ELSE IF (lbound==5 .OR. lbound==6)
THEN
191 i2d = distrib * indij(n1,n2,noff)
192 mrate = vals(bcdat_inject_mfrate,i2d)
193 tburn = vals(bcdat_inject_temp ,i2d)
194 rhovrel(1) = vals(bcdat_inject_rfvfu ,i2d)
195 rhovrel(2) = vals(bcdat_inject_rfvfv ,i2d)
196 rhovrel(3) = vals(bcdat_inject_rfvfw ,i2d)
198 IF (mrate > 0._rfreal)
THEN
201 rnutila = 0.5_rfreal*(3._rfreal*tcv(cv_sa_nutil,ijkcb0)- &
202 tcv(cv_sa_nutil,ijkcb1))
203 ds =
sqrt(sf(1)*sf(1)+sf(2)*sf(2)+sf(3)*sf(3))
205 IF (gasmodel == gas_model_tcperf)
THEN
207 sf(1)/ds,sf(2)/ds,sf(3)/ds, &
208 gv(gv_mixt_cp ,ijkcb0*indcp ), &
209 gv(gv_mixt_mol ,ijkcb0*indmol), &
210 dv(dv_mixt_pres,ijkcb0 ), &
211 rhoa,rhoua,rhova,rhowa,rhoea,pa, &
214 CALL
errorstop( region%global,err_unknown_bc,__line__ )
216 vcont = uinj*sf(1) + vinj*sf(2) + winj*sf(3)
223 trhs(cv_sa_nutil,ijkcb0) = trhs(cv_sa_nutil,ijkcb0) + &
231 ELSE IF (bctype>=bc_regionint .AND. bctype<=bc_regionint +bc_range)
THEN
233 ELSE IF (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range)
THEN
239 IF (spaceorder == discr_order_1)
THEN
243 ijkcb0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
246 sf(1) = sgn*sface(xcoord,ijknb)
247 sf(2) = sgn*sface(ycoord,ijknb)
248 sf(3) = sgn*sface(zcoord,ijknb)
249 sv = sgn*svel(ijknb*indsvel)
251 qsl = dv(dv_mixt_uvel,ijkcd)*sf(1) + &
252 dv(dv_mixt_vvel,ijkcd)*sf(2) + &
253 dv(dv_mixt_wvel,ijkcd)*sf(3) - sv
254 qsr = dv(dv_mixt_uvel,ijkcb0)*sf(1) + &
255 dv(dv_mixt_vvel,ijkcb0)*sf(2) + &
256 dv(dv_mixt_wvel,ijkcb0)*sf(3) - sv
257 trhs(cv_sa_nutil,ijkcb0) = trhs(cv_sa_nutil,ijkcb0) + &
258 0.5_rfreal*(qsl*tcv(cv_sa_nutil,ijkcd)+ &
259 qsr*tcv(cv_sa_nutil,ijkcb0))
263 ELSE IF (spaceorder == discr_order_2)
THEN
267 ijkcb0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
272 sf(1) = sgn*sface(xcoord,ijknb)
273 sf(2) = sgn*sface(ycoord,ijknb)
274 sf(3) = sgn*sface(zcoord,ijknb)
275 sv = sgn*svel(ijknb*indsvel)
276 vola = (0.5_rfreal*(vol(ijkcb0)+vol(ijkcd1)))**1.5_rfreal
278 dvar(1) = tcv(cv_sa_nutil,ijkcb0) - tcv(cv_sa_nutil,ijkcd1)
279 dvar(2) = dv(dv_mixt_uvel,ijkcb0) - dv(dv_mixt_uvel,ijkcd1)
280 dvar(3) = dv(dv_mixt_vvel,ijkcb0) - dv(dv_mixt_vvel,ijkcd1)
281 dvar(4) = dv(dv_mixt_wvel,ijkcb0) - dv(dv_mixt_wvel,ijkcd1)
283 dvarm(1) = tcv(cv_sa_nutil,ijkcd1) - tcv(cv_sa_nutil,ijkcd2)
284 dvarm(2) = dv(dv_mixt_uvel,ijkcd1) - dv(dv_mixt_uvel,ijkcd2)
285 dvarm(3) = dv(dv_mixt_vvel,ijkcd1) - dv(dv_mixt_vvel,ijkcd2)
286 dvarm(4) = dv(dv_mixt_wvel,ijkcd1) - dv(dv_mixt_wvel,ijkcd2)
288 dvarp(1) = tcv(cv_sa_nutil,ijkcb1) - tcv(cv_sa_nutil,ijkcb0)
289 dvarp(2) = dv(dv_mixt_uvel,ijkcb1) - dv(dv_mixt_uvel,ijkcb0)
290 dvarp(3) = dv(dv_mixt_vvel,ijkcb1) - dv(dv_mixt_vvel,ijkcb0)
291 dvarp(4) = dv(dv_mixt_wvel,ijkcb1) - dv(dv_mixt_wvel,ijkcb0)
294 deltl(1) = 0.5_rfreal*muscl3(dvar(1) ,dvarm(1),eps2n)
295 deltr(1) = 0.5_rfreal*muscl3(dvarp(1),dvar(1) ,eps2n)
297 deltl(2) = 0.5_rfreal*muscl3(dvar(2) ,dvarm(2),eps2n)
298 deltr(2) = 0.5_rfreal*muscl3(dvarp(2),dvar(2) ,eps2n)
299 deltl(3) = 0.5_rfreal*muscl3(dvar(3) ,dvarm(3),eps2n)
300 deltr(3) = 0.5_rfreal*muscl3(dvarp(3),dvar(3) ,eps2n)
301 deltl(4) = 0.5_rfreal*muscl3(dvar(4) ,dvarm(4),eps2n)
302 deltr(4) = 0.5_rfreal*muscl3(dvarp(4),dvar(4) ,eps2n)
304 rl = tcv(cv_sa_nutil,ijkcd1) + deltl(1)
305 ul = dv(dv_mixt_uvel,ijkcd1) + deltl(2)
306 vl = dv(dv_mixt_vvel,ijkcd1) + deltl(3)
307 wl = dv(dv_mixt_wvel,ijkcd1) + deltl(4)
308 qsrl = (ul*sf(1)+vl*sf(2)+ wl*sf(3)-sv)*rl
310 rr = tcv(cv_sa_nutil,ijkcb0) - deltr(1)
311 ur = dv(dv_mixt_uvel,ijkcb0) - deltr(2)
312 vr = dv(dv_mixt_vvel,ijkcb0) - deltr(3)
313 wr = dv(dv_mixt_wvel,ijkcb0) - deltr(4)
314 qsrr = (ur*sf(1)+vr*sf(2)+wr*sf(3)-sv)*rr
316 trhs(cv_sa_nutil,ijkcb0) = trhs(cv_sa_nutil,ijkcb0) + &
317 0.5_rfreal*(qsrl +qsrr )
**********************************************************************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)
subroutine bcondinjectionperf(distrib, minj, tinj, rhoVrel, sxn, syn, szn, cpgas, mm, p, rhob, rhoub, rhovb, rhowb, rhoeb, pb, uinj, vinj, winj)
**********************************************************************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)
subroutine turb_floranssaroefluxpatch(region, patch)
**********************************************************************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
subroutine errorstop(global, errorCode, errorLine, addMessage)
**********************************************************************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