65 character(len=25) :: FLUID_PNPN_KNOWN_BCS(17) = [character(len=25) :: &
68 "expression_velocity", &
69 "expression_pressure", &
74 "normal_outflow+user", &
76 "normal_outflow+dong", &
92 module subroutine pressure_bc_factory(object, scheme, json, coef,
user)
93 class(bc_t),
pointer,
intent(inout) :: object
94 type(fluid_pnpn_t),
intent(in) :: scheme
95 type(json_file),
intent(inout) :: json
96 type(coef_t),
target,
intent(in) :: coef
97 type(user_t),
target,
intent(in) :: user
98 character(len=:),
allocatable :: type
100 integer,
allocatable :: zone_indices(:)
101 character(len=:),
allocatable :: default_name
102 character(len=64) :: buf
103 logical :: temp_logical
105 if (
associated(object))
then
110 call json_get(json,
"type", type)
112 select case (trim(type))
113 case (
"outflow",
"normal_outflow")
116 case (
"expression_pressure")
119 case (
"outflow+dong",
"normal_outflow+dong")
122 case (
"user_pressure",
"outflow+user",
"normal_outflow+user")
124 select type (obj => object)
126 obj%update =>
user%dirichlet_conditions
127 call json%add(
"field_name", scheme%p%name)
130 case (
"overset_interface")
131 call json_get_or_default(json,
"couple_pressure", temp_logical, .false.)
132 if (temp_logical)
then
134 select type (obj => object)
136 call json%add(
"field_name", scheme%p%name)
137 obj%morph_interface =>
user%morph_interface
144 do i = 1,
size(fluid_pnpn_known_bcs)
145 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
148 FLUID_PNPN_KNOWN_BCS)
151 call json_get_or_lookup(json,
"zone_indices", zone_indices)
152 call object%init(coef, json)
154 do i = 1,
size(zone_indices)
155 call object%mark_labeled_zone(zone_indices(i))
158 write(buf,
'("pressure_bc_", I0)') zone_indices(1)
159 default_name = trim(buf)
160 call json_get_or_default(json,
"name", object%name, default_name)
161 object%zone_indices = zone_indices
162 call object%finalize()
166 do i = 1,
size(zone_indices)
167 do j = 1, scheme%msh%nelv
168 do k = 1, 2 * scheme%msh%gdim
169 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
170 scheme%msh%facet_type(k, j) = 1
176 if (
allocated(type))
then
180 if (
allocated(zone_indices))
then
181 deallocate(zone_indices)
183 end subroutine pressure_bc_factory
191 module subroutine velocity_bc_factory(object, scheme, json, coef,
user)
192 class(bc_t),
pointer,
intent(inout) :: object
193 type(fluid_pnpn_t),
intent(inout) :: scheme
194 type(json_file),
intent(inout) :: json
195 type(coef_t),
target,
intent(in) :: coef
196 type(user_t),
target,
intent(in) :: user
197 character(len=:),
allocatable :: type
199 integer,
allocatable :: zone_indices(:)
200 character(len=:),
allocatable :: default_name
201 character(len=:),
allocatable :: bc_name
202 character(len=64) :: buf
204 call json_get(json,
"type", type)
206 select case (trim(type))
208 if (scheme%full_stress_formulation)
then
213 case (
"velocity_value")
215 case (
"expression_velocity")
219 case (
"normal_outflow",
"normal_outflow+dong",
"normal_outflow+user")
220 if (scheme%full_stress_formulation)
then
225 case (
"blasius_profile")
227 case (
"shear_stress")
232 call json%add(
"scheme_name", scheme%name)
234 select type (wall_bc => object)
239 case (
"user_velocity")
241 select type (obj => object)
243 obj%update =>
user%dirichlet_conditions
246 case (
"overset_interface")
248 select type (obj => object)
250 obj%morph_interface =>
user%morph_interface
254 do i = 1,
size(fluid_pnpn_known_bcs)
255 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
258 FLUID_PNPN_KNOWN_BCS)
261 call json_get_or_lookup(json,
"zone_indices", zone_indices)
262 write(buf,
'("velocity_bc_",I0)') zone_indices(1)
263 default_name = trim(buf)
264 call json_get_or_default(json,
"name", bc_name, default_name)
266 call object%init(coef, json)
267 do i = 1,
size(zone_indices)
268 call object%mark_labeled_zone(zone_indices(i))
271 object%name = bc_name
272 object%zone_indices = zone_indices
274 call object%finalize()
279 if (trim(type) .ne.
"normal_outflow" .and. &
280 trim(type) .ne.
"normal_outflow+dong" .and. &
281 trim(type) .ne.
"normal_outflow+user")
then
282 do i = 1,
size(zone_indices)
283 do j = 1, scheme%msh%nelv
284 do k = 1, 2 * scheme%msh%gdim
285 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
286 scheme%msh%facet_type(k, j) = 2
293 if (
allocated(type))
then
297 if (
allocated(zone_indices))
then
298 deallocate(zone_indices)
300 end subroutine velocity_bc_factory
302end submodule fluid_pnpn_bc_fctry
Defines a Blasius profile dirichlet condition.
Defines a dirichlet boundary condition.
Defines a dong outflow condition.
Defines a vector valued Dirichlet condition prescribed by mathematical expressions.
Defines a Dirichlet condition prescribed by a mathematical expression.
Defines inflow dirichlet conditions.
Defines user dirichlet condition for a scalar field.
Modular version of the Classic Nek5000 Pn/Pn formulation for fluids.
Defines inflow dirichlet conditions.
Defines no-slip boundary condition (extends zero_dirichlet)
Implements non_normal_aligned_t.
Defines overset interface vector boundary conditions.
Defines overset interface scalar boundary conditions.
Defines a shear stress boundary condition for a vector field. Maintainer: Timofey Mukha.
Implements symmetry_aligned_t.
Interfaces for user interaction with NEKO.
subroutine, public neko_type_error(base_type, wrong_type, known_types)
Reports an error allocating a type for a particular base pointer class.
Implements boundary condition projectors for vector fields. Two types concrete types are provided: se...
Defines the wall_model_bc_t type. Maintainer: Timofey Mukha.
Defines a zero-valued Dirichlet boundary condition.
Blasius profile for inlet (vector valued).
Generic Dirichlet boundary condition on .
Dong outflow condition Follows "A Convective-like Energy-Stable Open Boundary Condition for Simulati...
Dirichlet condition on , where is a mathematical expression given in the case file.
Vector valued Dirichlet condition, with one mathematical expression per component,...
User defined dirichlet condition, for which the user can work with an entire field....
Extension of the user defined dirichlet condition field_dirichlet
Dirichlet condition for inlet (vector valued)
Mixed Dirichlet condition constraining the tangential vector components.
Axis-aligned mixed Dirichlet condition in the non-normal direction.
Overset interface BC for a scalar field.
Extension of the user defined dirichlet condition overset_interface
A shear stress boundary condition.
Symmetry boundary condition constraining the normal vector component.
Axis-aligned symmetry boundary condition.
A type collecting all the overridable user routines and flag to suppress type injection from custom m...
A coupled projector for vector fields, suitable for mixed boundary conditions.
A projector for vector fields that acts component-wise.
A shear stress boundary condition, computing the stress values using a wall model.
Zero-valued Dirichlet boundary condition. Used for no-slip walls, but also for various auxillary cond...