45 character(len=20) :: SOURCE_KNOWN_TYPES(4) = [character(len=20) :: &
57 module subroutine source_term_factory(object, json, fields, coef)
58 class(source_term_t),
allocatable,
intent(inout) :: object
59 type(json_file),
intent(inout) :: json
60 type(field_list_t),
intent(inout) :: fields
61 type(coef_t),
intent(inout) :: coef
62 character(len=:),
allocatable :: type_name
63 character(len=:),
allocatable :: type_string
65 call json_get(json,
"type", type_name)
67 if (trim(type_name) .eq.
"constant")
then
69 else if (trim(type_name) .eq.
"boussinesq")
then
71 else if (trim(type_name) .eq.
"coriolis")
then
73 else if (trim(type_name) .eq.
"brinkman")
then
77 new_line(
'A') //
"- ", .true.)
79 // trim(type_name) //
". Known types are: " &
84 call object%init(json, fields, coef)
86 end subroutine source_term_factory
88end submodule source_term_fctry
Retrieves a parameter by name or throws an error.
Implements the boussinesq_source_term_t type.
Implements the brinkman_source_term_t type.
Implements the const_source_term_t type.
Implements the coriolis_source_term_t type. Maintainer: Timofey Mukha.
Utilities for retrieving parameters from the case files.
Implements the source_term_t type and a wrapper source_term_wrapper_t.
character(:) function, allocatable, public concat_string_array(array, sep, prepend)
Concatenate an array of strings into one string with array items separated by spaces.
Bouyancy source term accroding to the Boussinesq approximation.
A Brinkman source term. The region and strength are controlled by assigning regions types and brinkma...
A constant source term. The strength is specified with the values keyword, which should be an array,...
This source term adds the Coriolis force.