38    use, 
intrinsic :: iso_c_binding, only : c_ptr
 
   45    use json_module, 
only : json_file
 
   58       procedure, pass(this) :: apply_scalar_dev => &
 
   60       procedure, pass(this) :: apply_vector_dev => &
 
   62       procedure, pass(this) :: init_wall_model_bc => &
 
 
   71      integer, 
intent(in) :: n
 
   72      real(kind=
rp), 
intent(inout),  
dimension(n) :: x
 
   73      real(kind=
rp), 
intent(in), 
optional :: t
 
   74      integer, 
intent(in), 
optional :: tstep
 
   76      call neko_error(
"The wall model bc is not applicable to scalar fields.")
 
 
   89      integer, 
intent(in) :: n
 
   90      real(kind=
rp), 
intent(inout),  
dimension(n) :: x
 
   91      real(kind=
rp), 
intent(inout),  
dimension(n) :: y
 
   92      real(kind=
rp), 
intent(inout),  
dimension(n) :: z
 
   93      real(kind=
rp), 
intent(in), 
optional :: t
 
   94      integer, 
intent(in), 
optional :: tstep
 
   95      integer :: i, m, k, fid
 
   96      real(kind=
rp) :: magtau
 
   99      call this%wall_model%compute(t, tstep)
 
  102      do i = 1, this%msk(0)
 
  103        magtau = sqrt(this%wall_model%tau_x(i)**2 + this%wall_model%tau_y(i)**2&
 
  104                      + this%wall_model%tau_z(i)**2)
 
  107        this%wall_model%tau_field%x(this%wall_model%ind_r(i), &
 
  108                                    this%wall_model%ind_s(i), &
 
  109                                    this%wall_model%ind_t(i), &
 
  110                                    this%wall_model%ind_e(i)) = -1.0_rp
 
  111        this%wall_model%tau_field%x(this%msk(i),1,1,1) = magtau
 
  116      call this%set_stress(this%wall_model%tau_x, this%wall_model%tau_y, &
 
  117           this%wall_model%tau_z)
 
  120      call this%shear_stress_t%apply_vector(x, y, z, n, t, tstep)
 
 
  129      real(kind=
rp), 
intent(in), 
optional :: t
 
  130      integer, 
intent(in), 
optional :: tstep
 
  132      call neko_error(
"wall_model_bc bc not implemented on the device")
 
 
  143      real(kind=
rp), 
intent(in), 
optional :: t
 
  144      integer, 
intent(in), 
optional :: tstep
 
  146      call neko_error(
"wall_model_bc bc not implemented on the device")
 
 
  154      type(json_file), 
intent(inout) :: json
 
  155      real(kind=
rp), 
intent(in) :: nu
 
  157      call this%shear_stress_t%init_shear_stress(this%coef)
 
  159      call wall_model_factory(this%wall_model, this%coef, this%msk, &
 
  160           this%facet, nu, json)
 
 
  164  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. Maintainer: Timofey Mukha.
 
Defines the wall_model_bc_t type. Maintainer: Timofey Mukha.
 
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, json, nu)
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)
Apply the boundary condition to the right-hand side.
 
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.