58 TYPE(t_region
) :: region
61 INTEGER ::
i,
j,
k, ipatch
65 INTEGER :: icoff, ijcoff, inoff, ijnoff, ijkc0, ijkc1, ijkc2, ijkc3, ijkn
68 REAL(RFREAL) :: limfac, limfac3, rvolref, vola, eps2(3), dvar(4), dvarm(4), &
69 dvarp(4), qsl, qsr, deltl(4), deltr(4), fc, eps2n, &
70 rl, rr, ul, ur, vl, vr, wl, wr, qsrl, qsrr
71 REAL(RFREAL),
POINTER :: dv(:,:), si(:,:), sj(:,:), sk(:,:), vol(:)
72 REAL(RFREAL),
POINTER :: tcv(:,:), trhs(:,:), sivel(:), sjvel(:), skvel(:)
75 REAL(RFREAL) :: muscl3, af, bf, eps
80 muscl3(af,bf,eps) = (bf*(2._rfreal*af*af+eps)+af*(bf*bf+2._rfreal*eps))/ &
81 (2._rfreal*af*af+2._rfreal*bf*bf-af*bf+ &
82 3._rfreal*eps+1.e-30_rfreal)
85 'TURB_floRansSARoe2ndFlux.F90' )
89 ilev = region%currLevel
96 dv => region%levels(ilev)%mixt%dv
97 tcv => region%levels(ilev)%turb%cv
98 trhs => region%levels(ilev)%turb%rhs
99 vol => region%levels(ilev)%grid%vol
100 si => region%levels(ilev)%grid%si
101 sj => region%levels(ilev)%grid%sj
102 sk => region%levels(ilev)%grid%sk
103 sivel => region%levels(ilev)%grid%siVel
104 sjvel => region%levels(ilev)%grid%sjVel
105 skvel => region%levels(ilev)%grid%skVel
106 indsvel = region%levels(ilev)%grid%indSvel
107 limfac = region%mixtInput%limFac
111 limfac3 = limfac*limfac*limfac
112 rvolref = 1._rfreal/region%global%limVolRef**1.5_rfreal
113 eps2(1) = limfac3*region%global%limRef(1)*region%global%limRef(1)*rvolref
114 eps2(2) = limfac3*region%global%limRef(2)*region%global%limRef(2)*rvolref
115 eps2(3) = limfac3*region%global%limRef(3)*region%global%limRef(3)*rvolref
122 ijkc0 = indijk(
i ,
j,
k,icoff,ijcoff)
123 ijkc1 = indijk(
i-1,
j,
k,icoff,ijcoff)
124 ijkc2 = indijk(
i-2,
j,
k,icoff,ijcoff)
125 ijkc3 = indijk(
i+1,
j,
k,icoff,ijcoff)
126 ijkn = indijk(
i ,
j,
k,inoff,ijnoff)
128 vola = (0.5_rfreal*(vol(ijkc0)+vol(ijkc1)))**1.5_rfreal
132 dvar(1) = tcv(cv_sa_nutil,ijkc0) - tcv(cv_sa_nutil,ijkc1)
133 dvar(2) = dv(dv_mixt_uvel,ijkc0) - dv(dv_mixt_uvel,ijkc1)
134 dvar(3) = dv(dv_mixt_vvel,ijkc0) - dv(dv_mixt_vvel,ijkc1)
135 dvar(4) = dv(dv_mixt_wvel,ijkc0) - dv(dv_mixt_wvel,ijkc1)
137 dvarm(1) = tcv(cv_sa_nutil,ijkc1) - tcv(cv_sa_nutil,ijkc2)
138 dvarm(2) = dv(dv_mixt_uvel,ijkc1) - dv(dv_mixt_uvel,ijkc2)
139 dvarm(3) = dv(dv_mixt_vvel,ijkc1) - dv(dv_mixt_vvel,ijkc2)
140 dvarm(4) = dv(dv_mixt_wvel,ijkc1) - dv(dv_mixt_wvel,ijkc2)
142 dvarp(1) = tcv(cv_sa_nutil,ijkc3) - tcv(cv_sa_nutil,ijkc0)
143 dvarp(2) = dv(dv_mixt_uvel,ijkc3) - dv(dv_mixt_uvel,ijkc0)
144 dvarp(3) = dv(dv_mixt_vvel,ijkc3) - dv(dv_mixt_vvel,ijkc0)
145 dvarp(4) = dv(dv_mixt_wvel,ijkc3) - dv(dv_mixt_wvel,ijkc0)
148 deltl(1) = 0.5_rfreal*muscl3(dvar(1) ,dvarm(1),eps2n)
149 deltr(1) = 0.5_rfreal*muscl3(dvarp(1),dvar(1) ,eps2n)
151 deltl(2) = 0.5_rfreal*muscl3(dvar(2) ,dvarm(2),eps2n)
152 deltr(2) = 0.5_rfreal*muscl3(dvarp(2),dvar(2) ,eps2n)
153 deltl(3) = 0.5_rfreal*muscl3(dvar(3) ,dvarm(3),eps2n)
154 deltr(3) = 0.5_rfreal*muscl3(dvarp(3),dvar(3) ,eps2n)
155 deltl(4) = 0.5_rfreal*muscl3(dvar(4) ,dvarm(4),eps2n)
156 deltr(4) = 0.5_rfreal*muscl3(dvarp(4),dvar(4) ,eps2n)
160 rl = tcv(cv_sa_nutil,ijkc1) + deltl(1)
161 ul = dv(dv_mixt_uvel,ijkc1) + deltl(2)
162 vl = dv(dv_mixt_vvel,ijkc1) + deltl(3)
163 wl = dv(dv_mixt_wvel,ijkc1) + deltl(4)
164 qsrl = (ul*si(xcoord,ijkn)+vl*si(ycoord,ijkn)+ &
165 wl*si(zcoord,ijkn)-sivel(ijkn*indsvel))*rl
167 rr = tcv(cv_sa_nutil,ijkc0) - deltr(1)
168 ur = dv(dv_mixt_uvel,ijkc0) - deltr(2)
169 vr = dv(dv_mixt_vvel,ijkc0) - deltr(3)
170 wr = dv(dv_mixt_wvel,ijkc0) - deltr(4)
171 qsrr = (ur*si(xcoord,ijkn)+vr*si(ycoord,ijkn)+ &
172 wr*si(zcoord,ijkn)-sivel(ijkn*indsvel))*rr
176 fc = 0.5_rfreal*(qsrl +qsrr )
177 trhs(cv_sa_nutil,ijkc0) = trhs(cv_sa_nutil,ijkc0) + fc
178 trhs(cv_sa_nutil,ijkc1) = trhs(cv_sa_nutil,ijkc1) - fc
188 ijkc0 = indijk(
i,
j ,
k,icoff,ijcoff)
189 ijkc1 = indijk(
i,
j-1,
k,icoff,ijcoff)
190 ijkc2 = indijk(
i,
j-2,
k,icoff,ijcoff)
191 ijkc3 = indijk(
i,
j+1,
k,icoff,ijcoff)
192 ijkn = indijk(
i,
j ,
k,inoff,ijnoff)
194 vola = (0.5_rfreal*(vol(ijkc0)+vol(ijkc1)))**1.5_rfreal
198 dvar(1) = tcv(cv_sa_nutil,ijkc0) - tcv(cv_sa_nutil,ijkc1)
199 dvar(2) = dv(dv_mixt_uvel,ijkc0) - dv(dv_mixt_uvel,ijkc1)
200 dvar(3) = dv(dv_mixt_vvel,ijkc0) - dv(dv_mixt_vvel,ijkc1)
201 dvar(4) = dv(dv_mixt_wvel,ijkc0) - dv(dv_mixt_wvel,ijkc1)
203 dvarm(1) = tcv(cv_sa_nutil,ijkc1) - tcv(cv_sa_nutil,ijkc2)
204 dvarm(2) = dv(dv_mixt_uvel,ijkc1) - dv(dv_mixt_uvel,ijkc2)
205 dvarm(3) = dv(dv_mixt_vvel,ijkc1) - dv(dv_mixt_vvel,ijkc2)
206 dvarm(4) = dv(dv_mixt_wvel,ijkc1) - dv(dv_mixt_wvel,ijkc2)
208 dvarp(1) = tcv(cv_sa_nutil,ijkc3) - tcv(cv_sa_nutil,ijkc0)
209 dvarp(2) = dv(dv_mixt_uvel,ijkc3) - dv(dv_mixt_uvel,ijkc0)
210 dvarp(3) = dv(dv_mixt_vvel,ijkc3) - dv(dv_mixt_vvel,ijkc0)
211 dvarp(4) = dv(dv_mixt_wvel,ijkc3) - dv(dv_mixt_wvel,ijkc0)
214 deltl(1) = 0.5_rfreal*muscl3(dvar(1) ,dvarm(1),eps2n)
215 deltr(1) = 0.5_rfreal*muscl3(dvarp(1),dvar(1) ,eps2n)
217 deltl(2) = 0.5_rfreal*muscl3(dvar(2) ,dvarm(2),eps2n)
218 deltr(2) = 0.5_rfreal*muscl3(dvarp(2),dvar(2) ,eps2n)
219 deltl(3) = 0.5_rfreal*muscl3(dvar(3) ,dvarm(3),eps2n)
220 deltr(3) = 0.5_rfreal*muscl3(dvarp(3),dvar(3) ,eps2n)
221 deltl(4) = 0.5_rfreal*muscl3(dvar(4) ,dvarm(4),eps2n)
222 deltr(4) = 0.5_rfreal*muscl3(dvarp(4),dvar(4) ,eps2n)
226 rl = tcv(cv_sa_nutil,ijkc1) + deltl(1)
227 ul = dv(dv_mixt_uvel,ijkc1) + deltl(2)
228 vl = dv(dv_mixt_vvel,ijkc1) + deltl(3)
229 wl = dv(dv_mixt_wvel,ijkc1) + deltl(4)
230 qsrl = (ul*sj(xcoord,ijkn)+vl*sj(ycoord,ijkn)+ &
231 wl*sj(zcoord,ijkn)-sjvel(ijkn*indsvel))*rl
233 rr = tcv(cv_sa_nutil,ijkc0) - deltr(1)
234 ur = dv(dv_mixt_uvel,ijkc0) - deltr(2)
235 vr = dv(dv_mixt_vvel,ijkc0) - deltr(3)
236 wr = dv(dv_mixt_wvel,ijkc0) - deltr(4)
237 qsrr = (ur*sj(xcoord,ijkn)+vr*sj(ycoord,ijkn)+ &
238 wr*sj(zcoord,ijkn)-sjvel(ijkn*indsvel))*rr
242 fc = 0.5_rfreal*(qsrl +qsrr )
243 trhs(cv_sa_nutil,ijkc0) = trhs(cv_sa_nutil,ijkc0) + fc
244 trhs(cv_sa_nutil,ijkc1) = trhs(cv_sa_nutil,ijkc1) - fc
254 ijkc0 = indijk(
i,
j,
k ,icoff,ijcoff)
255 ijkc1 = indijk(
i,
j,
k-1,icoff,ijcoff)
256 ijkc2 = indijk(
i,
j,
k-2,icoff,ijcoff)
257 ijkc3 = indijk(
i,
j,
k+1,icoff,ijcoff)
258 ijkn = indijk(
i,
j,
k ,inoff,ijnoff)
260 vola = (0.5_rfreal*(vol(ijkc0)+vol(ijkc1)))**1.5_rfreal
264 dvar(1) = tcv(cv_sa_nutil,ijkc0) - tcv(cv_sa_nutil,ijkc1)
265 dvar(2) = dv(dv_mixt_uvel,ijkc0) - dv(dv_mixt_uvel,ijkc1)
266 dvar(3) = dv(dv_mixt_vvel,ijkc0) - dv(dv_mixt_vvel,ijkc1)
267 dvar(4) = dv(dv_mixt_wvel,ijkc0) - dv(dv_mixt_wvel,ijkc1)
269 dvarm(1) = tcv(cv_sa_nutil,ijkc1) - tcv(cv_sa_nutil,ijkc2)
270 dvarm(2) = dv(dv_mixt_uvel,ijkc1) - dv(dv_mixt_uvel,ijkc2)
271 dvarm(3) = dv(dv_mixt_vvel,ijkc1) - dv(dv_mixt_vvel,ijkc2)
272 dvarm(4) = dv(dv_mixt_wvel,ijkc1) - dv(dv_mixt_wvel,ijkc2)
274 dvarp(1) = tcv(cv_sa_nutil,ijkc3) - tcv(cv_sa_nutil,ijkc0)
275 dvarp(2) = dv(dv_mixt_uvel,ijkc3) - dv(dv_mixt_uvel,ijkc0)
276 dvarp(3) = dv(dv_mixt_vvel,ijkc3) - dv(dv_mixt_vvel,ijkc0)
277 dvarp(4) = dv(dv_mixt_wvel,ijkc3) - dv(dv_mixt_wvel,ijkc0)
280 deltl(1) = 0.5_rfreal*muscl3(dvar(1) ,dvarm(1),eps2n)
281 deltr(1) = 0.5_rfreal*muscl3(dvarp(1),dvar(1) ,eps2n)
283 deltl(2) = 0.5_rfreal*muscl3(dvar(2) ,dvarm(2),eps2n)
284 deltr(2) = 0.5_rfreal*muscl3(dvarp(2),dvar(2) ,eps2n)
285 deltl(3) = 0.5_rfreal*muscl3(dvar(3) ,dvarm(3),eps2n)
286 deltr(3) = 0.5_rfreal*muscl3(dvarp(3),dvar(3) ,eps2n)
287 deltl(4) = 0.5_rfreal*muscl3(dvar(4) ,dvarm(4),eps2n)
288 deltr(4) = 0.5_rfreal*muscl3(dvarp(4),dvar(4) ,eps2n)
292 rl = tcv(cv_sa_nutil,ijkc1) + deltl(1)
293 ul = dv(dv_mixt_uvel,ijkc1) + deltl(2)
294 vl = dv(dv_mixt_vvel,ijkc1) + deltl(3)
295 wl = dv(dv_mixt_wvel,ijkc1) + deltl(4)
296 qsrl = (ul*sk(xcoord,ijkn)+vl*sk(ycoord,ijkn)+ &
297 wl*sk(zcoord,ijkn)-skvel(ijkn*indsvel))*rl
299 rr = tcv(cv_sa_nutil,ijkc0) - deltr(1)
300 ur = dv(dv_mixt_uvel,ijkc0) - deltr(2)
301 vr = dv(dv_mixt_vvel,ijkc0) - deltr(3)
302 wr = dv(dv_mixt_wvel,ijkc0) - deltr(4)
303 qsrr = (ur*sk(xcoord,ijkn)+vr*sk(ycoord,ijkn)+ &
304 wr*sk(zcoord,ijkn)-skvel(ijkn*indsvel))*rr
308 fc = 0.5_rfreal*(qsrl +qsrr )
309 trhs(cv_sa_nutil,ijkc0) = trhs(cv_sa_nutil,ijkc0) + fc
310 trhs(cv_sa_nutil,ijkc1) = trhs(cv_sa_nutil,ijkc1) - fc
317 DO ipatch=1,region%nPatches
319 region%levels(ilev)%patches(ipatch) )
**********************************************************************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 kpcbeg
subroutine registerfunction(global, funName, fileName)
**********************************************************************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 jpcbeg
**********************************************************************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 ipcend
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 ipcbeg
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 jpcend
subroutine turb_floranssaroe2ndflux(region)
subroutine deregisterfunction(global)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)