44 character(len=20) :: WALLM_KNOWN_TYPES(4) = [character(len=20) :: &
60 module subroutine wall_model_factory(object, scheme_name, coef, msk, facet, &
62 class(wall_model_t),
allocatable,
intent(inout) :: object
63 character(len=*),
intent(in) :: scheme_name
64 type(coef_t),
intent(in) :: coef
65 integer,
intent(in) :: msk(:)
66 integer,
intent(in) :: facet(:)
67 type(json_file),
intent(inout) :: json
68 character(len=:),
allocatable :: type_name
69 character(len=:),
allocatable :: type_string
72 call json_get(json,
"model", type_name)
73 call json_get(json,
"h_index", h_index)
75 call wall_model_allocator(object, type_name)
78 call object%init(scheme_name, coef, msk, facet, h_index, json)
80 end subroutine wall_model_factory
85 module subroutine wall_model_allocator(object, type_name)
86 class(wall_model_t),
allocatable,
intent(inout) :: object
87 character(len=:),
allocatable,
intent(in) :: type_name
90 if (
allocated(object))
then
95 select case (trim(type_name) )
98 case (
"rough_log_law")
105 do i = 1, wall_model_registry_size
106 if (trim(type_name) .eq. trim(wall_model_registry(i)%type_name))
then
107 call wall_model_registry(i)%allocator(object)
113 end subroutine wall_model_allocator
120 module subroutine register_wall_model(type_name, allocator)
121 character(len=*),
intent(in) :: type_name
122 procedure(wall_model_allocate),
pointer,
intent(in) :: allocator
123 type(allocator_entry),
allocatable :: temp(:)
126 do i = 1,
size(wallm_known_types)
127 if (trim(type_name) .eq. trim(wallm_known_types(i)))
then
132 do i = 1, wall_model_registry_size
133 if (trim(type_name) .eq. trim(wall_model_registry(i)%type_name))
then
139 if (wall_model_registry_size .eq. 0)
then
140 allocate(wall_model_registry(1))
142 allocate(temp(wall_model_registry_size + 1))
143 temp(1:wall_model_registry_size) = wall_model_registry
144 call move_alloc(temp, wall_model_registry)
147 wall_model_registry_size = wall_model_registry_size + 1
148 wall_model_registry(wall_model_registry_size)%type_name = type_name
149 wall_model_registry(wall_model_registry_size)%allocator => allocator
150 end subroutine register_wall_model
152end submodule wall_model_fctry
Implements rough_log_law_t.
subroutine, public neko_type_registration_error(base_type, wrong_type, known)
subroutine, public neko_type_error(base_type, wrong_type, known_types)
Reports an error allocating a type for a particular base pointer class.
Wall model based on the Monin-Obukhov Similarity Theory for atmospheric boundary layer flows....
Wall model similar to the Monin-Obukhov Similarity Theory for atmospheric boundary layer flows,...
Wall model based on the log-law for a rough wall. The formula defining the law is ....
Wall model based on Spalding's law of the wall. Reference: http://dx.doi.org/10.1115/1....