37 use,
intrinsic :: iso_c_binding, only : c_ptr
57 procedure, pass(this) :: init_wall_model_bc => &
66 integer,
intent(in) :: n
67 real(kind=
rp),
intent(inout),
dimension(n) :: x
68 real(kind=
rp),
intent(in),
optional :: t
69 integer,
intent(in),
optional :: tstep
71 call neko_error(
"The wall model bc is not applicable to scalar fields.")
79 integer,
intent(in) :: n
80 real(kind=
rp),
intent(inout),
dimension(n) :: x
81 real(kind=
rp),
intent(inout),
dimension(n) :: y
82 real(kind=
rp),
intent(inout),
dimension(n) :: z
83 real(kind=
rp),
intent(in),
optional :: t
84 integer,
intent(in),
optional :: tstep
85 integer :: i, m, k, fid
86 real(kind=
rp) :: magtau
88 call this%wall_model%compute(t, tstep)
91 magtau = sqrt(this%wall_model%tau_x(i)**2 + this%wall_model%tau_y(i)**2&
92 + this%wall_model%tau_z(i)**2)
95 this%wall_model%tau_field%x(this%wall_model%ind_r(i), &
96 this%wall_model%ind_s(i), &
97 this%wall_model%ind_t(i), &
98 this%wall_model%ind_e(i)) = -1.0_rp
99 this%wall_model%tau_field%x(this%msk(i),1,1,1) = magtau
102 call this%shear_stress_t%set_stress(this%wall_model%tau_x, &
103 this%wall_model%tau_z)
104 call this%shear_stress_t%apply_vector(x, y, z, n, t, tstep)
113 real(kind=
rp),
intent(in),
optional :: t
114 integer,
intent(in),
optional :: tstep
116 call neko_error(
"wall_model_bc bc not implemented on the device")
127 real(kind=
rp),
intent(in),
optional :: t
128 integer,
intent(in),
optional :: tstep
130 call neko_error(
"wall_model_bc bc not implemented on the device")
138 type(
coef_t),
target,
intent(in) :: coef
140 call this%shear_stress_t%init_shear_stress(coef)
144 end module wall_model_bc
__device__ void nonlinear_index(const int idx, const int lx, int *index)
Defines a boundary condition.
integer, parameter, public rp
Global precision used in computations.
Implements rough_log_law_t.
Defines a shear stress boundary condition for a vector field.
Defines the wall_model_bc_t type.
subroutine wall_model_bc_apply_scalar(this, x, n, t, tstep)
Apply shear stress for a scalar field x.
subroutine wall_model_bc_init_wall_model_bc(this, coef)
Constructor.
subroutine wall_model_bc_apply_scalar_dev(this, x_d, t, tstep)
Boundary condition apply for a generic wall_model_bc condition to a vector x (device version)
subroutine wall_model_bc_apply_vector(this, x, y, z, n, t, tstep)
Boundary condition apply for a generic wall_model_bc condition to vectors x, y and z.
subroutine wall_model_bc_apply_vector_dev(this, x_d, y_d, z_d, t, tstep)
Boundary condition apply for a generic wall_model_bc condition to vectors x, y and z (device version)
Base type for a boundary condition.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Wall model based on the log-law for a rough wall. The formula defining the law is ....
A shear stress boundary condition.
Wall model based on Spalding's law of the wall. Reference: http://dx.doi.org/10.1115/1....
Base abstract type for wall-stress models for wall-modelled LES.
A shear stress boundary condition, computing the stress values using a wall model.