9 if(ix*iy*iz*iel.eq.1 .and. ifield.le.ifldla)
then
10 if(nid.eq.0 .and. loglevel.gt.2)
write(6,*)
'updating komg_mut'
52 coeffs_in(i) = coeffs(i)
64 data ifevalsrc /.true./
65 common /komgifsrc/ ifevalsrc
67 if(ix*iy*iz*iel.eq.1 .and. ifevalsrc)
then
68 if(nid.eq.0 .and. loglevel.gt.2)
write(6,*)
'updating komg_src'
77 if(ifld_k.gt.ifld_omega) ifevalsrc = .true.
89 data ifevalsrc /.true./
90 common /komgifsrc/ ifevalsrc
92 if(ix*iy*iz*iel.eq.1 .and. ifevalsrc)
then
93 if(nid.eq.0 .and. loglevel.gt.2)
write(6,*)
'updating komg_src'
102 if(ifld_omega.gt.ifld_k) ifevalsrc = .true.
117 parameter(lxyz=lx1*ly1*lz1)
119 real k_x(lxyz),k_y(lxyz),k_z(lxyz)
120 $ , o_x(lxyz),o_y(lxyz),o_z(lxyz)
121 $ ,omp_x(lxyz), omp_y(lxyz), omp_z(lxyz)
123 real tempv(lxyz), rhoalpk (lxyz)
124 $ ,omwom(lxyz), rhoalpfr(lxyz)
126 real term1(lxyz), term2 (lxyz)
127 $ ,term3(lxyz), term4 (lxyz)
128 $ ,g (lxyz), div (lxyz)
130 common /storesom/ st_mag2(lx1*ly1*lz1,lelv)
131 $ , om_mag2(lx1*ly1*lz1,lelv)
132 $ , oiojsk(lx1*ly1*lz1,lelv)
133 $ , divq(lx1*ly1*lz1,lelv)
136 real k,mu_t,nu_t,mu,nu, kv_min,omeg_max
138 real mu_omeg(lxyz), mu_omegx(lxyz), mu_omegy(lxyz), mu_omegz(lxyz)
139 real extra_src_omega(lxyz)
144 sigma_omega = coeffs( 3)
147 alpinf_str = coeffs( 4)
150 alp0_str = coeffs( 7)
153 betainf_str = coeffs( 8)
166 omeg_max = coeffs(15)
170 call comp_stom (st_mag2, om_mag2, oiojsk, divq)
179 call copy (g, st_mag2(1,e), lxyz)
180 call copy (div, divq(1,e), lxyz)
182 call gradm11(k_x, k_y, k_z, t(1,1,1,1,ifld_k -1),e)
183 call gradm11(omp_x,omp_y,omp_z,t(1,1,1,1,ifld_omega-1),e)
199 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
200 k = t(i,1,1,e,ifld_k -1)
204 if (iflim_omeg.eq.0)
then
205 if(t(i,1,1,e,ifld_omega-1).lt.0.0)
then
207 xome_neg = min(xome_neg,t(i,1,1,e,ifld_omega-1))
208 nome_neg = nome_neg + 1
210 t(i,1,1,e,ifld_omega-1) =0.01*abs(t(i,1,1,e,ifld_omega-1))
211 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
214 if(t(i,1,1,e,ifld_k-1).lt.0.0)
then
216 xkey_neg = min(xkey_neg,t(i,1,1,e,ifld_k-1))
217 nkey_neg = nkey_neg + 1
219 t(i,1,1,e,ifld_k-1) = 0.01*abs(t(i,1,1,e,ifld_k-1))
220 k = t(i,1,1,e,ifld_k -1)
223 elseif(iflim_omeg.eq.1)
then
225 if(omega.lt.0.0)
then
227 omega = 0.01*abs(omega)
238 o_x(i)= omp_x(i)+expn * dfdx_omegb(i,1,1,e) *f_omegb(i,1,1,e)
239 o_y(i)= omp_y(i)+expn * dfdy_omegb(i,1,1,e) *f_omegb(i,1,1,e)
241 $ o_z(i)= omp_z(i)+expn * dfdz_omegb(i,1,1,e) *f_omegb(i,1,1,e)
242 omwom(i)= 1.0/(1.0+t(i,1,1,e,ifld_omega-1)/f_omegb(i,1,1,e))
248 st_magn = sqrt(st_mag2(i,e))
249 om_magn = sqrt(om_mag2(i,e))
255 xk3= (k_x(i)*o_x(i) + k_y(i)*o_y(i) + k_z(i)*o_z(i))
258 xk3= (k_x(i)*o_x(i) + k_y(i)*o_y(i))
263 mu_t = rho * alp_str*k/(omega + tiny)
264 rhoalpk(i)= rho*alp_str*k
267 sigma_omega1 = 1.0/sigma_omega
268 rhoalpfr(i) = expn * rho * alp_str * factr * omwom(i)
277 betai_str = betainf_str
282 f_beta_str = (1.0 + 680.0*xk3*xk3)/(1.0 + 400.0*xk3*xk3)
284 y_k = rho * betai_str * f_beta_str * k * omega
290 if(iflomach) extra_prod = twothird*div(i)
291 g_k0= mu_t*g(i) - ( rho*k + mu_t*div(i) )*extra_prod
292 g_k = min(g_k0, 10.*y_k)
296 ksrc(i,1,1,e) = g_k - y_k
299 alpha = (alp_inf/alp_str)
302 g_w0 = alpha*alp_str*rho*(g(i)-(omega+div(i))*extra_prod)
308 x_w = abs((sum_xx)/(betainf_str*omega + tiny)**3)
310 if(if3d) f_b = (1.0 + 70.0*x_w)/(1.0 + 80.0*x_w)
312 y_w = rho*beta*f_b * omega * omega
314 g_w = min(g_w0, 10.0*y_w)
315 omgsrc(i,1,1,e) = g_w - y_w
318 mutsk(i,1,1,e) = mu_t / sigma_k
319 mutso(i,1,1,e) = mu_t / sigma_omega
325 sigma_omega1 = 1.0/sigma_omega
326 call copy (mu_omeg,rhoalpk,lxyz)
327 call cmult (mu_omeg,sigma_omega1,lxyz)
328 call col4 (extra_src_omega,mu_omeg ,omwom
329 $ ,delsqf_omegb(1,1,1,e),lxyz)
332 call copy (tempv,delsqf_omegb(1,1,1,e),lxyz)
333 call cmult (tempv,mu,lxyz)
334 call col2 (tempv,f_omegb(1,1,1,e),lxyz)
335 call add2 (extra_src_omega, tempv,lxyz)
339 call col3 (term1,dfdx_omegb(1,1,1,e),k_x,lxyz)
340 call addcol3(term1,dfdy_omegb(1,1,1,e),k_y,lxyz)
342 $
call addcol3(term1,dfdz_omegb(1,1,1,e),k_z,lxyz)
346 call col3 (term2,omwom,delfsq_omegb(1,1,1,e), lxyz)
347 call col2 (term2 ,t(1,1,1,e,ifld_k-1),lxyz)
348 call cmult (term2,expm,lxyz)
349 call add3 (tempv, term1, term2, lxyz)
352 call col3 (term3 ,omwom,t(1,1,1,e,ifld_k-1),lxyz)
353 call invcol2(term3 ,f_omegb(1,1,1,e) ,lxyz)
354 call col3 (term4, dfdx_omegb(1,1,1,e),omp_x, lxyz)
355 call addcol3(term4, dfdy_omegb(1,1,1,e),omp_y, lxyz)
357 $
call addcol3(term4, dfdz_omegb(1,1,1,e),omp_z, lxyz)
358 call subcol3(tempv, term3, term4, lxyz)
360 call addcol3(extra_src_omega, rhoalpfr, tempv, lxyz)
363 call col3 (tempv,dfdx_omegb(1,1,1,e),vx(1,1,1,e),lxyz)
364 call addcol3(tempv,dfdy_omegb(1,1,1,e),vy(1,1,1,e),lxyz)
366 $
call addcol3(tempv,dfdz_omegb(1,1,1,e),vz(1,1,1,e),lxyz)
367 call col2 (tempv,vtrans(1,1,1,e,1),lxyz)
368 call admcol3(extra_src_omega,tempv,f_omegb(1,1,1,e),expm,lxyz)
370 call add2 (omgsrc(1,1,1,e), extra_src_omega ,lxyz)
374 if(loglevel.gt.2)
then
375 nome_neg =
iglsum(nome_neg,1)
376 nkey_neg =
iglsum(nkey_neg,1)
377 xome_neg =
glmin(xome_neg,1)
378 xkey_neg =
glmin(xkey_neg,1)
380 if(nid.eq.0 .and. nome_neg.gt.0)
381 $
write(*,*)
'Neg Omega ', nome_neg, xome_neg
382 if(nid.eq.0 .and. nkey_neg.gt.0)
383 $
write(*,*)
'Neg TKE ', nkey_neg, xkey_neg
398 parameter(lxyz=lx1*ly1*lz1)
400 real k_x(lxyz),k_y(lxyz),k_z(lxyz)
401 $ , o_x(lxyz),o_y(lxyz),o_z(lxyz)
402 $ ,omp_x(lxyz), omp_y(lxyz), omp_z(lxyz)
404 real tempv(lxyz), rhoalpk (lxyz)
405 $ ,omwom(lxyz), rhoalpfr(lxyz)
407 real term1(lxyz), term2 (lxyz)
408 $ ,term3(lxyz), term4 (lxyz)
409 $ ,g (lxyz), div (lxyz)
411 common /storesom/ st_mag2(lx1*ly1*lz1,lelv)
412 $ , om_mag2(lx1*ly1*lz1,lelv)
413 $ , oiojsk(lx1*ly1*lz1,lelv)
414 $ , divq(lx1*ly1*lz1,lelv)
417 real k,mu_t,nu_t,mu,nu, kv_min,omeg_max
419 real mu_omeg(lxyz), mu_omegx(lxyz), mu_omegy(lxyz), mu_omegz(lxyz)
420 real extra_src_omega(lxyz)
425 sigma_omega = coeffs( 3)
428 alpinf_str = coeffs( 4)
431 alp0_str = coeffs( 7)
434 betainf_str = coeffs( 8)
447 omeg_max = coeffs(15)
451 call comp_stom (st_mag2, om_mag2, oiojsk, divq)
460 call copy (g, st_mag2(1,e), lxyz)
461 call copy (div, divq(1,e), lxyz)
463 call gradm11(k_x, k_y, k_z, t(1,1,1,1,ifld_k -1),e)
464 call gradm11(omp_x,omp_y,omp_z,t(1,1,1,1,ifld_omega-1),e)
480 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
481 k = t(i,1,1,e,ifld_k -1)
485 if (iflim_omeg.eq.0)
then
486 if(t(i,1,1,e,ifld_omega-1).lt.0.0)
then
488 xome_neg = min(xome_neg,t(i,1,1,e,ifld_omega-1))
489 nome_neg = nome_neg + 1
491 t(i,1,1,e,ifld_omega-1) =0.01*abs(t(i,1,1,e,ifld_omega-1))
492 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
495 if(t(i,1,1,e,ifld_k-1).lt.0.0)
then
497 xkey_neg = min(xkey_neg,t(i,1,1,e,ifld_k-1))
498 nkey_neg = nkey_neg + 1
500 t(i,1,1,e,ifld_k-1) = 0.01*abs(t(i,1,1,e,ifld_k-1))
501 k = t(i,1,1,e,ifld_k -1)
504 elseif(iflim_omeg.eq.1)
then
506 if(omega.lt.0.0)
then
507 write(*,*)
'OMEG tot is neg', omega
508 omega = 0.01*abs(omega)
512 write(*,*)
'K is neg', k
519 o_x(i)= omp_x(i)+expn * dfdx_omegb(i,1,1,e) *f_omegb(i,1,1,e)
520 o_y(i)= omp_y(i)+expn * dfdy_omegb(i,1,1,e) *f_omegb(i,1,1,e)
522 $ o_z(i)= omp_z(i)+expn * dfdz_omegb(i,1,1,e) *f_omegb(i,1,1,e)
523 omwom(i)= 1.0/(1.0+t(i,1,1,e,ifld_omega-1)/f_omegb(i,1,1,e))
529 st_magn = sqrt(st_mag2(i,e))
530 om_magn = sqrt(om_mag2(i,e))
536 xk3= (k_x(i)*o_x(i) + k_y(i)*o_y(i) + k_z(i)*o_z(i))
539 xk3= (k_x(i)*o_x(i) + k_y(i)*o_y(i))
543 re_t = rho * k /(mu * omega + tiny)
544 alp_str = alpinf_str * (alp0_str + (re_t/r_k))
546 mu_t = rho * alp_str*k/(omega + tiny)
547 rhoalpk(i)= rho*alp_str*k
550 funcr = (1.0 - alp0_str) / (alp0_str + rtld)/(1.0 + rtld)
551 factr = (1.0 + rtld * funcr)
552 sigma_omega1 = 1.0/sigma_omega
553 rhoalpfr(i) = expn * rho * alp_str * factr * omwom(i)
562 betai_str = betainf_str * (akk + (re_t/r_b)**4)
563 $ / (1.0 + (re_t/r_b)**4)
569 f_beta_str = (1.0 + 680.0*xk3*xk3)/(1.0 + 400.0*xk3*xk3)
571 y_k = rho * betai_str * f_beta_str * k * omega
576 if(iflomach) extra_prod = twothird*div(i)
577 g_k0= mu_t*g(i) - ( rho*k + mu_t*div(i) )*extra_prod
578 g_k = min(g_k0, 10.*y_k)
582 ksrc(i,1,1,e) = g_k - y_k
585 alpha = (alp_inf/alp_str) *
586 $ ((alpha_0 + (re_t/r_w))/(1.0 + (re_t/r_w)))
589 g_w0 = alpha*alp_str*rho*(g(i)-(omega+div(i))*extra_prod)
595 x_w = abs((sum_xx)/(betainf_str*omega + tiny)**3)
597 if(if3d) f_b = (1.0 + 70.0*x_w)/(1.0 + 80.0*x_w)
599 y_w = rho*beta*f_b * omega * omega
601 g_w = min(g_w0, 10.0*y_w)
602 omgsrc(i,1,1,e) = g_w - y_w
605 mutsk(i,1,1,e) = mu_t / sigma_k
606 mutso(i,1,1,e) = mu_t / sigma_omega
612 sigma_omega1 = 1.0/sigma_omega
613 call copy (mu_omeg,rhoalpk,lxyz)
614 call cmult (mu_omeg,sigma_omega1,lxyz)
615 call col4 (extra_src_omega,mu_omeg ,omwom
616 $ ,delsqf_omegb(1,1,1,e),lxyz)
619 call copy (tempv,delsqf_omegb(1,1,1,e),lxyz)
620 call cmult (tempv,mu,lxyz)
621 call col2 (tempv,f_omegb(1,1,1,e),lxyz)
622 call add2 (extra_src_omega, tempv,lxyz)
626 call col3 (term1,dfdx_omegb(1,1,1,e),k_x,lxyz)
627 call addcol3(term1,dfdy_omegb(1,1,1,e),k_y,lxyz)
629 $
call addcol3(term1,dfdz_omegb(1,1,1,e),k_z,lxyz)
633 call col3 (term2,omwom,delfsq_omegb(1,1,1,e), lxyz)
634 call col2 (term2 ,t(1,1,1,e,ifld_k-1),lxyz)
635 call cmult (term2,expm,lxyz)
636 call add3 (tempv, term1, term2, lxyz)
639 call col3 (term3 ,omwom,t(1,1,1,e,ifld_k-1),lxyz)
640 call invcol2(term3 ,f_omegb(1,1,1,e) ,lxyz)
641 call col3 (term4, dfdx_omegb(1,1,1,e),omp_x, lxyz)
642 call addcol3(term4, dfdy_omegb(1,1,1,e),omp_y, lxyz)
644 $
call addcol3(term4, dfdz_omegb(1,1,1,e),omp_z, lxyz)
645 call subcol3(tempv, term3, term4, lxyz)
647 call addcol3(extra_src_omega, rhoalpfr, tempv, lxyz)
650 call col3 (tempv,dfdx_omegb(1,1,1,e),vx(1,1,1,e),lxyz)
651 call addcol3(tempv,dfdy_omegb(1,1,1,e),vy(1,1,1,e),lxyz)
653 $
call addcol3(tempv,dfdz_omegb(1,1,1,e),vz(1,1,1,e),lxyz)
654 call col2 (tempv,vtrans(1,1,1,e,1),lxyz)
655 call admcol3(extra_src_omega,tempv,f_omegb(1,1,1,e),expm,lxyz)
657 call add2 (omgsrc(1,1,1,e), extra_src_omega ,lxyz)
661 if(loglevel.gt.2)
then
662 nome_neg =
iglsum(nome_neg,1)
663 nkey_neg =
iglsum(nkey_neg,1)
664 xome_neg =
glmin(xome_neg,1)
665 xkey_neg =
glmin(xkey_neg,1)
667 if(nid.eq.0 .and. nome_neg.gt.0)
668 $
write(*,*)
'Neg Omega ', nome_neg, xome_neg
669 if(nid.eq.0 .and. nkey_neg.gt.0)
670 $
write(*,*)
'Neg TKE ', nkey_neg, xkey_neg
685 parameter(lxyz=lx1*ly1*lz1)
687 real k_x(lxyz),k_y(lxyz),k_z(lxyz)
688 $ , o_x(lxyz),o_y(lxyz),o_z(lxyz)
689 $ ,omp_x(lxyz), omp_y(lxyz), omp_z(lxyz)
691 real tempv(lxyz), rhoalpk (lxyz)
692 $ ,omwom(lxyz), rhoalpfr(lxyz)
694 real term1(lxyz), term2 (lxyz)
695 $ ,term3(lxyz), term4 (lxyz)
696 $ ,g (lxyz), div (lxyz)
698 common /storesom/ st_mag2(lx1*ly1*lz1,lelv)
699 $ , om_mag2(lx1*ly1*lz1,lelv)
700 $ , oiojsk(lx1*ly1*lz1,lelv)
701 $ , divq(lx1*ly1*lz1,lelv)
704 real k,mu_t,nu_t,mu,nu, kv_min,omeg_max
706 real mu_omeg(lxyz), mu_omegx(lxyz), mu_omegy(lxyz), mu_omegz(lxyz)
707 real extra_src_omega(lxyz)
717 alpinf_str = coeffs( 4)
720 alp0_str = coeffs( 7)
723 beta_str = coeffs( 8)
736 omeg_max = coeffs(15)
747 call comp_stom (st_mag2, om_mag2, oiojsk, divq)
756 call copy (g, st_mag2(1,e), lxyz)
757 call copy (div, divq(1,e), lxyz)
759 call gradm11(k_x, k_y, k_z, t(1,1,1,1,ifld_k -1),e)
760 call gradm11(omp_x,omp_y,omp_z,t(1,1,1,1,ifld_omega-1),e)
776 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
777 k = t(i,1,1,e,ifld_k -1)
781 if (iflim_omeg.eq.0)
then
782 if(t(i,1,1,e,ifld_omega-1).lt.0.0)
then
784 xome_neg = min(xome_neg,t(i,1,1,e,ifld_omega-1))
785 nome_neg = nome_neg + 1
787 t(i,1,1,e,ifld_omega-1) =0.01*abs(t(i,1,1,e,ifld_omega-1))
788 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
791 if(t(i,1,1,e,ifld_k-1).lt.0.0)
then
793 xkey_neg = min(xkey_neg,t(i,1,1,e,ifld_k-1))
794 nkey_neg = nkey_neg + 1
796 t(i,1,1,e,ifld_k-1) = 0.01*abs(t(i,1,1,e,ifld_k-1))
797 k = t(i,1,1,e,ifld_k -1)
800 elseif(iflim_omeg.eq.1)
then
802 if(omega.lt.0.0)
then
803 write(*,*)
'OMEG tot is neg', omega
804 omega = 0.01*abs(omega)
808 write(*,*)
'K is neg', k
815 o_x(i)= omp_x(i)+expn * dfdx_omegb(i,1,1,e) *f_omegb(i,1,1,e)
816 o_y(i)= omp_y(i)+expn * dfdy_omegb(i,1,1,e) *f_omegb(i,1,1,e)
818 $ o_z(i)= omp_z(i)+expn * dfdz_omegb(i,1,1,e) *f_omegb(i,1,1,e)
819 omwom(i)= 1.0/(1.0+t(i,1,1,e,ifld_omega-1) /f_omegb(i,1,1,e))
826 st_magn = sqrt(st_mag2(i,e))
827 om_magn = sqrt(om_mag2(i,e))
832 xk = (k_x(i)*o_x(i) + k_y(i)*o_y(i) + k_z(i)*o_z(i))
835 xk = (k_x(i)*o_x(i) + k_y(i)*o_y(i))
840 rhoalpfr(i) = expn * rho * omwom(i) * sigom1
845 ywm1 = ywdm1(i,1,1,e)
847 arg2_1 = sqrt(abs(k)) * ywm1 / omega / beta_str
848 arg2_2 = 500.0*nu * ywm2 / omega
849 arg2 = max(2.0*arg2_1, arg2_2)
850 fun2 = tanh(arg2 * arg2)
854 argcd = 2.0 * rho * sigom2 * xk
855 cdkom = max(argcd, 1.0e-10)
856 arg1_1 = max( arg2_1, arg2_2)
857 arg1_2 = 4.0 * rho * sigom2 * k * ywm2 / cdkom
858 arg1 = min( arg1_1, arg1_2)
859 fun1 = tanh(arg1 * arg1 * arg1 * arg1)
862 argn_1 = alp1*(omega + tiny)
863 argn_2 = fun2*st_magn
866 denom = max(argn_1, argn_2)
867 if(yw.ne.0) mu_t = rho * alp1 * k / denom
871 y_k = rho * beta_str * k * omega
876 if(iflomach) extra_prod = twothird*div(i)
877 g_k0= mu_t*g(i) - ( rho*k + mu_t*div(i) )*extra_prod
878 g_k = min(g_k0, 10.*y_k)
882 ksrc(i,1,1,e) = g_k - y_k
886 beta = fun1 * beta1 + (1.0 - fun1) * beta2
887 gamma = fun1 * gamma1 + (1.0 - fun1) * gamma2
888 sigk = fun1 * sigk1 + (1.0 - fun1) * sigk2
889 sigom = fun1 * sigom1 + (1.0 - fun1) * sigom2
893 g_w0= rho * gamma * (g(i)-(div(i)+denom/alp1)*extra_prod)
897 y_w = rho * beta * omega * omega
899 g_w = min(g_w0, 10.0*y_w)
903 s_w = (1.0 - fun1) * argcd
907 omgsrc(i,1,1,e) = g_w - y_w + s_w
909 mutsk(i,1,1,e) = mu_t * sigk
910 mutso(i,1,1,e) = mu_t * sigom
917 call copy (mu_omeg,rhoalpk,lxyz)
918 call cmult (mu_omeg,sigom1, lxyz)
919 call col4 (extra_src_omega,mu_omeg ,omwom
920 $ ,delsqf_omegb(1,1,1,e),lxyz)
923 call copy (tempv,delsqf_omegb(1,1,1,e),lxyz)
924 call cmult (tempv,mu,lxyz)
925 call col2 (tempv,f_omegb(1,1,1,e),lxyz)
926 call add2 (extra_src_omega, tempv,lxyz)
930 call col3 (term1,dfdx_omegb(1,1,1,e),k_x,lxyz)
931 call addcol3(term1,dfdy_omegb(1,1,1,e),k_y,lxyz)
933 $
call addcol3(term1,dfdz_omegb(1,1,1,e),k_z,lxyz)
937 call col3 (term2,omwom,delfsq_omegb(1,1,1,e), lxyz)
938 call col2 (term2 ,t(1,1,1,e,ifld_k-1),lxyz)
939 call cmult (term2,expm,lxyz)
940 call add3 (tempv, term1, term2, lxyz)
943 call col3 (term3 ,omwom,t(1,1,1,e,ifld_k-1),lxyz)
944 call invcol2(term3 ,f_omegb(1,1,1,e) ,lxyz)
945 call col3 (term4, dfdx_omegb(1,1,1,e),omp_x, lxyz)
946 call addcol3(term4, dfdy_omegb(1,1,1,e),omp_y, lxyz)
948 $
call addcol3(term4, dfdz_omegb(1,1,1,e),omp_z, lxyz)
949 call subcol3(tempv, term3, term4, lxyz)
951 call addcol3(extra_src_omega, rhoalpfr, tempv, lxyz)
954 call col3 (tempv,dfdx_omegb(1,1,1,e),vx(1,1,1,e),lxyz)
955 call addcol3(tempv,dfdy_omegb(1,1,1,e),vy(1,1,1,e),lxyz)
957 $
call addcol3(tempv,dfdz_omegb(1,1,1,e),vz(1,1,1,e),lxyz)
958 call col2 (tempv,vtrans(1,1,1,e,1),lxyz)
959 call admcol3(extra_src_omega,tempv,f_omegb(1,1,1,e),expm,lxyz)
961 call add2 (omgsrc(1,1,1,e), extra_src_omega ,lxyz)
965 if(loglevel.gt.2)
then
966 nome_neg =
iglsum(nome_neg,1)
967 nkey_neg =
iglsum(nkey_neg,1)
968 xome_neg =
glmin(xome_neg,1)
969 xkey_neg =
glmin(xkey_neg,1)
971 if(nid.eq.0 .and. nome_neg.gt.0)
972 $
write(*,*)
'Neg Omega ', nome_neg, xome_neg
973 if(nid.eq.0 .and. nkey_neg.gt.0)
974 $
write(*,*)
'Neg TKE ', nkey_neg, xkey_neg
989 parameter(lxyz=lx1*ly1*lz1)
991 real k_x(lxyz),k_y(lxyz),k_z(lxyz)
992 $ , o_x(lxyz),o_y(lxyz),o_z(lxyz)
993 $ ,omp_x(lxyz), omp_y(lxyz), omp_z(lxyz)
995 real tempv(lxyz), rhoalpk (lxyz)
996 $ ,omwom(lxyz), rhoalpfr(lxyz)
998 real term1(lxyz), term2 (lxyz)
999 $ ,term3(lxyz), term4 (lxyz)
1000 $ ,g (lxyz), div (lxyz)
1002 common /storesom/ st_mag2(lx1*ly1*lz1,lelv)
1003 $ , om_mag2(lx1*ly1*lz1,lelv)
1004 $ , oiojsk(lx1*ly1*lz1,lelv)
1005 $ , divq(lx1*ly1*lz1,lelv)
1008 real k,mu_t,nu_t,mu,nu, kv_min,omeg_max
1010 real mu_omeg(lxyz), mu_omegx(lxyz), mu_omegy(lxyz), mu_omegz(lxyz)
1011 real extra_src_omega(lxyz)
1021 alpinf_str = coeffs( 4)
1024 alp0_str = coeffs( 7)
1027 beta_str = coeffs( 8)
1028 alp_inf = coeffs( 9)
1033 alpha_0 = coeffs(12)
1040 omeg_max = coeffs(15)
1051 call comp_stom (st_mag2, om_mag2, oiojsk, divq)
1060 call copy (g, st_mag2(1,e), lxyz)
1061 call copy (div, divq(1,e), lxyz)
1063 call gradm11(k_x, k_y, k_z, t(1,1,1,1,ifld_k -1),e)
1064 call gradm11(omp_x,omp_y,omp_z,t(1,1,1,1,ifld_omega-1),e)
1080 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
1081 k = t(i,1,1,e,ifld_k -1)
1085 if (iflim_omeg.eq.0)
then
1086 if(t(i,1,1,e,ifld_omega-1).lt.0.0)
then
1088 xome_neg = min(xome_neg,t(i,1,1,e,ifld_omega-1))
1089 nome_neg = nome_neg + 1
1091 t(i,1,1,e,ifld_omega-1) =0.01*abs(t(i,1,1,e,ifld_omega-1))
1092 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
1095 if(t(i,1,1,e,ifld_k-1).lt.0.0)
then
1097 xkey_neg = min(xkey_neg,t(i,1,1,e,ifld_k-1))
1098 nkey_neg = nkey_neg + 1
1100 t(i,1,1,e,ifld_k-1) = 0.01*abs(t(i,1,1,e,ifld_k-1))
1101 k = t(i,1,1,e,ifld_k -1)
1104 elseif(iflim_omeg.eq.1)
then
1106 if(omega.lt.0.0)
then
1107 write(*,*)
'OMEG tot is neg', omega
1108 omega = 0.01*abs(omega)
1112 write(*,*)
'K is neg', k
1119 o_x(i)= omp_x(i)+expn * dfdx_omegb(i,1,1,e) *f_omegb(i,1,1,e)
1120 o_y(i)= omp_y(i)+expn * dfdy_omegb(i,1,1,e) *f_omegb(i,1,1,e)
1122 $ o_z(i)= omp_z(i)+expn * dfdz_omegb(i,1,1,e) *f_omegb(i,1,1,e)
1123 omwom(i)= 1.0/(1.0+t(i,1,1,e,ifld_omega-1)/f_omegb(i,1,1,e))
1130 st_magn = sqrt(st_mag2(i,e))
1131 om_magn = sqrt(om_mag2(i,e))
1132 sum_xx = oiojsk(i,e)
1137 xk = (k_x(i)*o_x(i) + k_y(i)*o_y(i) + k_z(i)*o_z(i))
1139 xk3= (k_x(i)*o_x(i) + k_y(i)*o_y(i) + k_z(i)*o_z(i))
1142 xk = (k_x(i)*o_x(i) + k_y(i)*o_y(i))
1144 xk3= (k_x(i)*o_x(i) + k_y(i)*o_y(i))
1150 re_t = rho * k /(mu * omega + tiny)
1151 alp_str = alpinf_str * (alp0_str + (re_t/r_k))
1153 rhoalpk(i)= rho*alp_str*k
1156 funcr = (1.0 - alp0_str) / (alp0_str + rtld)/(1.0 + rtld)
1157 factr = (1.0 + rtld * funcr)
1158 rhoalpfr(i) = expn * rho * alp_str * factr * omwom(i) * sigom1
1166 betai_str = beta_str * (akk + (re_t/r_b)**4)
1167 $ / (1.0 + (re_t/r_b)**4)
1172 f_beta_str = (1.0 + 680.0*xk3*xk3)/(1.0 + 400.0*xk3*xk3)
1176 alpha = (alp_inf/alp_str) *
1177 $ ((alpha_0 + (re_t/r_w))/(1.0 + (re_t/r_w)))
1179 gammai = alpha*alp_str
1183 x_w = abs((sum_xx)/(beta_str*omega + tiny)**3)
1185 if(if3d) f_b = (1.0 + 70.0*x_w)/(1.0 + 80.0*x_w)
1193 ywm1 = ywdm1(i,1,1,e)
1195 arg2_1 = sqrt(abs(k)) * ywm1 / omega / beta_str
1196 arg2_2 = 500.0*nu * ywm2 / omega
1197 arg2 = max(2.0*arg2_1, arg2_2)
1198 fun2 = tanh(arg2 * arg2)
1202 argcd = 2.0 * rho * sigom2 * xk
1203 cdkom = max(argcd, 1.0e-10)
1204 arg1_1 = max( arg2_1, arg2_2)
1205 arg1_2 = 4.0 * rho * sigom2 * k * ywm2 / cdkom
1206 arg1 = min( arg1_1, arg1_2)
1207 fun1 = tanh(arg1 * arg1 * arg1 * arg1)
1210 argn_1 = alp1*(omega + tiny) / alp_str
1211 argn_2 = fun2*st_magn
1214 denom = max(argn_1, argn_2)
1215 if(yw.ne.0) mu_t = rho * alp1 * k / denom
1220 y_k = rho * betai_str * f_beta_str * k * omega
1225 if(iflomach) extra_prod = twothird*div(i)
1226 g_k0= mu_t*g(i) - ( rho*k + mu_t*div(i) )*extra_prod
1227 g_k = min(g_k0, 10.*y_k)
1231 ksrc(i,1,1,e) = g_k - y_k
1235 beta = fun1 * betai + (1.0 - fun1) * beta2
1236 gamma = fun1 * gammai + (1.0 - fun1) * gamma2
1237 sigk = fun1 * sigk1 + (1.0 - fun1) * sigk2
1238 sigom = fun1 * sigom1 + (1.0 - fun1) * sigom2
1242 g_w0= rho * gamma * (g(i)-(div(i)+denom/alp1)*extra_prod)
1246 y_w = rho * beta * omega * omega
1248 g_w = min(g_w0, 10.0*y_w)
1252 s_w = (1.0 - fun1) * argcd
1256 omgsrc(i,1,1,e) = g_w - y_w + s_w
1258 mutsk(i,1,1,e) = mu_t * sigk
1259 mutso(i,1,1,e) = mu_t * sigom
1266 call copy (mu_omeg,rhoalpk,lxyz)
1267 call cmult (mu_omeg,sigom1, lxyz)
1268 call col4 (extra_src_omega,mu_omeg ,omwom
1269 $ ,delsqf_omegb(1,1,1,e),lxyz)
1272 call copy (tempv,delsqf_omegb(1,1,1,e),lxyz)
1273 call cmult (tempv,mu,lxyz)
1274 call col2 (tempv,f_omegb(1,1,1,e),lxyz)
1275 call add2 (extra_src_omega, tempv,lxyz)
1279 call col3 (term1,dfdx_omegb(1,1,1,e),k_x,lxyz)
1280 call addcol3(term1,dfdy_omegb(1,1,1,e),k_y,lxyz)
1282 $
call addcol3(term1,dfdz_omegb(1,1,1,e),k_z,lxyz)
1286 call col3 (term2,omwom,delfsq_omegb(1,1,1,e), lxyz)
1287 call col2 (term2 ,t(1,1,1,e,ifld_k-1),lxyz)
1288 call cmult (term2,expm,lxyz)
1289 call add3 (tempv, term1, term2, lxyz)
1292 call col3 (term3 ,omwom,t(1,1,1,e,ifld_k-1),lxyz)
1293 call invcol2(term3 ,f_omegb(1,1,1,e) ,lxyz)
1294 call col3 (term4, dfdx_omegb(1,1,1,e),omp_x, lxyz)
1295 call addcol3(term4, dfdy_omegb(1,1,1,e),omp_y, lxyz)
1297 $
call addcol3(term4, dfdz_omegb(1,1,1,e),omp_z, lxyz)
1298 call subcol3(tempv, term3, term4, lxyz)
1300 call addcol3(extra_src_omega, rhoalpfr, tempv, lxyz)
1303 call col3 (tempv,dfdx_omegb(1,1,1,e),vx(1,1,1,e),lxyz)
1304 call addcol3(tempv,dfdy_omegb(1,1,1,e),vy(1,1,1,e),lxyz)
1306 $
call addcol3(tempv,dfdz_omegb(1,1,1,e),vz(1,1,1,e),lxyz)
1307 call col2 (tempv,vtrans(1,1,1,e,1),lxyz)
1308 call admcol3(extra_src_omega,tempv,f_omegb(1,1,1,e),expm,lxyz)
1310 call add2 (omgsrc(1,1,1,e), extra_src_omega ,lxyz)
1314 if(loglevel.gt.2)
then
1315 nome_neg =
iglsum(nome_neg,1)
1316 nkey_neg =
iglsum(nkey_neg,1)
1317 xome_neg =
glmin(xome_neg,1)
1318 xkey_neg =
glmin(xkey_neg,1)
1320 if(nid.eq.0 .and. nome_neg.gt.0)
1321 $
write(*,*)
'Neg Omega ', nome_neg, xome_neg
1322 if(nid.eq.0 .and. nkey_neg.gt.0)
1323 $
write(*,*)
'Neg TKE ', nkey_neg, xkey_neg
1338 parameter(lxyz=lx1*ly1*lz1)
1340 real k_x(lxyz),k_y(lxyz),k_z(lxyz)
1341 $ , o_x(lxyz),o_y(lxyz),o_z(lxyz)
1342 $ ,omp_x(lxyz), omp_y(lxyz), omp_z(lxyz)
1344 real tempv(lxyz), rhoalpk (lxyz)
1345 $ ,omwom(lxyz), rhoalpfr(lxyz)
1347 real term1(lxyz), term2 (lxyz)
1348 $ ,term3(lxyz), term4 (lxyz)
1349 $ ,g (lxyz), div (lxyz)
1351 common /storesom/ st_mag2(lx1*ly1*lz1,lelv)
1352 $ , om_mag2(lx1*ly1*lz1,lelv)
1353 $ , oiojsk(lx1*ly1*lz1,lelv)
1354 $ , divq(lx1*ly1*lz1,lelv)
1357 real k,mu_t,nu_t,mu,nu, kv_min,omeg_max
1359 real mu_omeg(lxyz), mu_omegx(lxyz), mu_omegy(lxyz), mu_omegz(lxyz)
1360 real extra_src_omega(lxyz)
1364 sigma_k = coeffs( 2)
1365 sigma_omega = coeffs( 3)
1368 alpinf_str = coeffs( 4)
1371 alp0_str = coeffs( 7)
1374 betainf_str = coeffs( 8)
1375 alp_inf = coeffs( 9)
1380 alpha_0 = coeffs(12)
1387 omeg_max = coeffs(15)
1391 call comp_stom (st_mag2, om_mag2, oiojsk, divq)
1400 call copy (g, st_mag2(1,e), lxyz)
1401 call copy (div, divq(1,e), lxyz)
1404 call gradm11(k_x, k_y, k_z, t(1,1,1,1,ifld_k -1),e)
1405 call gradm11(omp_x,omp_y,omp_z,t(1,1,1,1,ifld_omega-1),e)
1421 omega = t(i,1,1,e,ifld_omega-1)
1422 k = t(i,1,1,e,ifld_k -1)
1426 if (iflim_omeg.eq.0)
then
1427 if(t(i,1,1,e,ifld_omega-1).lt.0.0)
then
1429 xome_neg = min(xome_neg,t(i,1,1,e,ifld_omega-1))
1430 nome_neg = nome_neg + 1
1432 t(i,1,1,e,ifld_omega-1) =0.01*abs(t(i,1,1,e,ifld_omega-1))
1433 omega = t(i,1,1,e,ifld_omega-1)
1436 if(t(i,1,1,e,ifld_k-1).lt.0.0)
then
1438 xkey_neg = min(xkey_neg,t(i,1,1,e,ifld_k-1))
1439 nkey_neg = nkey_neg + 1
1441 t(i,1,1,e,ifld_k-1) = 0.01*abs(t(i,1,1,e,ifld_k-1))
1442 k = t(i,1,1,e,ifld_k -1)
1445 elseif(iflim_omeg.eq.1)
then
1447 if(omega.lt.0.0)
then
1448 write(*,*)
'OMEG tot is neg', omega
1449 omega = 0.01*abs(omega)
1453 write(*,*)
'K is neg', k
1469 if(st_mag2(i,e).lt.0.)
write(*,*)
' St_mag2', i, e, st_mag2
1470 if(om_mag2(i,e).lt.0.)
write(*,*)
' Om_mag2', i, e, om_mag2
1471 st_magn = sqrt(st_mag2(i,e))
1472 om_magn = sqrt(om_mag2(i,e))
1473 sum_xx = oiojsk(i,e)
1479 xk3= (k_x(i)*o_x(i) + k_y(i)*o_y(i) + k_z(i)*o_z(i))
1482 xk3= (k_x(i)*o_x(i) + k_y(i)*o_y(i))
1486 alp_str = alpinf_str
1487 mu_t = rho * alp_str*k/(omega + tiny)
1495 betai_str = betainf_str
1500 f_beta_str = (1.0 + 680.0*xk3*xk3)/(1.0 + 400.0*xk3*xk3)
1502 y_k = rho * betai_str * f_beta_str * k * omega
1507 if(iflomach) extra_prod = twothird*div(i)
1508 g_k0= mu_t*g(i) - ( rho*k + mu_t*div(i) )*extra_prod
1509 g_k = min(g_k0, 10.*y_k)
1513 ksrc(i,1,1,e) = g_k - y_k
1516 alpha = (alp_inf/alp_str)
1519 g_w0 = alpha*alp_str*rho*(g(i)-(omega+div(i))*extra_prod)
1525 x_w = abs((sum_xx)/(betainf_str*omega + tiny)**3)
1527 if(if3d) f_b = (1.0 + 70.0*x_w)/(1.0 + 80.0*x_w)
1529 y_w = rho*beta*f_b * omega * omega
1531 g_w = min(g_w0, 10.0*y_w)
1532 omgsrc(i,1,1,e) = g_w - y_w
1535 mutsk(i,1,1,e) = mu_t / sigma_k
1536 mutso(i,1,1,e) = mu_t / sigma_omega
1541 if(loglevel.gt.2)
then
1542 nome_neg =
iglsum(nome_neg,1)
1543 nkey_neg =
iglsum(nkey_neg,1)
1544 xome_neg =
glmin(xome_neg,1)
1545 xkey_neg =
glmin(xkey_neg,1)
1547 if(nid.eq.0 .and. nome_neg.gt.0)
1548 $
write(*,*)
'Neg Omega ', nome_neg, xome_neg
1549 if(nid.eq.0 .and. nkey_neg.gt.0)
1550 $
write(*,*)
'Neg TKE ', nkey_neg, xkey_neg
1557 $ ,coeffs_in,wall_id,ywd_in,model_id)
1568 & w1(lx1*ly1*lz1*lelv)
1569 &,w2(lx1*ly1*lz1*lelv)
1570 &,w3(lx1*ly1*lz1*lelv)
1571 &,w4(lx1*ly1*lz1*lelv)
1572 &,w5(lx1*ly1*lz1*lelv)
1574 integer n,wall_id,ifld_mx
1575 real coeffs_in(1),ywd_in(1)
1579 character*36 mname(6)
1582 &/
'regularized standard k-omega '
1583 &,
'regularized low-Re k-omega '
1584 &,
'regularized standard k-omega SST '
1585 &,
'regularized low-Re k-omega SST '
1586 &,
'non-regularized standard k-omega '
1587 &,
'non-regularized standard k-omega SST'/
1591 if(nid.eq.0)
write(6,*)
'init RANS model'
1594 if(nid.eq.0)
write(6,*)
1595 &
"ERROR: K-OMEGA NOT SUPPORTED WITH LOW MACH FORMULATION"
1599 ifrans_komg_stndrd = .false.
1600 ifrans_komg_lowre = .false.
1601 ifrans_komgsst_stndrd = .false.
1602 ifrans_komgsst_lowre = .false.
1603 ifrans_komg_stndrd_noreg = .false.
1604 if(model_id .eq.0) ifrans_komg_stndrd = .true.
1605 if(model_id .eq.1) ifrans_komg_lowre = .true.
1606 if(model_id .eq.2) ifrans_komgsst_stndrd = .true.
1607 if(model_id .eq.3) ifrans_komgsst_lowre = .true.
1608 if(model_id .eq.4) ifrans_komg_stndrd_noreg = .true.
1610 if(nid.eq.0)
write(*,
'(a,a)')
1611 &
' model: ',mname(model_id+1)
1613 ifld_omega = ifld_omega_in
1614 ifld_mx=max(ifld_k,ifld_omega)
1615 if (ifld_mx.gt.ldimt1)
1616 $
call exitti(
'nflds gt ldimt+1, recompile with ldimt > ',
1627 coeffs(i) =coeffs_in(i)
1630 if(ifrans_komg_stndrd .or. ifrans_komg_lowre .or.
1632 if(ifrans_komgsst_stndrd .or. ifrans_komgsst_lowre)
1637 if(wall_id.eq.0)
then
1638 if(nid.eq.0)
write(6,*)
' user supplied wall distance'
1639 call copy(ywd,ywd_in,n)
1643 if(nid.eq.0)
write(6,*)
'BC for distance ',bcw
1644 if(wall_id.eq.1)
call cheap_dist(ywd,ifld,bcw)
1645 if(wall_id.eq.2)
call distf(ywd,ifld,bcw,w1,w2,w3,w4,w5)
1646 call copy(ywd_in,ywd,n)
1651 if(nid.eq.0)
write(6,*)
'done :: init RANS'
1664 parameter(nprof_max = 10000)
1668 real kv_min,omeg_max
1670 omeg_max = coeffs(15)
1672 nu = param(2)/param(1)
1673 ntot1 = nx1*ny1*nz1*nelv
1675 betainf_str = coeffs(11)
1676 yw_min =
glmin(ywd,ntot1)
1678 cfcon = 6.0 * nu / beta0
1681 call gradm1 (dfdx_omegb,dfdy_omegb,dfdz_omegb, ywd)
1682 call opcolv (dfdx_omegb,dfdy_omegb,dfdz_omegb, bm1)
1683 call opdssum(dfdx_omegb,dfdy_omegb,dfdz_omegb)
1684 call opcolv (dfdx_omegb,dfdy_omegb,dfdz_omegb,binvm1)
1698 call rzero (delsqf_omegb, ntot1)
1699 call rone (delfsq_omegb, ntot1)
1708 ywmin=sqrt(cfcon/omeg_max)
1709 if(yw.gt.ywmin)
then
1712 if(yw.ne.0)
write(*,
'(a,3G14.7,4I5)')
1713 $
'ywmin and yw ',ywmin,yw,omeg_max, i, j, k, ieg
1716 ywdm1(i,j,k,e) = ywm1
1721 f_omegb(i,j,k,e) = cfcon * ywm2
1722 delfpart = expn * ywm1
1723 dfdx_omegb(i,j,k,e) = dfdx_omegb(i,j,k,e) * ywm1
1724 dfdy_omegb(i,j,k,e) = dfdy_omegb(i,j,k,e) * ywm1
1725 dfdz_omegb(i,j,k,e) = dfdz_omegb(i,j,k,e) * ywm1
1726 delsqfpart = expn * (expn - 1.0) * ywm2
1727 delsqf_omegb(i,j,k,e) =(delsqfpart * delfsq_omegb(i,j,k,e)
1728 $ + delfpart * delsqf_omegb(i,j,k,e))
1729 delfsq_omegb(i,j,k,e) = delfsq_omegb(i,j,k,e)* ywm2
1755 coeffs( 2) = sigma_k
1757 coeffs( 3) = sigma_omega
1763 coeffs( 4) = alpinf_str
1768 alp0_str = beta_0/3.0
1769 coeffs( 7) = alp0_str
1773 coeffs( 8) = betainf_str
1777 coeffs( 9) = alp_inf
1785 coeffs(12) = alpha_0
1795 coeffs(15) = omeg_max
1826 coeffs( 4) = alpinf_str
1831 alp0_str = beta_0/3.0
1832 coeffs( 7) = alp0_str
1836 coeffs( 8) = betainf_str
1837 alp_inf = beta_0/betainf_str
1838 $ - sigom1 * vkappa**2/sqrt(betainf_str)
1840 coeffs( 9) = alp_inf
1848 coeffs(12) = alpha_0
1858 coeffs(15) = omeg_max
1871 gamma2 = beta2/betainf_str
1872 $ - sigom2 * vkappa**2/sqrt(betainf_str)
1888 parameter(lxyz=lx1*ly1*lz1)
1891 real k,mu_t,nu_t,mu,nu, kv_min,omeg_max
1895 sigma_k = coeffs( 2)
1896 sigma_omega = coeffs( 3)
1899 alpinf_str = coeffs( 4)
1902 alp0_str = coeffs( 7)
1905 betainf_str = coeffs( 8)
1906 alp_inf = coeffs( 9)
1911 alpha_0 = coeffs(12)
1918 omeg_max = coeffs(15)
1938 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
1939 k = t(i,1,1,e,ifld_k -1)
1943 if (iflim_omeg.eq.0)
then
1944 if(t(i,1,1,e,ifld_omega-1).lt.0.0)
then
1946 xome_neg = min(xome_neg,t(i,1,1,e,ifld_omega-1))
1947 nome_neg = nome_neg + 1
1949 t(i,1,1,e,ifld_omega-1) =0.01*abs(t(i,1,1,e,ifld_omega-1))
1950 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
1953 if(t(i,1,1,e,ifld_k-1).lt.0.0)
then
1955 xkey_neg = min(xkey_neg,t(i,1,1,e,ifld_k-1))
1956 nkey_neg = nkey_neg + 1
1958 t(i,1,1,e,ifld_k-1) = 0.01*abs(t(i,1,1,e,ifld_k-1))
1959 k = t(i,1,1,e,ifld_k -1)
1962 elseif(iflim_omeg.eq.1)
then
1964 if(omega.lt.0.0)
then
1965 write(*,*)
'OMEG tot is neg', omega
1966 omega = 0.01*abs(omega)
1970 write(*,*)
'K is neg', k
1976 alp_str = alpinf_str
1977 mu_t = rho * alp_str*k/(omega + tiny)
1980 mutsk(i,1,1,e) = mu_t / sigma_k
1981 mutso(i,1,1,e) = mu_t / sigma_omega
1986 if(loglevel.gt.2)
then
1987 nome_neg =
iglsum(nome_neg,1)
1988 nkey_neg =
iglsum(nkey_neg,1)
1989 xome_neg =
glmin(xome_neg,1)
1990 xkey_neg =
glmin(xkey_neg,1)
1992 if(nid.eq.0 .and. nome_neg.gt.0)
1993 $
write(*,*)
'Neg Omega ', nome_neg, xome_neg
1994 if(nid.eq.0 .and. nkey_neg.gt.0)
1995 $
write(*,*)
'Neg TKE ', nkey_neg, xkey_neg
2010 parameter(lxyz=lx1*ly1*lz1)
2013 real k,mu_t,nu_t,mu,nu, kv_min,omeg_max
2017 sigma_k = coeffs( 2)
2018 sigma_omega = coeffs( 3)
2021 alpinf_str = coeffs( 4)
2024 alp0_str = coeffs( 7)
2027 betainf_str = coeffs( 8)
2028 alp_inf = coeffs( 9)
2033 alpha_0 = coeffs(12)
2040 omeg_max = coeffs(15)
2060 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
2061 k = t(i,1,1,e,ifld_k -1)
2065 if (iflim_omeg.eq.0)
then
2066 if(t(i,1,1,e,ifld_omega-1).lt.0.0)
then
2068 xome_neg = min(xome_neg,t(i,1,1,e,ifld_omega-1))
2069 nome_neg = nome_neg + 1
2071 t(i,1,1,e,ifld_omega-1) =0.01*abs(t(i,1,1,e,ifld_omega-1))
2072 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
2075 if(t(i,1,1,e,ifld_k-1).lt.0.0)
then
2077 xkey_neg = min(xkey_neg,t(i,1,1,e,ifld_k-1))
2078 nkey_neg = nkey_neg + 1
2080 t(i,1,1,e,ifld_k-1) = 0.01*abs(t(i,1,1,e,ifld_k-1))
2081 k = t(i,1,1,e,ifld_k -1)
2084 elseif(iflim_omeg.eq.1)
then
2086 if(omega.lt.0.0)
then
2087 write(*,*)
'OMEG tot is neg', omega
2088 omega = 0.01*abs(omega)
2092 write(*,*)
'K is neg', k
2098 re_t = rho * k /(mu * omega + tiny)
2099 alp_str = alpinf_str * (alp0_str + (re_t/r_k))
2101 mu_t = rho * alp_str*k/(omega + tiny)
2104 mutsk(i,1,1,e) = mu_t / sigma_k
2105 mutso(i,1,1,e) = mu_t / sigma_omega
2110 if(loglevel.gt.2)
then
2111 nome_neg =
iglsum(nome_neg,1)
2112 nkey_neg =
iglsum(nkey_neg,1)
2113 xome_neg =
glmin(xome_neg,1)
2114 xkey_neg =
glmin(xkey_neg,1)
2116 if(nid.eq.0 .and. nome_neg.gt.0)
2117 $
write(*,*)
'Neg Omega ', nome_neg, xome_neg
2118 if(nid.eq.0 .and. nkey_neg.gt.0)
2119 $
write(*,*)
'Neg TKE ', nkey_neg, xkey_neg
2134 parameter(lxyz=lx1*ly1*lz1)
2136 real k_x(lxyz),k_y(lxyz),k_z(lxyz)
2137 $ , o_x(lxyz),o_y(lxyz),o_z(lxyz)
2138 $ ,omp_x(lxyz), omp_y(lxyz), omp_z(lxyz)
2140 common /storesom/ st_mag2(lx1*ly1*lz1,lelv)
2141 $ , om_mag2(lx1*ly1*lz1,lelv)
2142 $ , oiojsk(lx1*ly1*lz1,lelv)
2143 $ , divq(lx1*ly1*lz1,lelv)
2146 real k,mu_t,nu_t,mu,nu, kv_min,omeg_max
2156 alpinf_str = coeffs( 4)
2159 alp0_str = coeffs( 7)
2162 beta_str = coeffs( 8)
2168 alpha_0 = coeffs(12)
2175 omeg_max = coeffs(15)
2186 call comp_stom (st_mag2, om_mag2, oiojsk, divq)
2195 call gradm11(k_x, k_y, k_z, t(1,1,1,1,ifld_k -1),e)
2196 call gradm11(omp_x,omp_y,omp_z,t(1,1,1,1,ifld_omega-1),e)
2207 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
2208 k = t(i,1,1,e,ifld_k -1)
2212 if (iflim_omeg.eq.0)
then
2213 if(t(i,1,1,e,ifld_omega-1).lt.0.0)
then
2215 xome_neg = min(xome_neg,t(i,1,1,e,ifld_omega-1))
2216 nome_neg = nome_neg + 1
2218 t(i,1,1,e,ifld_omega-1) =0.01*abs(t(i,1,1,e,ifld_omega-1))
2219 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
2222 if(t(i,1,1,e,ifld_k-1).lt.0.0)
then
2224 xkey_neg = min(xkey_neg,t(i,1,1,e,ifld_k-1))
2225 nkey_neg = nkey_neg + 1
2227 t(i,1,1,e,ifld_k-1) = 0.01*abs(t(i,1,1,e,ifld_k-1))
2228 k = t(i,1,1,e,ifld_k -1)
2231 elseif(iflim_omeg.eq.1)
then
2233 if(omega.lt.0.0)
then
2234 write(*,*)
'OMEG tot is neg', omega
2235 omega = 0.01*abs(omega)
2239 write(*,*)
'K is neg', k
2246 o_x(i)= omp_x(i)+expn * dfdx_omegb(i,1,1,e) *f_omegb(i,1,1,e)
2247 o_y(i)= omp_y(i)+expn * dfdy_omegb(i,1,1,e) *f_omegb(i,1,1,e)
2249 $ o_z(i)= omp_z(i)+expn * dfdz_omegb(i,1,1,e) *f_omegb(i,1,1,e)
2251 st_magn = sqrt(st_mag2(i,e))
2252 om_magn = sqrt(om_mag2(i,e))
2257 xk = (k_x(i)*o_x(i) + k_y(i)*o_y(i) + k_z(i)*o_z(i))
2260 xk = (k_x(i)*o_x(i) + k_y(i)*o_y(i))
2267 ywm1 = ywdm1(i,1,1,e)
2269 arg2_1 = sqrt(abs(k)) * ywm1 / omega / beta_str
2270 arg2_2 = 500.0*nu * ywm2 / omega
2271 arg2 = max(2.0*arg2_1, arg2_2)
2272 fun2 = tanh(arg2 * arg2)
2276 argcd = 2.0 * rho * sigom2 * xk
2277 cdkom = max(argcd, 1.0e-10)
2278 arg1_1 = max( arg2_1, arg2_2)
2279 arg1_2 = 4.0 * rho * sigom2 * k * ywm2 / cdkom
2280 arg1 = min( arg1_1, arg1_2)
2281 fun1 = tanh(arg1 * arg1 * arg1 * arg1)
2284 argn_1 = alp1*(omega + tiny)
2285 argn_2 = fun2*st_magn
2288 denom = max(argn_1, argn_2)
2289 if(yw.ne.0) mu_t = rho * alp1 * k / denom
2291 sigk = fun1 * sigk1 + (1.0 - fun1) * sigk2
2292 sigom = fun1 * sigom1 + (1.0 - fun1) * sigom2
2295 mutsk(i,1,1,e) = mu_t * sigk
2296 mutso(i,1,1,e) = mu_t * sigom
2302 if(loglevel.gt.2)
then
2303 nome_neg =
iglsum(nome_neg,1)
2304 nkey_neg =
iglsum(nkey_neg,1)
2305 xome_neg =
glmin(xome_neg,1)
2306 xkey_neg =
glmin(xkey_neg,1)
2308 if(nid.eq.0 .and. nome_neg.gt.0)
2309 $
write(*,*)
'Neg Omega ', nome_neg, xome_neg
2310 if(nid.eq.0 .and. nkey_neg.gt.0)
2311 $
write(*,*)
'Neg TKE ', nkey_neg, xkey_neg
2326 parameter(lxyz=lx1*ly1*lz1)
2328 real k_x(lxyz),k_y(lxyz),k_z(lxyz)
2329 $ , o_x(lxyz),o_y(lxyz),o_z(lxyz)
2330 $ ,omp_x(lxyz), omp_y(lxyz), omp_z(lxyz)
2332 common /storesom/ st_mag2(lx1*ly1*lz1,lelv)
2333 $ , om_mag2(lx1*ly1*lz1,lelv)
2334 $ , oiojsk(lx1*ly1*lz1,lelv)
2335 $ , divq(lx1*ly1*lz1,lelv)
2338 real k,mu_t,nu_t,mu,nu, kv_min,omeg_max
2348 alpinf_str = coeffs( 4)
2351 alp0_str = coeffs( 7)
2354 beta_str = coeffs( 8)
2355 alp_inf = coeffs( 9)
2360 alpha_0 = coeffs(12)
2367 omeg_max = coeffs(15)
2378 call comp_stom (st_mag2, om_mag2, oiojsk, divq)
2387 call gradm11(k_x, k_y, k_z, t(1,1,1,1,ifld_k -1),e)
2388 call gradm11(omp_x,omp_y,omp_z,t(1,1,1,1,ifld_omega-1),e)
2399 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
2400 k = t(i,1,1,e,ifld_k -1)
2404 if (iflim_omeg.eq.0)
then
2405 if(t(i,1,1,e,ifld_omega-1).lt.0.0)
then
2407 xome_neg = min(xome_neg,t(i,1,1,e,ifld_omega-1))
2408 nome_neg = nome_neg + 1
2410 t(i,1,1,e,ifld_omega-1) =0.01*abs(t(i,1,1,e,ifld_omega-1))
2411 omega = t(i,1,1,e,ifld_omega-1) + f_omegb(i,1,1,e)
2414 if(t(i,1,1,e,ifld_k-1).lt.0.0)
then
2416 xkey_neg = min(xkey_neg,t(i,1,1,e,ifld_k-1))
2417 nkey_neg = nkey_neg + 1
2419 t(i,1,1,e,ifld_k-1) = 0.01*abs(t(i,1,1,e,ifld_k-1))
2420 k = t(i,1,1,e,ifld_k -1)
2423 elseif(iflim_omeg.eq.1)
then
2425 if(omega.lt.0.0)
then
2426 write(*,*)
'OMEG tot is neg', omega
2427 omega = 0.01*abs(omega)
2431 write(*,*)
'K is neg', k
2438 o_x(i)= omp_x(i)+expn * dfdx_omegb(i,1,1,e) *f_omegb(i,1,1,e)
2439 o_y(i)= omp_y(i)+expn * dfdy_omegb(i,1,1,e) *f_omegb(i,1,1,e)
2441 $ o_z(i)= omp_z(i)+expn * dfdz_omegb(i,1,1,e) *f_omegb(i,1,1,e)
2443 st_magn = sqrt(st_mag2(i,e))
2444 om_magn = sqrt(om_mag2(i,e))
2449 xk = (k_x(i)*o_x(i) + k_y(i)*o_y(i) + k_z(i)*o_z(i))
2452 xk = (k_x(i)*o_x(i) + k_y(i)*o_y(i))
2458 re_t = rho * k /(mu * omega + tiny)
2459 alp_str = alpinf_str * (alp0_str + (re_t/r_k))
2466 ywm1 = ywdm1(i,1,1,e)
2468 arg2_1 = sqrt(abs(k)) * ywm1 / omega / beta_str
2469 arg2_2 = 500.0*nu * ywm2 / omega
2470 arg2 = max(2.0*arg2_1, arg2_2)
2471 fun2 = tanh(arg2 * arg2)
2475 argcd = 2.0 * rho * sigom2 * xk
2476 cdkom = max(argcd, 1.0e-10)
2477 arg1_1 = max( arg2_1, arg2_2)
2478 arg1_2 = 4.0 * rho * sigom2 * k * ywm2 / cdkom
2479 arg1 = min( arg1_1, arg1_2)
2480 fun1 = tanh(arg1 * arg1 * arg1 * arg1)
2483 argn_1 = alp1*(omega + tiny) / alp_str
2484 argn_2 = fun2*st_magn
2487 denom = max(argn_1, argn_2)
2488 if(yw.ne.0) mu_t = rho * alp1 * k / denom
2490 sigk = fun1 * sigk1 + (1.0 - fun1) * sigk2
2491 sigom = fun1 * sigom1 + (1.0 - fun1) * sigom2
2494 mutsk(i,1,1,e) = mu_t * sigk
2495 mutso(i,1,1,e) = mu_t * sigom
2501 if(loglevel.gt.2)
then
2502 nome_neg =
iglsum(nome_neg,1)
2503 nkey_neg =
iglsum(nkey_neg,1)
2504 xome_neg =
glmin(xome_neg,1)
2505 xkey_neg =
glmin(xkey_neg,1)
2507 if(nid.eq.0 .and. nome_neg.gt.0)
2508 $
write(*,*)
'Neg Omega ', nome_neg, xome_neg
2509 if(nid.eq.0 .and. nkey_neg.gt.0)
2510 $
write(*,*)
'Neg TKE ', nkey_neg, xkey_neg
2525 parameter(lxyz=lx1*ly1*lz1)
2528 real k,mu_t,nu_t,mu,nu, kv_min,omeg_max
2532 sigma_k = coeffs( 2)
2533 sigma_omega = coeffs( 3)
2536 alpinf_str = coeffs( 4)
2539 alp0_str = coeffs( 7)
2542 betainf_str = coeffs( 8)
2543 alp_inf = coeffs( 9)
2548 alpha_0 = coeffs(12)
2555 omeg_max = coeffs(15)
2574 omega = t(i,1,1,e,ifld_omega-1)
2575 k = t(i,1,1,e,ifld_k -1)
2579 if (iflim_omeg.eq.0)
then
2580 if(t(i,1,1,e,ifld_omega-1).lt.0.0)
then
2582 xome_neg = min(xome_neg,t(i,1,1,e,ifld_omega-1))
2583 nome_neg = nome_neg + 1
2585 t(i,1,1,e,ifld_omega-1) =0.01*abs(t(i,1,1,e,ifld_omega-1))
2586 omega = t(i,1,1,e,ifld_omega-1)
2589 if(t(i,1,1,e,ifld_k-1).lt.0.0)
then
2591 xkey_neg = min(xkey_neg,t(i,1,1,e,ifld_k-1))
2592 nkey_neg = nkey_neg + 1
2594 t(i,1,1,e,ifld_k-1) = 0.01*abs(t(i,1,1,e,ifld_k-1))
2595 k = t(i,1,1,e,ifld_k -1)
2598 elseif(iflim_omeg.eq.1)
then
2600 if(omega.lt.0.0)
then
2601 write(*,*)
'OMEG tot is neg', omega
2602 omega = 0.01*abs(omega)
2606 write(*,*)
'K is neg', k
2612 alp_str = alpinf_str
2613 mu_t = rho * alp_str*k/(omega + tiny)
2616 mutsk(i,1,1,e) = mu_t / sigma_k
2617 mutso(i,1,1,e) = mu_t / sigma_omega
2622 if(loglevel.gt.2)
then
2623 nome_neg =
iglsum(nome_neg,1)
2624 nkey_neg =
iglsum(nkey_neg,1)
2625 xome_neg =
glmin(xome_neg,1)
2626 xkey_neg =
glmin(xkey_neg,1)
2628 if(nid.eq.0 .and. nome_neg.gt.0)
2629 $
write(*,*)
'Neg Omega ', nome_neg, xome_neg
2630 if(nid.eq.0 .and. nkey_neg.gt.0)
2631 $
write(*,*)
'Neg TKE ', nkey_neg, xkey_neg
2648 parameter(lt =lx1*ly1*lz1*lelv)
2649 parameter(lxyz=lx1*ly1*lz1)
2651 common /scruz/ sij(lx1*ly1*lz1,6,lelv)
2652 $ , oij(lx1*ly1*lz1,lelv,3)
2654 real St_mag2(lx1*ly1*lz1,lelv)
2655 $ , om_mag2(lx1*ly1*lz1,lelv)
2656 $ , oiojsk(lx1*ly1*lz1,lelv)
2657 $ , divq(lx1*ly1*lz1,lelv)
2659 logical iflmc, ifdss
2666 if (if3d.or.ifaxis) nij=6
2668 if(nid.eq.0 .and. loglevel.gt.2)
write(*,*)
'updating StOm '
2669 call comp_sij_oij (sij, oij, nij, vx, vy, vz, iflmc, ifdss)
2673 call add3 (divq(1,e), sij(1,1,e), sij(1,2,e), lxyz)
2675 $
call add2 (divq(1,e), sij(1,3,e), lxyz)
2676 if(iflmc)
call cmult(divq(1,e), thqrt, lxyz)
2691 logical iflmc, ifdss
2693 parameter(lt =lx1*ly1*lz1*lelv)
2694 parameter(lxyz=lx1*ly1*lz1)
2696 real sij(lx1*ly1*lz1,nij,lelv), oij(lx1*ly1*lz1,lelv,3)
2697 real u (lx1*ly1*lz1,lelv)
2698 real v (lx1*ly1*lz1,lelv)
2699 real w (lx1*ly1*lz1,lelv)
2701 real ur(lxyz),us(lxyz),ut(lxyz)
2702 $ ,vr(lxyz),vs(lxyz),vt(lxyz)
2703 $ ,wr(lxyz),ws(lxyz),wt(lxyz)
2721 $ 2*(ur(i)*rxm1(i,1,1,e)+us(i)*sxm1(i,1,1,e)+ut(i)*txm1(i,1,1,e))
2724 $ 2*(vr(i)*rym1(i,1,1,e)+vs(i)*sym1(i,1,1,e)+vt(i)*tym1(i,1,1,e))
2727 $ 2*(wr(i)*rzm1(i,1,1,e)+ws(i)*szm1(i,1,1,e)+wt(i)*tzm1(i,1,1,e))
2730 $ (ur(i)*rym1(i,1,1,e)+us(i)*sym1(i,1,1,e)+ut(i)*tym1(i,1,1,e) +
2731 $ vr(i)*rxm1(i,1,1,e)+vs(i)*sxm1(i,1,1,e)+vt(i)*txm1(i,1,1,e) )
2733 $ (vr(i)*rxm1(i,1,1,e)+vs(i)*sxm1(i,1,1,e)+vt(i)*txm1(i,1,1,e) -
2734 $ ur(i)*rym1(i,1,1,e)+us(i)*sym1(i,1,1,e)+ut(i)*tym1(i,1,1,e) )
2737 $ (wr(i)*rym1(i,1,1,e)+ws(i)*sym1(i,1,1,e)+wt(i)*tym1(i,1,1,e) +
2738 $ vr(i)*rzm1(i,1,1,e)+vs(i)*szm1(i,1,1,e)+vt(i)*tzm1(i,1,1,e) )
2740 $ (wr(i)*rym1(i,1,1,e)+ws(i)*sym1(i,1,1,e)+wt(i)*tym1(i,1,1,e) -
2741 $ vr(i)*rzm1(i,1,1,e)+vs(i)*szm1(i,1,1,e)+vt(i)*tzm1(i,1,1,e) )
2744 $ (ur(i)*rzm1(i,1,1,e)+us(i)*szm1(i,1,1,e)+ut(i)*tzm1(i,1,1,e) +
2745 $ wr(i)*rxm1(i,1,1,e)+ws(i)*sxm1(i,1,1,e)+wt(i)*txm1(i,1,1,e) )
2747 $ (ur(i)*rzm1(i,1,1,e)+us(i)*szm1(i,1,1,e)+ut(i)*tzm1(i,1,1,e) -
2748 $ wr(i)*rxm1(i,1,1,e)+ws(i)*sxm1(i,1,1,e)+wt(i)*txm1(i,1,1,e) )
2754 elseif (ifaxis)
then
2777 $ 2*(ur(i)*rxm1(i,1,1,e)+us(i)*sxm1(i,1,1,e))
2780 $ 2*(vr(i)*rym1(i,1,1,e)+vs(i)*sym1(i,1,1,e))
2783 sij(i,3,e) = 2.*v(i,e)/r
2786 $ 2*(vr(i)*rym1(i,1,1,e)+vs(i)*sym1(i,1,1,e))
2790 $ ( ur(i)*rym1(i,1,1,e)+us(i)*sym1(i,1,1,e) +
2791 $ vr(i)*rxm1(i,1,1,e)+vs(i)*sxm1(i,1,1,e) )
2793 $ ( vr(i)*rxm1(i,1,1,e)+vs(i)*sxm1(i,1,1,e) -
2794 $ ur(i)*rym1(i,1,1,e)+us(i)*sym1(i,1,1,e) )
2798 $ ( wr(i)*rym1(i,1,1,e)+ws(i)*sym1(i,1,1,e) )
2801 $ ( wr(i)*rym1(i,1,1,e)+ws(i)*sym1(i,1,1,e) )
2806 $ 2*(wr(i)*rym1(i,1,1,e)+ws(i)*sym1(i,1,1,e))
2810 $ ( wr(i)*rxm1(i,1,1,e)+ws(i)*sxm1(i,1,1,e) )
2812 $ (-wr(i)*rxm1(i,1,1,e)-ws(i)*sxm1(i,1,1,e) )
2827 $ 2*(ur(i)*rxm1(i,1,1,e)+us(i)*sxm1(i,1,1,e))
2831 $ 2*(vr(i)*rym1(i,1,1,e)+vs(i)*sym1(i,1,1,e))
2835 $ (ur(i)*rym1(i,1,1,e)+us(i)*sym1(i,1,1,e) +
2836 $ vr(i)*rxm1(i,1,1,e)+vs(i)*sxm1(i,1,1,e) )
2838 $ (vr(i)*rxm1(i,1,1,e)+vs(i)*sxm1(i,1,1,e) -
2839 $ ur(i)*rym1(i,1,1,e)+us(i)*sym1(i,1,1,e) )
2845 if(iflomach .and. iflmc)
then
2848 if(if3d .or. ifaxis)
then
2851 trs = sij(i,1,e) + sij(i,2,e) + sij(i,3,e)
2852 sij(i,1,e) = sij(i,1,e) - onethird*trs
2858 trs = sij(i,1,e) + sij(i,2,e)
2859 sij(i,1,e) = sij(i,1,e) - onethird*trs
2881 parameter(lt =lx1*ly1*lz1*lelv)
2882 parameter(lxyz=lx1*ly1*lz1)
2884 real sij(lx1*ly1*lz1,nij,lelv), oij(lx1*ly1*lz1,lelv,3)
2886 common /scrsij/ work1(lx1*ly1*lz1,lelv), work2(lx1*ly1*lz1,lelv)
2887 $ , work3(lx1*ly1*lz1,lelv)
2892 if (if3d .or. ifaxis)
then
2893 call opcolv (oij(1,1,1), oij(1,1,2), oij(1,1,3), bm1)
2894 call opdssum (oij(1,1,1), oij(1,1,2), oij(1,1,3) )
2895 call opcolv (oij(1,1,1), oij(1,1,2), oij(1,1,3),binvm1)
2897 call copy (work1(1,e), sij(1,1,e),nxyz)
2898 call copy (work2(1,e), sij(1,2,e),nxyz)
2899 call copy (work3(1,e), sij(1,3,e),nxyz)
2901 call opcolv (work1, work2, work3, bm1)
2902 call opdssum (work1, work2, work3 )
2903 call opcolv (work1, work2, work3,binvm1)
2905 call copy (sij(1,1,e),work1(1,e), nxyz)
2906 call copy (sij(1,2,e),work2(1,e), nxyz)
2907 call copy (sij(1,3,e),work3(1,e), nxyz)
2910 call copy (work1(1,e), sij(1,4,e),nxyz)
2911 call copy (work2(1,e), sij(1,5,e),nxyz)
2912 call copy (work3(1,e), sij(1,6,e),nxyz)
2914 call opcolv (work1, work2, work3, bm1)
2915 call opdssum (work1, work2, work3 )
2916 call opcolv (work1, work2, work3,binvm1)
2918 call copy (sij(1,4,e),work1(1,e), nxyz)
2919 call copy (sij(1,5,e),work2(1,e), nxyz)
2920 call copy (sij(1,6,e),work3(1,e), nxyz)
2923 call col2 (oij(1,1,1),bm1 ,ntot)
2924 call dssum (oij(1,1,1),lx1,ly1,lz1)
2925 call col2 (oij(1,1,1),binvm1,ntot)
2927 call copy (work1(1,e), sij(1,1,e),nxyz)
2928 call copy (work2(1,e), sij(1,2,e),nxyz)
2929 call copy (work3(1,e), sij(1,3,e),nxyz)
2931 call opcolv (work1, work2, work3, bm1)
2932 call opdssum (work1, work2, work3 )
2933 call opcolv (work1, work2, work3,binvm1)
2935 call copy (sij(1,1,e),work1(1,e), nxyz)
2936 call copy (sij(1,2,e),work2(1,e), nxyz)
2937 call copy (sij(1,3,e),work3(1,e), nxyz)
2955 parameter(lt =lx1*ly1*lz1*lelv)
2956 parameter(lxyz=lx1*ly1*lz1)
2958 real sij(lx1*ly1*lz1,nij,lelv), oij(lx1*ly1*lz1,lelv,3)
2960 real St_mag2(lx1*ly1*lz1,lelv)
2961 $ , om_mag2(lx1*ly1*lz1,lelv)
2962 $ , oiojsk(lx1*ly1*lz1,lelv)
2964 common /scrsij/ work1(lx1*ly1*lz1,lelv), work2(lx1*ly1*lz1,lelv)
2965 $ , work3(lx1*ly1*lz1,lelv)
2966 real tmp1(lxyz), tmp2(lxyz), tmp3(lxyz)
2974 beta = onehalf-onethird
2976 if (if3d .or. ifaxis)
then
2979 call col3 (st_mag2(1,e), sij(1,1,e), sij(1,1,e),nxyz)
2980 call addcol3 (st_mag2(1,e), sij(1,2,e), sij(1,2,e),nxyz)
2981 call addcol3 (st_mag2(1,e), sij(1,3,e), sij(1,3,e),nxyz)
2982 call col3 (work1(1,e), sij(1,4,e), sij(1,4,e),nxyz)
2983 call addcol3 (work1(1,e), sij(1,5,e), sij(1,5,e),nxyz)
2984 call addcol3 (work1(1,e), sij(1,6,e), sij(1,6,e),nxyz)
2985 call add2s2 (st_mag2(1,e), work1(1,e), two, nxyz)
2987 call col3 (work1(1,e), oij(1,e,1), oij(1,e,1),nxyz)
2988 call col3 (work2(1,e), oij(1,e,2), oij(1,e,2),nxyz)
2989 call col3 (work3(1,e), oij(1,e,3), oij(1,e,3),nxyz)
2990 call add4 (om_mag2(1,e), work1(1,e), work2(1,e)
2991 $ , work3(1,e),nxyz)
2993 call add3 (tmp1, work2(1,e), work3(1,e), nxyz)
2994 call add3 (tmp2, work1(1,e), work3(1,e), nxyz)
2995 call add3 (tmp3, work1(1,e), work2(1,e), nxyz)
2996 call col3 (oiojsk(1,e),tmp1, sij(1,1,e), nxyz)
2997 call addcol3 (oiojsk(1,e),tmp2, sij(1,2,e), nxyz)
2998 call addcol3 (oiojsk(1,e),tmp3, sij(1,3,e), nxyz)
3000 call col4 (tmp1, oij(1,e,1), oij(1,e,2), sij(1,4,e), nxyz)
3001 call addcol4 (tmp1, oij(1,e,2), oij(1,e,3), sij(1,5,e), nxyz)
3002 call subcol4 (tmp1, oij(1,e,1), oij(1,e,3), sij(1,6,e), nxyz)
3003 call add2s2 (oiojsk(1,e), tmp1, two, nxyz)
3010 call col3 (st_mag2(1,e), sij(1,1,e), sij(1,1,e),nxyz)
3011 call addcol3 (st_mag2(1,e), sij(1,2,e), sij(1,2,e),nxyz)
3012 call col3 (work1(1,e), sij(1,3,e), sij(1,3,e),nxyz)
3013 call add2s2 (st_mag2(1,e), work1(1,e), two, nxyz)
3015 call col3 (om_mag2(1,e), oij(1,e,1), oij(1,e,1),nxyz)
3016 call rzero (oiojsk(1,e), nxyz)
3021 call cmult (st_mag2, onehalf, ntot)
subroutine exitti(stringi, idata)
subroutine dssum(u, nx, ny, nz)
subroutine col3(a, b, c, n)
subroutine invcol2(a, b, n)
subroutine addcol3(a, b, c, n)
subroutine admcol3(a, b, c, d, n)
subroutine add2s2(a, b, c1, n)
subroutine addcol4(a, b, c, d, n)
subroutine add3(a, b, c, n)
subroutine col4(a, b, c, d, n)
subroutine add4(a, b, c, d, n)
subroutine subcol3(a, b, c, n)
subroutine subcol4(a, b, c, d, n)
subroutine cmult(a, const, n)
subroutine opdssum(a, b, c)
subroutine opcolv(a1, a2, a3, c)
subroutine gradm11(ux, uy, uz, u, e)
subroutine cheap_dist(d, ifld, b)
subroutine local_grad2(ur, us, u, N, e, D, Dt)
subroutine local_grad3(ur, us, ut, u, N, e, D, Dt)
subroutine distf(d, ifld, b, dmin, emin, xn, yn, zn)
subroutine gradm1(ux, uy, uz, u)
subroutine rans_komgsst_lowre_compute
real function rans_komg_ksrc(ix, iy, iz, iel)
subroutine rans_komg_lowre_eddy
subroutine rans_komg_lowre_compute
subroutine rans_komg_init(ifld_k_in, ifld_omega_in, ifcoeffs, coeffs_in, wall_id, ywd_in, model_id)
real function rans_komg_mutsk(ix, iy, iz, iel)
subroutine rans_komg_stndrd_compute
real function rans_komg_mut(ix, iy, iz, iel)
subroutine rans_komgsst_lowre_eddy
subroutine rans_komgsst_stndrd_compute
subroutine rans_komg_getcoeffs(coeffs_in)
real function rans_komg_omgsrc(ix, iy, iz, iel)
subroutine comp_sij_oij_mag2(sij, oij, nij, St_mag2, Om_mag2, OiOjSk)
subroutine rans_komg_stndrd_eddy
subroutine comp_sij_oij(sij, oij, nij, u, v, w, iflmc, ifdss)
real function rans_komg_mutso(ix, iy, iz, iel)
subroutine rans_komgsst_stndrd_eddy
subroutine dssum_sij_oij(sij, oij, nij)
subroutine comp_stom(St_mag2, Om_mag2, OiOjSk, DivQ)
subroutine rans_komgsst_set_defaultcoeffs
subroutine rans_komg_set_defaultcoeffs
subroutine rans_komg_omegabase
subroutine rans_komg_stndrd_compute_noreg
subroutine rans_komg_stndrd_eddy_noreg
subroutine setaxdy(ifaxdy)