70 TYPE(t_region
) :: region
77 CHARACTER(CHRLEN) :: rcsidentstring
80 INTEGER :: ilev, lbound,
idir,
jdir,
kdir, iref, jref, kref, nref
82 INTEGER :: n1, n2, ioff, ijbeg, ijend, errorflag
83 INTEGER :: ijkc, ijkcip, ijkcim,ijkcjp, ijkcjm,ijkckp, ijkckm, ijkval
85 REAL(RFREAL) :: dens, wdist, rvonk, consb,
ksize, abvel, utau
86 REAL(RFREAL) :: ypls, kspls, ksplsmax, func, dfunc, tauwall
87 REAL(RFREAL) :: minut, maxut, relaxcoef
88 REAL(RFREAL),
POINTER :: cv(:,:), dv(:,:), tv(:,:), vals(:,:)
89 REAL(RFREAL),
ALLOCATABLE ::
mul(:)
93 rcsidentstring =
'$RCSfile: TURB_floWlmUpdateLoglay.F90,v $ $Revision: 1.5 $'
95 global => region%global
97 'TURB_floWlmUpdateLoglay.F90' )
101 ilev = region%currLevel
102 lbound =
patch%lbound
103 nref =
patch%valBola%switches(wlm_input_refpoint) - 1
109 relaxcoef = 0.2_rfreal
113 cv => region%levels(ilev)%mixt%cv
114 dv => region%levels(ilev)%mixt%dv
115 tv => region%levels(ilev)%mixt%tv
116 vals =>
patch%valBola%vals
121 ijbeg = indij( 0, 0,ioff)
122 ijend = indij(n1,n2,ioff)
124 ALLOCATE(
mul(ijbeg:ijend) )
148 IF (lbound==1 .OR. lbound==2)
THEN
156 ijkc = indijk(iref ,
j ,
k ,icoff,ijcoff)
157 ijkcjp= indijk(iref ,
j+1 ,
k ,icoff,ijcoff)
158 ijkcjm= indijk(iref ,
j-1 ,
k ,icoff,ijcoff)
159 ijkckp= indijk(iref ,
j ,
k+1 ,icoff,ijcoff)
160 ijkckm= indijk(iref ,
j ,
k-1 ,icoff,ijcoff)
163 vals(ijkval,wlm_vals_dpdxi) = &
164 (dv(dv_mixt_pres,ijkckp)-dv(dv_mixt_pres,ijkckm))* &
165 0.5_rfreal/vals(ijkval,wlm_vals_dxi)
166 vals(ijkval,wlm_vals_dpdzt) = &
167 (dv(dv_mixt_pres,ijkcjp)-dv(dv_mixt_pres,ijkcjm))* &
168 0.5_rfreal/vals(ijkval,wlm_vals_dzt)
169 vals(ijkval,wlm_vals_xiv) = &
170 dv(dv_mixt_uvel,ijkc)*vals(ijkval,wlm_vals_xix) + &
171 dv(dv_mixt_vvel,ijkc)*vals(ijkval,wlm_vals_xiy) + &
172 dv(dv_mixt_wvel,ijkc)*vals(ijkval,wlm_vals_xiz)
173 vals(ijkval,wlm_vals_etv) = &
174 dv(dv_mixt_uvel,ijkc)*vals(ijkval,wlm_vals_etx) + &
175 dv(dv_mixt_vvel,ijkc)*vals(ijkval,wlm_vals_ety) + &
176 dv(dv_mixt_wvel,ijkc)*vals(ijkval,wlm_vals_etz)
177 vals(ijkval,wlm_vals_ztv) = &
178 dv(dv_mixt_uvel,ijkc)*vals(ijkval,wlm_vals_ztx) + &
179 dv(dv_mixt_vvel,ijkc)*vals(ijkval,wlm_vals_zty) + &
180 dv(dv_mixt_wvel,ijkc)*vals(ijkval,wlm_vals_ztz)
181 vals(ijkval,wlm_vals_dens) = cv(cv_mixt_dens,ijkc)
182 mul(ijkval) = tv(tv_mixt_muel,ijkc)
187 ELSEIF (lbound==3 .OR. lbound==4)
THEN
195 ijkc = indijk(
i ,jref ,
k ,icoff,ijcoff)
196 ijkcip= indijk(
i+1 ,jref ,
k ,icoff,ijcoff)
197 ijkcim= indijk(
i-1 ,jref ,
k ,icoff,ijcoff)
198 ijkckp= indijk(
i ,jref ,
k+1 ,icoff,ijcoff)
199 ijkckm= indijk(
i ,jref ,
k-1 ,icoff,ijcoff)
202 vals(ijkval,wlm_vals_dpdxi) = &
203 (dv(dv_mixt_pres,ijkcip)-dv(dv_mixt_pres,ijkcim))* &
204 0.5_rfreal/vals(ijkval,wlm_vals_dxi)
205 vals(ijkval,wlm_vals_dpdzt) = &
206 (dv(dv_mixt_pres,ijkckp)-dv(dv_mixt_pres,ijkckm))* &
207 0.5_rfreal/vals(ijkval,wlm_vals_dzt)
208 vals(ijkval,wlm_vals_xiv) = &
209 dv(dv_mixt_uvel,ijkc)*vals(ijkval,wlm_vals_xix) + &
210 dv(dv_mixt_vvel,ijkc)*vals(ijkval,wlm_vals_xiy) + &
211 dv(dv_mixt_wvel,ijkc)*vals(ijkval,wlm_vals_xiz)
212 vals(ijkval,wlm_vals_etv) = &
213 dv(dv_mixt_uvel,ijkc)*vals(ijkval,wlm_vals_etx) + &
214 dv(dv_mixt_vvel,ijkc)*vals(ijkval,wlm_vals_ety) + &
215 dv(dv_mixt_wvel,ijkc)*vals(ijkval,wlm_vals_etz)
216 vals(ijkval,wlm_vals_ztv) = &
217 dv(dv_mixt_uvel,ijkc)*vals(ijkval,wlm_vals_ztx) + &
218 dv(dv_mixt_vvel,ijkc)*vals(ijkval,wlm_vals_zty) + &
219 dv(dv_mixt_wvel,ijkc)*vals(ijkval,wlm_vals_ztz)
220 vals(ijkval,wlm_vals_dens) = cv(cv_mixt_dens,ijkc)
221 mul(ijkval) = tv(tv_mixt_muel,ijkc)
234 ijkc = indijk(
i ,
j ,kref ,icoff,ijcoff)
235 ijkcip= indijk(
i+1 ,
j ,kref ,icoff,ijcoff)
236 ijkcim= indijk(
i-1 ,
j ,kref ,icoff,ijcoff)
237 ijkcjp= indijk(
i ,
j+1 ,kref ,icoff,ijcoff)
238 ijkcjm= indijk(
i ,
j-1 ,kref ,icoff,ijcoff)
241 vals(ijkval,wlm_vals_dpdxi) = &
242 (dv(dv_mixt_pres,ijkcjp)-dv(dv_mixt_pres,ijkcjm))* &
243 0.5_rfreal/vals(ijkval,wlm_vals_dxi)
244 vals(ijkval,wlm_vals_dpdzt) = &
245 (dv(dv_mixt_pres,ijkcip)-dv(dv_mixt_pres,ijkcim))* &
246 0.5_rfreal/vals(ijkval,wlm_vals_dzt)
247 vals(ijkval,wlm_vals_xiv) = &
248 dv(dv_mixt_uvel,ijkc)*vals(ijkval,wlm_vals_xix) + &
249 dv(dv_mixt_vvel,ijkc)*vals(ijkval,wlm_vals_xiy) + &
250 dv(dv_mixt_wvel,ijkc)*vals(ijkval,wlm_vals_xiz)
251 vals(ijkval,wlm_vals_etv) = &
252 dv(dv_mixt_uvel,ijkc)*vals(ijkval,wlm_vals_etx) + &
253 dv(dv_mixt_vvel,ijkc)*vals(ijkval,wlm_vals_ety) + &
254 dv(dv_mixt_wvel,ijkc)*vals(ijkval,wlm_vals_etz)
255 vals(ijkval,wlm_vals_ztv) = &
256 dv(dv_mixt_uvel,ijkc)*vals(ijkval,wlm_vals_ztx) + &
257 dv(dv_mixt_vvel,ijkc)*vals(ijkval,wlm_vals_zty) + &
258 dv(dv_mixt_wvel,ijkc)*vals(ijkval,wlm_vals_ztz)
259 vals(ijkval,wlm_vals_dens) = cv(cv_mixt_dens,ijkc)
260 mul(ijkval) = tv(tv_mixt_muel,ijkc)
271 ksplsmax = 70._rfreal
272 vals(:,wlm_vals_tauux:wlm_vals_tauwz) = 0._rfreal
274 DO ijkval=ijbeg,ijend
276 wdist = vals(ijkval,wlm_vals_wdist)
277 ksize = vals(ijkval,wlm_vals_rough)
278 dens = vals(ijkval,wlm_vals_dens)
279 abvel =
sqrt( vals(ijkval,wlm_vals_xiv)**2+vals(ijkval,wlm_vals_ztv)**2 )
281 IF (
ksize > real_small)
THEN
285 utau = rvonk*log( wdist/
ksize ) + consb
292 maxut = ksplsmax*
mul(ijkval)/(
ksize*dens)
293 utau =
min( utau, maxut )
294 IF (utau < 0._rfreal) utau = maxut
297 IF (kspls >= 5._rfreal)
THEN
328 utau = 0.05_rfreal*abvel
329 ypls = utau*wdist*dens/
mul(ijkval)
344 tauwall = dens*utau*utau
345 vals(ijkval,wlm_vals_tauuy) = vals(ijkval,wlm_vals_xiv)/abvel*tauwall
346 vals(ijkval,wlm_vals_tauwy) = vals(ijkval,wlm_vals_ztv)/abvel*tauwall
348 vals(ijkval,wlm_vals_tauvx) = vals(ijkval,wlm_vals_tauuy)
349 vals(ijkval,wlm_vals_tauvz) = vals(ijkval,wlm_vals_tauwy)
351 vals(ijkval,wlm_vals_utau) = utau
354 vals(ijkval,wlm_vals_hflux) = tauwall
**********************************************************************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 turb_flowlmupdateloglay(region, patch)
subroutine registerfunction(global, funName, fileName)
subroutine rflo_getpatchindices(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
unsigned int ksize() const
**********************************************************************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)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
**********************************************************************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)
static void mul(const Attribute *x, const Attribute *y, Attribute *z)
Operation wrapper for multiplication.