59 TYPE(t_region
) :: region
62 INTEGER ::
i,
j,
k, ii, jj, kk
66 INTEGER :: ilev, icoff, ijcoff, ijkc0, ijkcm1, ijkcp1, ijkcp2, pswitchtype
68 REAL(RFREAL) :: beta, vis2, vis4, eval, pmax, eps2, eps4, fd(5)
69 REAL(RFREAL) :: pswitchomega, ptvd, psum
70 REAL(RFREAL),
POINTER :: cv(:,:), dv(:,:), diss(:,:), srad(:,:), dp(:)
75 'RFLO_CentralDissipation.F90' )
79 ilev = region%currLevel
85 cv => region%levels(ilev)%mixt%cv
86 dv => region%levels(ilev)%mixt%dv
87 diss => region%levels(ilev)%mixt%diss
88 srad => region%levels(ilev)%mixt%srad
93 beta = region%mixtInput%betrk(region%irkStep)
94 vis2 = beta*region%mixtInput%vis2
95 vis4 = beta*region%mixtInput%vis4
96 pswitchtype = region%mixtInput%pSwitchType
97 pswitchomega = region%mixtInput%pSwitchOmega
107 IF (pswitchtype == pswitch_std)
THEN
110 ijkc0 = indijk(
i ,
j,
k,icoff,ijcoff)
111 ijkcm1 = indijk(
i-1,
j,
k,icoff,ijcoff)
112 ijkcp1 = indijk(
i+1,
j,
k,icoff,ijcoff)
113 dp(ii) = abs(( dv(dv_mixt_pres,ijkcp1)- &
114 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
115 dv(dv_mixt_pres,ijkcm1))/ &
116 ( dv(dv_mixt_pres,ijkcp1)+ &
117 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
118 dv(dv_mixt_pres,ijkcm1)))
123 ijkc0 = indijk(
i ,
j,
k,icoff,ijcoff)
124 ijkcm1 = indijk(
i-1,
j,
k,icoff,ijcoff)
125 ijkcp1 = indijk(
i+1,
j,
k,icoff,ijcoff)
126 psum = dv(dv_mixt_pres,ijkcp1)+ &
127 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
128 dv(dv_mixt_pres,ijkcm1)
129 ptvd = abs(dv(dv_mixt_pres,ijkcp1)-dv(dv_mixt_pres,ijkc0 ))+ &
130 abs(dv(dv_mixt_pres,ijkc0 )-dv(dv_mixt_pres,ijkcm1))
131 dp(ii) = abs( dv(dv_mixt_pres,ijkcp1)- &
132 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
133 dv(dv_mixt_pres,ijkcm1))/ &
134 ((1._rfreal-pswitchomega)*ptvd+pswitchomega*psum)
143 ijkc0 = indijk(
i ,
j,
k,icoff,ijcoff)
144 ijkcm1 = indijk(
i-1,
j,
k,icoff,ijcoff)
145 ijkcp1 = indijk(
i+1,
j,
k,icoff,ijcoff)
146 ijkcp2 = indijk(
i+2,
j,
k,icoff,ijcoff)
147 eval = 0.5_rfreal*(srad(icoord,ijkc0)+srad(icoord,ijkcp1) + &
148 max(srad(jcoord,ijkc0)+srad(jcoord,ijkcp1), &
149 srad(kcoord,ijkc0)+srad(kcoord,ijkcp1)))
150 pmax =
max(dp(ii),dp(ii+1))
151 eps2 = eval*vis2*pmax
153 eps4 = dim(eps4,eps2)
154 fd(1) = eps2*(cv(cv_mixt_dens,ijkcp1)-cv(cv_mixt_dens,ijkc0)) - &
155 eps4*(cv(cv_mixt_dens,ijkcp2)- &
156 3._rfreal*(cv(cv_mixt_dens,ijkcp1)- &
157 cv(cv_mixt_dens,ijkc0 ))- &
158 cv(cv_mixt_dens,ijkcm1))
159 fd(2) = eps2*(cv(cv_mixt_xmom,ijkcp1)-cv(cv_mixt_xmom,ijkc0)) - &
160 eps4*(cv(cv_mixt_xmom,ijkcp2)- &
161 3._rfreal*(cv(cv_mixt_xmom,ijkcp1)- &
162 cv(cv_mixt_xmom,ijkc0 ))- &
163 cv(cv_mixt_xmom,ijkcm1))
164 fd(3) = eps2*(cv(cv_mixt_ymom,ijkcp1)-cv(cv_mixt_ymom,ijkc0)) - &
165 eps4*(cv(cv_mixt_ymom,ijkcp2)- &
166 3._rfreal*(cv(cv_mixt_ymom,ijkcp1)- &
167 cv(cv_mixt_ymom,ijkc0 ))- &
168 cv(cv_mixt_ymom,ijkcm1))
169 fd(4) = eps2*(cv(cv_mixt_zmom,ijkcp1)-cv(cv_mixt_zmom,ijkc0)) - &
170 eps4*(cv(cv_mixt_zmom,ijkcp2)- &
171 3._rfreal*(cv(cv_mixt_zmom,ijkcp1)- &
172 cv(cv_mixt_zmom,ijkc0 ))- &
173 cv(cv_mixt_zmom,ijkcm1))
174 fd(5) = eps2*(cv(cv_mixt_ener,ijkcp1)-cv(cv_mixt_ener,ijkc0)) - &
175 eps4*(cv(cv_mixt_ener,ijkcp2)- &
176 3._rfreal*(cv(cv_mixt_ener,ijkcp1)- &
177 cv(cv_mixt_ener,ijkc0 ))- &
178 cv(cv_mixt_ener,ijkcm1))
180 diss(cv_mixt_dens,ijkc0 ) = diss(cv_mixt_dens,ijkc0 ) + fd(1)
181 diss(cv_mixt_xmom,ijkc0 ) = diss(cv_mixt_xmom,ijkc0 ) + fd(2)
182 diss(cv_mixt_ymom,ijkc0 ) = diss(cv_mixt_ymom,ijkc0 ) + fd(3)
183 diss(cv_mixt_zmom,ijkc0 ) = diss(cv_mixt_zmom,ijkc0 ) + fd(4)
184 diss(cv_mixt_ener,ijkc0 ) = diss(cv_mixt_ener,ijkc0 ) + fd(5)
186 diss(cv_mixt_dens,ijkcp1) = diss(cv_mixt_dens,ijkcp1) - fd(1)
187 diss(cv_mixt_xmom,ijkcp1) = diss(cv_mixt_xmom,ijkcp1) - fd(2)
188 diss(cv_mixt_ymom,ijkcp1) = diss(cv_mixt_ymom,ijkcp1) - fd(3)
189 diss(cv_mixt_zmom,ijkcp1) = diss(cv_mixt_zmom,ijkcp1) - fd(4)
190 diss(cv_mixt_ener,ijkcp1) = diss(cv_mixt_ener,ijkcp1) - fd(5)
204 IF (pswitchtype == pswitch_std)
THEN
207 ijkc0 = indijk(
i,
j ,
k,icoff,ijcoff)
208 ijkcm1 = indijk(
i,
j-1,
k,icoff,ijcoff)
209 ijkcp1 = indijk(
i,
j+1,
k,icoff,ijcoff)
210 dp(jj) = abs(( dv(dv_mixt_pres,ijkcp1)- &
211 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
212 dv(dv_mixt_pres,ijkcm1))/ &
213 ( dv(dv_mixt_pres,ijkcp1)+ &
214 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
215 dv(dv_mixt_pres,ijkcm1)))
220 ijkc0 = indijk(
i,
j ,
k,icoff,ijcoff)
221 ijkcm1 = indijk(
i,
j-1,
k,icoff,ijcoff)
222 ijkcp1 = indijk(
i,
j+1,
k,icoff,ijcoff)
223 psum = dv(dv_mixt_pres,ijkcp1)+ &
224 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
225 dv(dv_mixt_pres,ijkcm1)
226 ptvd = abs(dv(dv_mixt_pres,ijkcp1)-dv(dv_mixt_pres,ijkc0 ))+ &
227 abs(dv(dv_mixt_pres,ijkc0 )-dv(dv_mixt_pres,ijkcm1))
228 dp(jj) = abs( dv(dv_mixt_pres,ijkcp1)- &
229 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
230 dv(dv_mixt_pres,ijkcm1))/ &
231 ((1._rfreal-pswitchomega)*ptvd+pswitchomega*psum)
240 ijkc0 = indijk(
i,
j ,
k,icoff,ijcoff)
241 ijkcm1 = indijk(
i,
j-1,
k,icoff,ijcoff)
242 ijkcp1 = indijk(
i,
j+1,
k,icoff,ijcoff)
243 ijkcp2 = indijk(
i,
j+2,
k,icoff,ijcoff)
244 eval = 0.5_rfreal*(srad(jcoord,ijkc0)+srad(jcoord,ijkcp1) + &
245 max(srad(icoord,ijkc0)+srad(icoord,ijkcp1), &
246 srad(kcoord,ijkc0)+srad(kcoord,ijkcp1)))
247 pmax =
max(dp(jj),dp(jj+1))
248 eps2 = eval*vis2*pmax
250 eps4 = dim(eps4,eps2)
251 fd(1) = eps2*(cv(cv_mixt_dens,ijkcp1)-cv(cv_mixt_dens,ijkc0)) - &
252 eps4*(cv(cv_mixt_dens,ijkcp2)- &
253 3._rfreal*(cv(cv_mixt_dens,ijkcp1)- &
254 cv(cv_mixt_dens,ijkc0 ))- &
255 cv(cv_mixt_dens,ijkcm1))
256 fd(2) = eps2*(cv(cv_mixt_xmom,ijkcp1)-cv(cv_mixt_xmom,ijkc0)) - &
257 eps4*(cv(cv_mixt_xmom,ijkcp2)- &
258 3._rfreal*(cv(cv_mixt_xmom,ijkcp1)- &
259 cv(cv_mixt_xmom,ijkc0 ))- &
260 cv(cv_mixt_xmom,ijkcm1))
261 fd(3) = eps2*(cv(cv_mixt_ymom,ijkcp1)-cv(cv_mixt_ymom,ijkc0)) - &
262 eps4*(cv(cv_mixt_ymom,ijkcp2)- &
263 3._rfreal*(cv(cv_mixt_ymom,ijkcp1)- &
264 cv(cv_mixt_ymom,ijkc0 ))- &
265 cv(cv_mixt_ymom,ijkcm1))
266 fd(4) = eps2*(cv(cv_mixt_zmom,ijkcp1)-cv(cv_mixt_zmom,ijkc0)) - &
267 eps4*(cv(cv_mixt_zmom,ijkcp2)- &
268 3._rfreal*(cv(cv_mixt_zmom,ijkcp1)- &
269 cv(cv_mixt_zmom,ijkc0 ))- &
270 cv(cv_mixt_zmom,ijkcm1))
271 fd(5) = eps2*(cv(cv_mixt_ener,ijkcp1)-cv(cv_mixt_ener,ijkc0)) - &
272 eps4*(cv(cv_mixt_ener,ijkcp2)- &
273 3._rfreal*(cv(cv_mixt_ener,ijkcp1)- &
274 cv(cv_mixt_ener,ijkc0 ))- &
275 cv(cv_mixt_ener,ijkcm1))
277 diss(cv_mixt_dens,ijkc0 ) = diss(cv_mixt_dens,ijkc0 ) + fd(1)
278 diss(cv_mixt_xmom,ijkc0 ) = diss(cv_mixt_xmom,ijkc0 ) + fd(2)
279 diss(cv_mixt_ymom,ijkc0 ) = diss(cv_mixt_ymom,ijkc0 ) + fd(3)
280 diss(cv_mixt_zmom,ijkc0 ) = diss(cv_mixt_zmom,ijkc0 ) + fd(4)
281 diss(cv_mixt_ener,ijkc0 ) = diss(cv_mixt_ener,ijkc0 ) + fd(5)
283 diss(cv_mixt_dens,ijkcp1) = diss(cv_mixt_dens,ijkcp1) - fd(1)
284 diss(cv_mixt_xmom,ijkcp1) = diss(cv_mixt_xmom,ijkcp1) - fd(2)
285 diss(cv_mixt_ymom,ijkcp1) = diss(cv_mixt_ymom,ijkcp1) - fd(3)
286 diss(cv_mixt_zmom,ijkcp1) = diss(cv_mixt_zmom,ijkcp1) - fd(4)
287 diss(cv_mixt_ener,ijkcp1) = diss(cv_mixt_ener,ijkcp1) - fd(5)
301 IF (pswitchtype == pswitch_std)
THEN
304 ijkc0 = indijk(
i,
j,
k ,icoff,ijcoff)
305 ijkcm1 = indijk(
i,
j,
k-1,icoff,ijcoff)
306 ijkcp1 = indijk(
i,
j,
k+1,icoff,ijcoff)
307 dp(kk) = abs(( dv(dv_mixt_pres,ijkcp1)- &
308 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
309 dv(dv_mixt_pres,ijkcm1))/ &
310 ( dv(dv_mixt_pres,ijkcp1)+ &
311 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
312 dv(dv_mixt_pres,ijkcm1)))
317 ijkc0 = indijk(
i,
j,
k ,icoff,ijcoff)
318 ijkcm1 = indijk(
i,
j,
k-1,icoff,ijcoff)
319 ijkcp1 = indijk(
i,
j,
k+1,icoff,ijcoff)
320 psum = dv(dv_mixt_pres,ijkcp1)+ &
321 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
322 dv(dv_mixt_pres,ijkcm1)
323 ptvd = abs(dv(dv_mixt_pres,ijkcp1)-dv(dv_mixt_pres,ijkc0 ))+ &
324 abs(dv(dv_mixt_pres,ijkc0 )-dv(dv_mixt_pres,ijkcm1))
325 dp(kk) = abs( dv(dv_mixt_pres,ijkcp1)- &
326 2._rfreal*dv(dv_mixt_pres,ijkc0 )+ &
327 dv(dv_mixt_pres,ijkcm1))/ &
328 ((1._rfreal-pswitchomega)*ptvd+pswitchomega*psum)
337 ijkc0 = indijk(
i,
j,
k ,icoff,ijcoff)
338 ijkcm1 = indijk(
i,
j,
k-1,icoff,ijcoff)
339 ijkcp1 = indijk(
i,
j,
k+1,icoff,ijcoff)
340 ijkcp2 = indijk(
i,
j,
k+2,icoff,ijcoff)
341 eval = 0.5_rfreal*(srad(kcoord,ijkc0)+srad(kcoord,ijkcp1) + &
342 max(srad(icoord,ijkc0)+srad(icoord,ijkcp1), &
343 srad(jcoord,ijkc0)+srad(jcoord,ijkcp1)))
344 pmax =
max(dp(kk),dp(kk+1))
345 eps2 = eval*vis2*pmax
347 eps4 = dim(eps4,eps2)
348 fd(1) = eps2*(cv(cv_mixt_dens,ijkcp1)-cv(cv_mixt_dens,ijkc0)) - &
349 eps4*(cv(cv_mixt_dens,ijkcp2)- &
350 3._rfreal*(cv(cv_mixt_dens,ijkcp1)- &
351 cv(cv_mixt_dens,ijkc0 ))- &
352 cv(cv_mixt_dens,ijkcm1))
353 fd(2) = eps2*(cv(cv_mixt_xmom,ijkcp1)-cv(cv_mixt_xmom,ijkc0)) - &
354 eps4*(cv(cv_mixt_xmom,ijkcp2)- &
355 3._rfreal*(cv(cv_mixt_xmom,ijkcp1)- &
356 cv(cv_mixt_xmom,ijkc0 ))- &
357 cv(cv_mixt_xmom,ijkcm1))
358 fd(3) = eps2*(cv(cv_mixt_ymom,ijkcp1)-cv(cv_mixt_ymom,ijkc0)) - &
359 eps4*(cv(cv_mixt_ymom,ijkcp2)- &
360 3._rfreal*(cv(cv_mixt_ymom,ijkcp1)- &
361 cv(cv_mixt_ymom,ijkc0 ))- &
362 cv(cv_mixt_ymom,ijkcm1))
363 fd(4) = eps2*(cv(cv_mixt_zmom,ijkcp1)-cv(cv_mixt_zmom,ijkc0)) - &
364 eps4*(cv(cv_mixt_zmom,ijkcp2)- &
365 3._rfreal*(cv(cv_mixt_zmom,ijkcp1)- &
366 cv(cv_mixt_zmom,ijkc0 ))- &
367 cv(cv_mixt_zmom,ijkcm1))
368 fd(5) = eps2*(cv(cv_mixt_ener,ijkcp1)-cv(cv_mixt_ener,ijkc0)) - &
369 eps4*(cv(cv_mixt_ener,ijkcp2)- &
370 3._rfreal*(cv(cv_mixt_ener,ijkcp1)- &
371 cv(cv_mixt_ener,ijkc0 ))- &
372 cv(cv_mixt_ener,ijkcm1))
374 diss(cv_mixt_dens,ijkc0 ) = diss(cv_mixt_dens,ijkc0 ) + fd(1)
375 diss(cv_mixt_xmom,ijkc0 ) = diss(cv_mixt_xmom,ijkc0 ) + fd(2)
376 diss(cv_mixt_ymom,ijkc0 ) = diss(cv_mixt_ymom,ijkc0 ) + fd(3)
377 diss(cv_mixt_zmom,ijkc0 ) = diss(cv_mixt_zmom,ijkc0 ) + fd(4)
378 diss(cv_mixt_ener,ijkc0 ) = diss(cv_mixt_ener,ijkc0 ) + fd(5)
380 diss(cv_mixt_dens,ijkcp1) = diss(cv_mixt_dens,ijkcp1) - fd(1)
381 diss(cv_mixt_xmom,ijkcp1) = diss(cv_mixt_xmom,ijkcp1) - fd(2)
382 diss(cv_mixt_ymom,ijkcp1) = diss(cv_mixt_ymom,ijkcp1) - fd(3)
383 diss(cv_mixt_zmom,ijkcp1) = diss(cv_mixt_zmom,ijkcp1) - fd(4)
384 diss(cv_mixt_ener,ijkcp1) = diss(cv_mixt_ener,ijkcp1) - fd(5)
**********************************************************************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
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine rflo_centraldissipation(region)
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
**********************************************************************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)
**********************************************************************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 deregisterfunction(global)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)