45 character(len=20) :: WALLM_KNOWN_TYPES(5) = [character(len=20) :: &
47 "cai_sagaut_model_ii", &
61 module subroutine wall_model_factory(object, scheme_name, coef, msk, facet, &
63 class(wall_model_t),
allocatable,
intent(inout) :: object
64 character(len=*),
intent(in) :: scheme_name
65 type(coef_t),
intent(in) :: coef
66 integer,
intent(in) :: msk(:)
67 integer,
intent(in) :: facet(:)
68 type(json_file),
intent(inout) :: json
69 character(len=:),
allocatable :: type_name
71 call json_get(json,
"model", type_name)
73 call wall_model_allocator(object, type_name)
75 call object%partial_init(coef, scheme_name, json)
76 call object%finalize(msk, facet)
78 end subroutine wall_model_factory
83 module subroutine wall_model_allocator(object, type_name)
84 class(wall_model_t),
allocatable,
intent(inout) :: object
85 character(len=:),
allocatable,
intent(in) :: type_name
88 if (
allocated(object))
then
93 select case (trim(type_name) )
96 case (
"cai_sagaut_model_ii")
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 cai_sagaut_model_ii_t.
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.
Explicit wall model based on Model-II from Cai and Sagaut (2021).
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....