38 use json_module,
only : json_file
62 real(kind=
rp) :: kappa = 0.41_rp
64 real(kind=
rp) :: b = 5.2_rp
66 real(kind=
rp) :: p = 1.138_rp
68 real(kind=
rp) :: s = 217.8_rp
82 procedure, pass(this) :: init_from_components => &
87 procedure, pass(this) :: compute_nu_and_rho => &
103 character(len=*),
intent(in) :: scheme_name
104 type(
coef_t),
intent(in) :: coef
105 integer,
intent(in) :: msk(:)
106 integer,
intent(in) :: facet(:)
107 type(json_file),
intent(inout) :: json
108 real(kind=
rp) :: kappa, b, p, s
117 call this%init_from_components(scheme_name, coef, msk, facet, sampler, &
126 type(
coef_t),
intent(in) :: coef
127 character(len=*),
intent(in) :: scheme_name
128 type(json_file),
intent(inout) :: json
129 call this%partial_init_base(coef, scheme_name, json)
141 integer,
intent(in) :: msk(:)
142 integer,
intent(in) :: facet(:)
143 character(len=*),
optional,
intent(in) :: bc_name
144 type(
user_t),
target,
optional,
intent(in) :: user
146 call this%finalize_base(msk, facet, bc_name,
user)
147 call this%nu%init(this%n_nodes)
148 call this%rho_w%init(this%n_nodes)
149 call this%validate_single_sample()
150 call this%u_s%init(this%n_nodes)
151 call this%v_s%init(this%n_nodes)
152 call this%w_s%init(this%n_nodes)
166 msk, facet, sampler, kappa, B, p, s)
168 character(len=*),
intent(in) :: scheme_name
169 type(
coef_t),
intent(in) :: coef
170 integer,
intent(in) :: msk(:)
171 integer,
intent(in) :: facet(:)
173 real(kind=
rp),
intent(in) :: kappa, b, p, s
176 call this%init_base(scheme_name, coef, msk, facet, sampler)
183 call this%nu%init(this%n_nodes)
184 call this%rho_w%init(this%n_nodes)
185 call this%validate_single_sample()
186 call this%u_s%init(this%n_nodes)
187 call this%v_s%init(this%n_nodes)
188 call this%w_s%init(this%n_nodes)
202 temp%size(), this%nu%size())
204 this%msk_d, this%rho%size(), this%rho_w%size())
209 this%rho%size(), this%rho_w%size())
219 call this%rho_w%free()
224 call this%free_base()
232 real(kind=
rp),
intent(in) :: t
233 integer,
intent(in) :: tstep
238 call this%compute_nu_and_rho()
244 call this%sampler%sample(u, this%u_s)
245 call this%sampler%sample(v, this%v_s)
246 call this%sampler%sample(w, this%w_s)
251 this%n_x%x_d, this%n_y%x_d, this%n_z%x_d, this%nu%x_d, &
252 this%rho_w%x_d, this%sampler%h%x_d, this%tau_x%x_d, &
254 this%tau_z%x_d, this%n_nodes, this%kappa, this%B, &
258 this%w_s%x, this%n_x%x, this%n_y%x, &
259 this%n_z%x, this%nu%x, this%rho_w%x, this%sampler%h%x, &
261 this%tau_y%x, this%tau_z%x, this%n_nodes, &
262 this%kappa, this%B, this%p, this%s)
__global__ void cai_sagaut_model_ii_compute(const T *__restrict__ u_d, const T *__restrict__ v_d, const T *__restrict__ w_d, const T *__restrict__ n_x_d, const T *__restrict__ n_y_d, const T *__restrict__ n_z_d, const T *__restrict__ nu_d, const T *__restrict__ rho_w_d, const T *__restrict__ h_d, T *__restrict__ tau_x_d, T *__restrict__ tau_y_d, T *__restrict__ tau_z_d, const int n_nodes, const T kappa, const T B, const T p, const T s)
CPU backend for cai_sagaut_model_ii_t.
subroutine, public cai_sagaut_model_ii_compute_cpu(u, v, w, n_x, n_y, n_z, nu, rho_w, h, tau_x, tau_y, tau_z, n_nodes, kappa, b, p, s)
Evaluate wall shear stresses with the CPU Model-II kernel.
Device dispatch for cai_sagaut_model_ii_t.
subroutine, public cai_sagaut_model_ii_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, b, p, s)
Evaluate the device wall-model kernel for Model-II.
Implements cai_sagaut_model_ii_t.
subroutine cai_sagaut_model_ii_compute_nu_and_rho(this)
Gather viscosity and density values at the wall-model points.
subroutine cai_sagaut_model_ii_finalize(this, msk, facet, bc_name, user)
Finalise allocation of derived data structures.
subroutine cai_sagaut_model_ii_init_from_components(this, scheme_name, coef, msk, facet, sampler, kappa, b, p, s)
Initialise the wall model from explicit components.
subroutine cai_sagaut_model_ii_free(this)
Destructor.
subroutine cai_sagaut_model_ii_init(this, scheme_name, coef, msk, facet, json)
Initialise the wall model from the case file.
subroutine cai_sagaut_model_ii_partial_init(this, coef, scheme_name, json)
Partially initialise the wall model from the case file.
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.
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.
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.
Explicit wall model based on Model-II from Cai and Sagaut (2021).
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
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...