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
65 type(
field_t),
pointer :: a11, a12, a13, a21, a22, a23, a31, a32, a33
66 type(
field_t),
pointer :: u, v, w
68 real(kind=
rp) :: beta11
69 real(kind=
rp) :: beta12
70 real(kind=
rp) :: beta13
71 real(kind=
rp) :: beta22
72 real(kind=
rp) :: beta23
73 real(kind=
rp) :: beta33
74 real(kind=
rp) :: b_beta
75 real(kind=
rp) :: aijaij
76 integer :: temp_indices(9)
95 call dudxyz (a11%x, u%x, coef%drdx, coef%dsdx, coef%dtdx, coef)
96 call dudxyz (a12%x, u%x, coef%drdy, coef%dsdy, coef%dtdy, coef)
97 call dudxyz (a13%x, u%x, coef%drdz, coef%dsdz, coef%dtdz, coef)
99 call dudxyz (a21%x, v%x, coef%drdx, coef%dsdx, coef%dtdx, coef)
100 call dudxyz (a22%x, v%x, coef%drdy, coef%dsdy, coef%dtdy, coef)
101 call dudxyz (a23%x, v%x, coef%drdz, coef%dsdz, coef%dtdz, coef)
103 call dudxyz (a31%x, w%x, coef%drdx, coef%dsdx, coef%dtdx, coef)
104 call dudxyz (a32%x, w%x, coef%drdy, coef%dsdy, coef%dtdy, coef)
105 call dudxyz (a33%x, w%x, coef%drdz, coef%dsdz, coef%dtdz, coef)
107 do e=1, coef%msh%nelv
110 beta11 = a11%x(i,1,1,e)**2 + a21%x(i,1,1,e)**2 + a31%x(i,1,1,e)**2
111 beta22 = a12%x(i,1,1,e)**2 + a22%x(i,1,1,e)**2 + a32%x(i,1,1,e)**2
112 beta33 = a13%x(i,1,1,e)**2 + a23%x(i,1,1,e)**2 + a33%x(i,1,1,e)**2
113 beta12 = a11%x(i,1,1,e)*a12%x(i,1,1,e) + &
114 a21%x(i,1,1,e)*a22%x(i,1,1,e) + &
115 a31%x(i,1,1,e)*a32%x(i,1,1,e)
116 beta13 = a11%x(i,1,1,e)*a13%x(i,1,1,e) + &
117 a21%x(i,1,1,e)*a23%x(i,1,1,e) + &
118 a31%x(i,1,1,e)*a33%x(i,1,1,e)
119 beta23 = a12%x(i,1,1,e)*a13%x(i,1,1,e) + &
120 a22%x(i,1,1,e)*a23%x(i,1,1,e) + &
121 a32%x(i,1,1,e)*a33%x(i,1,1,e)
123 b_beta = beta11*beta22 - beta12*beta12 + beta11*beta33 - beta13*beta13 &
124 + beta22*beta33 - beta23*beta23
126 b_beta =
max(0.0_rp, b_beta)
129 aijaij = beta11 + beta22 + beta33
131 nut%x(i,1,1,e) = c*delta%x(i,1,1,e) * sqrt(b_beta/(aijaij +
neko_eps))
Defines a registry for storing solution fields.
type(field_registry_t), target, public neko_field_registry
Global field registry.
subroutine, public cadd(a, s, n)
Add a scalar to vector .
real(kind=rp), parameter, public neko_eps
Machine epsilon .
integer, parameter, public rp
Global precision used in computations.
subroutine, public dudxyz(du, u, dr, ds, dt, coef)
Compute derivative of a scalar field along a single direction.
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 vreman_t type.
subroutine, public vreman_compute_cpu(t, tstep, coef, nut, delta, c)
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