43 character(len=25) :: COMPRESSIBLE_KNOWN_BCS(8) = [character(len=25) :: &
60 module subroutine density_bc_factory(object, scheme, json, coef,
user)
61 class(bc_t),
pointer,
intent(inout) :: object
62 type(fluid_scheme_compressible_ns_t),
intent(in) :: scheme
63 type(json_file),
intent(inout) :: json
64 type(coef_t),
intent(in) :: coef
65 type(user_t),
intent(in) :: user
66 character(len=:),
allocatable :: type
68 integer,
allocatable :: zone_indices(:)
69 character(len=:),
allocatable :: default_name
70 character(len=64) :: buf
74 select case (trim(type))
75 case (
"density_value")
78 do i = 1,
size(compressible_known_bcs)
79 if (trim(type) .eq. trim(compressible_known_bcs(i)))
return
81 call neko_type_error(
"compressible boundary conditions",
type, &
82 COMPRESSIBLE_KNOWN_BCS)
86 call object%init(coef, json)
88 do i = 1,
size(zone_indices)
89 call object%mark_labeled_zone(zone_indices(i))
92 write(buf,
'("density_bc_",I0)') zone_indices(1)
93 default_name = trim(buf)
95 object%zone_indices = zone_indices
96 call object%finalize()
97 end subroutine density_bc_factory
105 module subroutine pressure_bc_factory(object, scheme, json, coef,
user)
106 class(bc_t),
pointer,
intent(inout) :: object
107 type(fluid_scheme_compressible_ns_t),
intent(inout) :: scheme
108 type(json_file),
intent(inout) :: json
109 type(coef_t),
intent(in) :: coef
110 type(user_t),
intent(in) :: user
111 character(len=:),
allocatable :: type
113 integer,
allocatable :: zone_indices(:)
114 character(len=:),
allocatable :: default_name
115 character(len=64) :: buf
119 select case (trim(type))
120 case (
"outflow",
"normal_outflow")
122 case (
"pressure_value")
125 do i = 1,
size(compressible_known_bcs)
126 if (trim(type) .eq. trim(compressible_known_bcs(i)))
return
128 call neko_type_error(
"compressible boundary conditions",
type, &
129 COMPRESSIBLE_KNOWN_BCS)
133 call object%init(coef, json)
135 do i = 1,
size(zone_indices)
136 call object%mark_labeled_zone(zone_indices(i))
139 write(buf,
'("pressure_bc_",I0)') zone_indices(1)
140 default_name = trim(buf)
142 object%zone_indices = zone_indices
143 call object%finalize()
147 do i = 1,
size(zone_indices)
148 do j = 1, scheme%msh%nelv
149 do k = 1, 2 * scheme%msh%gdim
150 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
151 scheme%msh%facet_type(k, j) = 1
156 end subroutine pressure_bc_factory
164 module subroutine velocity_bc_factory(object, scheme, json, coef,
user)
165 class(bc_t),
pointer,
intent(inout) :: object
166 type(fluid_scheme_compressible_ns_t),
intent(in) :: scheme
167 type(json_file),
intent(inout) :: json
168 type(coef_t),
intent(in) :: coef
169 type(user_t),
intent(in) :: user
170 character(len=:),
allocatable :: type
172 integer,
allocatable :: zone_indices(:)
173 character(len=:),
allocatable :: default_name
174 character(len=64) :: buf
178 select case (trim(type))
185 case (
"velocity_value")
188 do i = 1,
size(compressible_known_bcs)
189 if (trim(type) .eq. trim(compressible_known_bcs(i)))
return
191 call neko_type_error(
"compressible boundary conditions",
type, &
192 COMPRESSIBLE_KNOWN_BCS)
196 call object%init(coef, json)
197 do i = 1,
size(zone_indices)
198 call object%mark_labeled_zone(zone_indices(i))
201 write(buf,
'("velocity_bc_",I0)') zone_indices(1)
202 default_name = trim(buf)
204 object%zone_indices = zone_indices
205 call object%finalize()
207 end subroutine velocity_bc_factory
209end submodule compressible_ns_bc_fctry
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Retrieves a parameter by name or throws an error.
Defines a dirichlet boundary condition.
Defines inflow dirichlet conditions.
Utilities for retrieving parameters from the case files.
Defines a zero-valued Dirichlet boundary condition.
Generic Dirichlet boundary condition on .
Dirichlet condition for inlet (vector valued)
Symmetry boundary condition constraining the normal vector component.
Zero-valued Dirichlet boundary condition. Used for no-slip walls, but also for various auxillary cond...