38 use json_module,
only : json_file
67 real(kind=
rp) :: kappa = 0.41_rp
69 real(kind=
rp) :: c = 7.8_rp
71 real(kind=
rp) :: b1 = 11.0_rp
73 real(kind=
rp) :: b2 = 3.0_rp
89 procedure, pass(this) :: init_from_components => &
108 character(len=*),
intent(in) :: scheme_name
109 type(
coef_t),
intent(in) :: coef
110 integer,
intent(in) :: msk(:)
111 integer,
intent(in) :: facet(:)
112 type(json_file),
intent(inout) :: json
113 real(kind=
rp) :: kappa, c, b1, b2
122 call this%init_from_components(scheme_name, coef, msk, facet, sampler, &
132 type(
coef_t),
intent(in) :: coef
133 character(len=*),
intent(in) :: scheme_name
134 type(json_file),
intent(inout) :: json
135 character(len=LOG_SIZE) :: log_buf
137 call this%partial_init_base(coef, scheme_name, json)
144 write(log_buf,
'(A)')
'Model : Reichardt'
146 write(log_buf,
'(A, E15.7)')
'kappa : ', this%kappa
148 write(log_buf,
'(A, E15.7)')
'C : ', this%C
150 write(log_buf,
'(A, E15.7)')
'B1 : ', this%B1
152 write(log_buf,
'(A, E15.7)')
'B2 : ', this%B2
165 integer,
intent(in) :: msk(:)
166 integer,
intent(in) :: facet(:)
167 character(len=*),
optional,
intent(in) :: bc_name
168 type(
user_t),
target,
optional,
intent(in) :: user
170 call this%finalize_base(msk, facet, bc_name,
user)
171 call this%nu%init(this%n_nodes)
172 call this%rho_w%init(this%n_nodes)
173 call this%validate_single_sample()
174 call this%u_s%init(this%n_nodes)
175 call this%v_s%init(this%n_nodes)
176 call this%w_s%init(this%n_nodes)
191 facet, sampler, kappa, C, B1, B2)
193 character(len=*),
intent(in) :: scheme_name
194 type(
coef_t),
intent(in) :: coef
195 integer,
intent(in) :: msk(:)
196 integer,
intent(in) :: facet(:)
198 real(kind=
rp),
intent(in) :: kappa, c, b1, b2
201 call this%init_base(scheme_name, coef, msk, facet, sampler)
208 call this%nu%init(this%n_nodes)
209 call this%rho_w%init(this%n_nodes)
210 call this%validate_single_sample()
211 call this%u_s%init(this%n_nodes)
212 call this%v_s%init(this%n_nodes)
213 call this%w_s%init(this%n_nodes)
227 temp%size(), this%nu%size())
229 this%msk_d, this%rho%size(), this%rho_w%size())
234 this%rho%size(), this%rho_w%size())
245 call this%rho_w%free()
249 call this%free_base()
258 real(kind=
rp),
intent(in) :: t
259 integer,
intent(in) :: tstep
264 call this%compute_nu()
270 call this%sampler%sample(u, this%u_s)
271 call this%sampler%sample(v, this%v_s)
272 call this%sampler%sample(w, this%w_s)
277 this%n_x%x_d, this%n_y%x_d, this%n_z%x_d, &
278 this%nu%x_d, this%rho_w%x_d, this%sampler%h%x_d, &
279 this%tau_x%x_d, this%tau_y%x_d, this%tau_z%x_d, &
280 this%n_nodes, this%kappa, this%C, this%B1, this%B2, tstep)
283 this%n_x%x, this%n_y%x, this%n_z%x, &
284 this%nu%x, this%rho_w%x, this%sampler%h%x, &
285 this%tau_x%x, this%tau_y%x, this%tau_z%x, &
286 this%n_nodes, this%kappa, this%C, this%B1, this%B2, tstep)
subroutine, public device_masked_gather_copy_0(a_d, b_d, mask_d, n, n_mask, strm)
Gather a masked vector .
subroutine, public field_invcol3(a, b, c, n)
Invert a vector .
Utilities for retrieving parameters from the case files.
type(log_t), public neko_log
Global log stream.
integer, parameter, public log_size
subroutine, public masked_gather_copy_0(a, b, mask, n, n_mask)
Gather a masked vector to reduced contigous vector .
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
Defines a registry for storing solution fields.
type(registry_t), target, public neko_registry
Global field registry.
Implements the CPU kernel for the reichardt_t type.
subroutine, public reichardt_compute_cpu(u, v, w, n_x, n_y, n_z, nu, rho_w, h, tau_x, tau_y, tau_z, n_nodes, kappa, c, b1, b2, tstep)
Compute the wall shear stress on cpu using Reichardt's law.
Implements the device kernel for the reichardt_t type.
subroutine, public reichardt_compute_device(u_d, v_d, w_d, n_x_d, n_y_d, n_z_d, nu_d, rho_w_d, h_d, tau_x_d, tau_y_d, tau_z_d, n_nodes, kappa, c, b1, b2, tstep)
Compute the wall shear stress on device using Reichardt's law.
subroutine reichardt_init(this, scheme_name, coef, msk, facet, json)
Constructor from JSON.
subroutine reichardt_partial_init(this, coef, scheme_name, json)
Constructor from JSON.
subroutine reichardt_compute(this, t, tstep)
Compute the wall shear stress.
subroutine reichardt_init_from_components(this, scheme_name, coef, msk, facet, sampler, kappa, c, b1, b2)
Constructor from components.
subroutine reichardt_finalize(this, msk, facet, bc_name, user)
Finalize the construction using the mask and facet arrays of the bc.
subroutine reichardt_compute_nu(this)
Compute the kinematic viscosity vector.
subroutine reichardt_free(this)
Destructor for the reichardt_t class.
Defines a registry for storing and requesting temporary objects This can be used when you have a func...
type(scratch_registry_t), target, public neko_scratch_registry
Global scratch registry.
Interfaces for user interaction with NEKO.
Factory for wall-model samplers.
subroutine, public wall_sampler_factory(object, json)
Wall sampler factory.
Defines the abstract interface for wall-model field samplers.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Wall model based on Reichardt's law of the wall, , with the original constants , and as defaults....
A type collecting all the overridable user routines and flag to suppress type injection from custom m...
Base abstract type for wall-stress models for wall-modelled LES.
Base type for sampling solution fields at points associated with wall nodes. Samples belonging to one...