68 ind_e, n_x, n_y, n_z, nu, rho_w, h, tau_x, tau_y, tau_z, n_nodes, &
69 lx, nelv, kappa, B, p, s)
70 integer,
intent(in) :: n_nodes, lx, nelv
71 real(kind=
rp),
dimension(lx, lx, lx, nelv),
intent(in) :: u, v, w
72 real(kind=
rp),
dimension(n_nodes),
intent(in) :: rho_w
73 integer,
intent(in),
dimension(n_nodes) :: ind_r, ind_s, ind_t, ind_e
74 real(kind=
rp),
dimension(n_nodes),
intent(in) :: n_x, n_y, n_z, h, nu
75 real(kind=
rp),
dimension(n_nodes),
intent(out) :: tau_x, tau_y, tau_z
76 real(kind=
rp),
intent(in) :: kappa, b, p, s
78 real(kind=
rp) :: ui, vi, wi, magu, utau, normu, rho
79 real(kind=
rp) :: rey, e_const, blend, up, warg
81 e_const = exp(kappa * b)
84 ui = u(ind_r(i), ind_s(i), ind_t(i), ind_e(i))
85 vi = v(ind_r(i), ind_s(i), ind_t(i), ind_e(i))
86 wi = w(ind_r(i), ind_s(i), ind_t(i), ind_e(i))
89 normu = ui * n_x(i) + vi * n_y(i) + wi * n_z(i)
91 ui = ui - normu * n_x(i)
92 vi = vi - normu * n_y(i)
93 wi = wi - normu * n_z(i)
95 magu = sqrt(ui**2 + vi**2 + wi**2)
104 rey = magu * h(i) / nu(i)
105 blend = exp(-((rey / s) ** p))
106 warg = kappa * e_const * rey
107 up = blend * sqrt(rey) + (1.0_rp - blend) *
lambert_w0(warg, 1) / kappa
110 tau_x(i) = -rho * utau**2 * ui / (magu +
neko_eps)
111 tau_y(i) = -rho * utau**2 * vi / (magu +
neko_eps)
112 tau_z(i) = -rho * utau**2 * wi / (magu +
neko_eps)
subroutine, public cai_sagaut_model_ii_compute_cpu(u, v, w, ind_r, ind_s, ind_t, ind_e, n_x, n_y, n_z, nu, rho_w, h, tau_x, tau_y, tau_z, n_nodes, lx, nelv, kappa, b, p, s)
Evaluate wall shear stresses with the CPU Model-II kernel.
pure real(kind=rp) function, public lambert_w0(x, niter)
Approximate the principal real branch of the Lambert W function for non-negative real x.