42 use json_module,
only : json_file
57 character(len=:),
allocatable :: test_filter_type
87 type(
coef_t),
intent(in) :: coef
88 type(json_file),
intent(inout) :: json
89 character(len=:),
allocatable :: nut_name
91 character(len=:),
allocatable :: delta_type
97 call this%init_base(
dofmap, coef, nut_name, delta_type)
98 this%test_filter_type =
"nonBoyd"
100 call this%test_filter%init(
dofmap%xh%lx, this%test_filter_type)
103 call this%c_dyn%init(
dofmap,
"ds_c_dyn")
104 call this%num%init(
dofmap,
"ds_num")
105 call this%den%init(
dofmap,
"ds_den")
108 call this%mij(i)%init(
dofmap)
109 call this%lij(i)%init(
dofmap)
119 call this%c_dyn%free()
121 call this%mij(i)%free()
122 call this%lij(i)%free()
126 call this%test_filter%free()
127 call this%free_base()
136 real(kind=
rp),
intent(in) :: t
137 integer,
intent(in) :: tstep
140 call neko_error(
"Dynamic Smagorinsky model not implemented on &
144 this%delta, this%c_dyn, this%test_filter, &
145 this%mij, this%lij, this%num, this%den)
155 if (filter_1d%nx .le. 2)
then
156 call neko_error(
"Dynamic Smagorinsky model error: test filter is not &
157 &defined for the current polynomial order")
159 if (mod(filter_1d%nx,2) .eq. 0)
then
161 filter_1d%trnsfr(int((filter_1d%nx)/2)) = 0.95_rp
162 filter_1d%trnsfr(int((filter_1d%nx)/2) + 1) = 0.50_rp
163 filter_1d%trnsfr(int((filter_1d%nx)/2) + 2) = 0.05_rp
164 if ((int((filter_1d%nx)/2) + 2) .lt. filter_1d%nx)
then
165 do i = int((filter_1d%nx)/2) + 3, filter_1d%nx
166 filter_1d%trnsfr(i) = 0.0_rp
170 filter_1d%nt = int(filter_1d%nx/2) + 1
173 filter_1d%trnsfr(int((filter_1d%nx-1)/2)) = 0.95_rp
174 filter_1d%trnsfr(int((filter_1d%nx-1)/2) + 1) = 0.50_rp
175 filter_1d%trnsfr(int((filter_1d%nx-1)/2) + 2) = 0.05_rp
176 if ((int((filter_1d%nx-1)/2) + 2) .lt. filter_1d%nx)
then
177 do i = int((filter_1d%nx-1)/2) + 3, filter_1d%nx
178 filter_1d%trnsfr(i) = 0.0_rp
182 filter_1d%nt = int((filter_1d%nx-1)/2) + 1
185 call filter_1d%build_1d()
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Retrieves a parameter by name or throws an error.
Defines a mapping of the degrees of freedom.
Implements the CPU kernel for the smagorinsky_t type.
subroutine, public dynamic_smagorinsky_compute_cpu(t, tstep, coef, nut, delta, c_dyn, test_filter, mij, lij, num, den)
Compute eddy viscosity on the CPU.
Implements dynamic_smagorinsky_t.
subroutine set_ds_filt(filter_1d)
Set up the test filter.
subroutine dynamic_smagorinsky_init(this, dofmap, coef, json)
Constructor.
subroutine dynamic_smagorinsky_free(this)
Destructor for the les_model_t (base) class.
subroutine dynamic_smagorinsky_compute(this, t, tstep)
Compute eddy viscosity.
Implements explicit_filter_t.
Utilities for retrieving parameters from the case files.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Implements the dynamic Smagorinsky LES model.
Implements the explicit filter for SEM.
field_list_t, To be able to group fields together
Base abstract type for LES models based on the Boussinesq approximation.