Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
wall_model_template.f90
Go to the documentation of this file.
1
3 use coefs, only : coef_t
4 use json_module, only : json_file
5 use num_types, only : rp
6 use user_intf, only : user_t
8 register_wall_model
9 implicit none
10 private
11
13 contains
14 procedure :: init => wall_model_template_init
15 procedure :: partial_init => wall_model_template_partial_init
16 procedure :: finalize => wall_model_template_finalize
17 procedure :: free => wall_model_template_free
18 procedure :: compute => wall_model_template_compute
20
22
23contains
24
25 subroutine wall_model_template_init(this, scheme_name, coef, msk, facet, json)
26 class(wall_model_template_t), intent(inout) :: this
27 character(len=*), intent(in) :: scheme_name
28 type(coef_t), intent(in) :: coef
29 integer, intent(in) :: msk(:), facet(:)
30 type(json_file), intent(inout) :: json
31
32 call this%partial_init(coef, scheme_name, json)
33 call this%finalize(msk, facet)
34 end subroutine wall_model_template_init
35
36 subroutine wall_model_template_partial_init(this, coef, scheme_name, json)
37 class(wall_model_template_t), intent(inout) :: this
38 type(coef_t), intent(in) :: coef
39 character(len=*), intent(in) :: scheme_name
40 type(json_file), intent(inout) :: json
41
42 call this%partial_init_base(coef, scheme_name, json)
43 ! TODO: Read wall-model-specific parameters from json.
45
46 subroutine wall_model_template_finalize(this, msk, facet, bc_name, user)
47 class(wall_model_template_t), intent(inout) :: this
48 integer, intent(in) :: msk(:), facet(:)
49 character(len=*), optional, intent(in) :: bc_name
50 type(user_t), target, optional, intent(in) :: user
51
52 if (present(bc_name) .and. present(user)) then
53 call this%finalize_base(msk, facet, bc_name, user)
54 else if (present(bc_name)) then
55 call this%finalize_base(msk, facet, bc_name)
56 else
57 call this%finalize_base(msk, facet)
58 end if
59 ! TODO: Initialize arrays which depend on this%n_nodes.
60 end subroutine wall_model_template_finalize
61
62 subroutine wall_model_template_free(this)
63 class(wall_model_template_t), intent(inout) :: this
64 ! TODO: Release fields owned by this derived type.
65 call this%free_base()
66 end subroutine wall_model_template_free
67
68 subroutine wall_model_template_compute(this, t, tstep)
69 class(wall_model_template_t), intent(inout) :: this
70 real(kind=rp), intent(in) :: t
71 integer, intent(in) :: tstep
72 ! TODO: Fill this%tau_x, this%tau_y, and this%tau_z.
73 call this%compute_mag_field()
74 end subroutine wall_model_template_compute
75
77 procedure(wall_model_allocate), pointer :: allocator
79 call register_wall_model('wall_model_template', allocator)
81
83 class(wall_model_t), allocatable, intent(inout) :: obj
84 allocate(wall_model_template_t :: obj)
85 end subroutine wall_model_template_allocate
86end module wall_model_template
Wall model factory. Both constructs and initializes the object.
Coefficients.
Definition coef.f90:34
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:14
Interfaces for user interaction with NEKO.
Definition user_intf.f90:34
Template for a user-defined wall model.
subroutine wall_model_template_finalize(this, msk, facet, bc_name, user)
subroutine wall_model_template_compute(this, t, tstep)
subroutine wall_model_template_free(this)
subroutine wall_model_template_allocate(obj)
subroutine, public wall_model_template_register_types()
subroutine wall_model_template_init(this, scheme_name, coef, msk, facet, json)
subroutine wall_model_template_partial_init(this, coef, scheme_name, json)
Implements wall_model_t.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition coef.f90:93
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.