58 real(kind=
rp),
intent(in) :: t
59 integer,
intent(in) :: tstep
60 type(
coef_t),
intent(in) :: coef
61 type(
field_t),
intent(inout) :: nut
62 type(
field_t),
intent(in) :: delta
63 real(kind=
rp),
intent(in) :: c_s
64 type(
field_t),
pointer :: u, v, w
66 type(
field_t),
pointer :: s11, s22, s33, s12, s13, s23
67 real(kind=
rp) :: s_abs
68 integer :: temp_indices(6)
83 call strain_rate(s11%x, s22%x, s33%x, s12%x, s13%x, s23%x, u, v, w, coef)
92 do concurrent(i = 1:s11%dof%size())
93 s11%x(i,1,1,1) = s11%x(i,1,1,1) * coef%mult(i,1,1,1)
94 s22%x(i,1,1,1) = s22%x(i,1,1,1) * coef%mult(i,1,1,1)
95 s33%x(i,1,1,1) = s33%x(i,1,1,1) * coef%mult(i,1,1,1)
96 s12%x(i,1,1,1) = s12%x(i,1,1,1) * coef%mult(i,1,1,1)
97 s13%x(i,1,1,1) = s13%x(i,1,1,1) * coef%mult(i,1,1,1)
98 s23%x(i,1,1,1) = s23%x(i,1,1,1) * coef%mult(i,1,1,1)
101 do concurrent(e = 1:coef%msh%nelv)
102 do concurrent(i = 1:coef%Xh%lxyz)
103 s_abs = sqrt(2.0_rp * (s11%x(i,1,1,e)*s11%x(i,1,1,e) + &
104 s22%x(i,1,1,e)*s22%x(i,1,1,e) + &
105 s33%x(i,1,1,e)*s33%x(i,1,1,e)) + &
106 4.0_rp * (s12%x(i,1,1,e)*s12%x(i,1,1,e) + &
107 s13%x(i,1,1,e)*s13%x(i,1,1,e) + &
108 s23%x(i,1,1,e)*s23%x(i,1,1,e)))
110 nut%x(i,1,1,e) = c_s**2 * delta%x(i,1,1,e)**2 * s_abs
Defines a registry for storing solution fields.
type(field_registry_t), target, public neko_field_registry
Global field registry.
Defines Gather-scatter operations.
integer, parameter, public gs_op_add
integer, parameter, public rp
Global precision used in computations.
subroutine, public strain_rate(s11, s22, s33, s12, s13, s23, u, v, w, coef)
Compute the strain rate tensor, i.e 0.5 * du_i/dx_j + du_j/dx_i.
Defines a registry for storing and requesting temporary fields This can be used when you have a funct...
type(scratch_registry_t), target, public neko_scratch_registry
Global scratch registry.
Implements the CPU kernel for the smagorinsky_t type.
subroutine, public smagorinsky_compute_cpu(t, tstep, coef, nut, delta, c_s)
Compute eddy viscosity on the CPU.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
field_list_t, To be able to group fields together