43 character(len=25) :: EULER_KNOWN_BCS(7) = [character(len=25) :: &
59 module subroutine density_bc_factory(object, scheme, json, coef,
user)
60 class(bc_t),
pointer,
intent(inout) :: object
61 type(fluid_scheme_compressible_euler_t),
intent(in) :: scheme
62 type(json_file),
intent(inout) :: json
63 type(coef_t),
intent(in) :: coef
64 type(user_t),
intent(in) :: user
65 character(len=:),
allocatable :: type
67 integer,
allocatable :: zone_indices(:)
68 character(len=:),
allocatable :: default_name
69 character(len=64) :: buf
73 select case (trim(type))
74 case (
"density_value")
77 do i = 1,
size(euler_known_bcs)
78 if (trim(type) .eq. trim(euler_known_bcs(i)))
return
80 call neko_type_error(
"compressible_euler boundary conditions",
type, &
85 call object%init(coef, json)
87 do i = 1,
size(zone_indices)
88 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
91 write(buf,
'("density_bc_",I0)') zone_indices(1)
92 default_name = trim(buf)
94 object%zone_indices = zone_indices
95 call object%finalize()
96 end subroutine density_bc_factory
104 module subroutine pressure_bc_factory(object, scheme, json, coef,
user)
105 class(bc_t),
pointer,
intent(inout) :: object
106 type(fluid_scheme_compressible_euler_t),
intent(inout) :: scheme
107 type(json_file),
intent(inout) :: json
108 type(coef_t),
intent(in) :: coef
109 type(user_t),
intent(in) :: user
110 character(len=:),
allocatable :: type
112 integer,
allocatable :: zone_indices(:)
113 character(len=:),
allocatable :: default_name
114 character(len=64) :: buf
118 select case (trim(type))
119 case (
"outflow",
"normal_outflow")
121 case (
"pressure_value")
124 do i = 1,
size(euler_known_bcs)
125 if (trim(type) .eq. trim(euler_known_bcs(i)))
return
127 call neko_type_error(
"compressible_euler boundary conditions",
type, &
132 call object%init(coef, json)
134 do i = 1,
size(zone_indices)
135 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
138 write(buf,
'("pressure_bc_",I0)') zone_indices(1)
139 default_name = trim(buf)
141 object%zone_indices = zone_indices
142 call object%finalize()
146 do i = 1,
size(zone_indices)
147 do j = 1, scheme%msh%nelv
148 do k = 1, 2 * scheme%msh%gdim
149 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
150 scheme%msh%facet_type(k, j) = 1
155 end subroutine pressure_bc_factory
163 module subroutine velocity_bc_factory(object, scheme, json, coef,
user)
164 class(bc_t),
pointer,
intent(inout) :: object
165 type(fluid_scheme_compressible_euler_t),
intent(in) :: scheme
166 type(json_file),
intent(inout) :: json
167 type(coef_t),
intent(in) :: coef
168 type(user_t),
intent(in) :: user
169 character(len=:),
allocatable :: type
171 integer,
allocatable :: zone_indices(:)
172 character(len=:),
allocatable :: default_name
173 character(len=64) :: buf
177 select case (trim(type))
182 case (
"velocity_value")
185 do i = 1,
size(euler_known_bcs)
186 if (trim(type) .eq. trim(euler_known_bcs(i)))
return
188 call neko_type_error(
"compressible_euler boundary conditions",
type, &
193 call object%init(coef, json)
194 do i = 1,
size(zone_indices)
195 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
198 write(buf,
'("velocity_bc_",I0)') zone_indices(1)
199 default_name = trim(buf)
201 object%zone_indices = zone_indices
202 call object%finalize()
204 end subroutine velocity_bc_factory
206end submodule euler_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.
Mixed Dirichlet-Neumann axis aligned symmetry plane.
Defines a zero-valued Dirichlet boundary condition.
Generic Dirichlet boundary condition on .
Dirichlet condition for inlet (vector valued)
Mixed Dirichlet-Neumann symmetry plane condition.
Zero-valued Dirichlet boundary condition. Used for no-slip walls, but also for various auxillary cond...