Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
les_model_template.f90
Go to the documentation of this file.
1
4 use json_module, only : json_file
6 use les_model, only : les_model_t, les_model_allocate, register_les_model
7 use num_types, only : rp
8 implicit none
9 private
10
12 contains
13 procedure :: init => les_model_template_init
14 procedure :: free => les_model_template_free
15 procedure :: compute => les_model_template_compute
17
19
20contains
21
22 subroutine les_model_template_init(this, fluid, json)
23 class(les_model_template_t), intent(inout) :: this
24 class(fluid_scheme_base_t), target, intent(inout) :: fluid
25 type(json_file), intent(inout) :: json
26 character(len=:), allocatable :: nut_name, delta_type
27 logical :: extrapolation
28
29 call json_get_or_default(json, 'nut_field', nut_name, 'nut')
30 call json_get_or_default(json, 'delta_type', delta_type, 'pointwise')
31 call json_get_or_default(json, 'extrapolation', extrapolation, .false.)
32 call this%free()
33 call this%init_base(fluid, nut_name, delta_type, extrapolation)
34 ! TODO: Read model-specific parameters from json.
35 end subroutine les_model_template_init
36
37 subroutine les_model_template_free(this)
38 class(les_model_template_t), intent(inout) :: this
39 ! TODO: Release fields owned by this derived type.
40 call this%free_base()
41 end subroutine les_model_template_free
42
43 subroutine les_model_template_compute(this, t, tstep)
44 class(les_model_template_t), intent(inout) :: this
45 real(kind=rp), intent(in) :: t
46 integer, intent(in) :: tstep
47 ! TODO: Compute this%nut from the resolved flow field.
48 end subroutine les_model_template_compute
49
51 procedure(les_model_allocate), pointer :: allocator
53 call register_les_model('les_model_template', allocator)
55
57 class(les_model_t), allocatable, intent(inout) :: obj
58 allocate(les_model_template_t :: obj)
59 end subroutine les_model_template_allocate
60end module les_model_template
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
LES model allocator.
Utilities for retrieving parameters from the case files.
Template for a user-defined LES model.
subroutine les_model_template_init(this, fluid, json)
subroutine, public les_model_template_register_types()
subroutine les_model_template_allocate(obj)
subroutine les_model_template_compute(this, t, tstep)
subroutine les_model_template_free(this)
Implements les_model_t.
Definition les_model.f90:35
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:14
Base type of all fluid formulations.
Base abstract type for LES models based on the Boussinesq approximation.
Definition les_model.f90:64