58 character(len=25) :: FLUID_PNPN_KNOWN_BCS(17) = [character(len=25) :: &
61 "expression_velocity", &
62 "expression_pressure", &
67 "normal_outflow+user", &
69 "normal_outflow+dong", &
85 module subroutine pressure_bc_factory(object, scheme, json, coef,
user)
86 class(bc_t),
pointer,
intent(inout) :: object
87 type(fluid_pnpn_t),
intent(in) :: scheme
88 type(json_file),
intent(inout) :: json
89 type(coef_t),
target,
intent(in) :: coef
90 type(user_t),
intent(in) :: user
91 character(len=:),
allocatable :: type
93 integer,
allocatable :: zone_indices(:)
94 character(len=:),
allocatable :: default_name
95 character(len=64) :: buf
96 logical :: temp_logical
98 if (
associated(object))
then
103 call json_get(json,
"type", type)
105 select case (trim(type))
106 case (
"outflow",
"normal_outflow")
109 case (
"expression_pressure")
112 case (
"outflow+dong",
"normal_outflow+dong")
115 case (
"user_pressure",
"outflow+user",
"normal_outflow+user")
117 select type (obj => object)
119 obj%update =>
user%dirichlet_conditions
120 call json%add(
"field_name", scheme%p%name)
123 case (
"overset_interface")
124 call json_get_or_default(json,
"couple_pressure", temp_logical, .false.)
125 if (temp_logical)
then
127 select type (obj => object)
129 call json%add(
"field_name", scheme%p%name)
130 obj%morph_interface =>
user%morph_interface
137 do i = 1,
size(fluid_pnpn_known_bcs)
138 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
141 FLUID_PNPN_KNOWN_BCS)
144 call json_get_or_lookup(json,
"zone_indices", zone_indices)
145 call object%init(coef, json)
147 do i = 1,
size(zone_indices)
148 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
151 write(buf,
'("pressure_bc_", I0)') zone_indices(1)
152 default_name = trim(buf)
153 call json_get_or_default(json,
"name", object%name, default_name)
154 object%zone_indices = zone_indices
155 call object%finalize()
159 do i = 1,
size(zone_indices)
160 do j = 1, scheme%msh%nelv
161 do k = 1, 2 * scheme%msh%gdim
162 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
163 scheme%msh%facet_type(k, j) = 1
169 if (
allocated(type))
then
173 if (
allocated(zone_indices))
then
174 deallocate(zone_indices)
176 end subroutine pressure_bc_factory
184 module subroutine velocity_bc_factory(object, scheme, json, coef,
user)
185 class(bc_t),
pointer,
intent(inout) :: object
186 type(fluid_pnpn_t),
intent(inout) :: scheme
187 type(json_file),
intent(inout) :: json
188 type(coef_t),
target,
intent(in) :: coef
189 type(user_t),
intent(in) :: user
190 character(len=:),
allocatable :: type
192 integer,
allocatable :: zone_indices(:)
193 character(len=:),
allocatable :: default_name
194 character(len=64) :: buf
196 call json_get(json,
"type", type)
198 select case (trim(type))
201 case (
"velocity_value")
203 case (
"expression_velocity")
207 case (
"normal_outflow",
"normal_outflow+dong",
"normal_outflow+user")
209 case (
"blasius_profile")
211 case (
"shear_stress")
216 call json%add(
"scheme_name", scheme%name)
218 case (
"user_velocity")
220 select type (obj => object)
222 obj%update =>
user%dirichlet_conditions
225 case (
"overset_interface")
227 select type (obj => object)
229 obj%morph_interface =>
user%morph_interface
233 do i = 1,
size(fluid_pnpn_known_bcs)
234 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
237 FLUID_PNPN_KNOWN_BCS)
240 call json_get_or_lookup(json,
"zone_indices", zone_indices)
241 call object%init(coef, json)
242 do i = 1,
size(zone_indices)
243 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
246 write(buf,
'("velocity_bc_",I0)') zone_indices(1)
247 default_name = trim(buf)
248 call json_get_or_default(json,
"name", object%name, default_name)
249 object%zone_indices = zone_indices
250 call object%finalize()
253 if (trim(type) .ne.
"normal_outflow" .and. &
254 trim(type) .ne.
"normal_outflow+dong")
then
255 do i = 1,
size(zone_indices)
256 do j = 1, scheme%msh%nelv
257 do k = 1, 2 * scheme%msh%gdim
258 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
259 scheme%msh%facet_type(k, j) = 2
266 if (
allocated(type))
then
270 if (
allocated(zone_indices))
then
271 deallocate(zone_indices)
273 end subroutine velocity_bc_factory
275end 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)
Dirichlet condition on axis aligned plane in the non normal direction.
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.
Mixed Dirichlet-Neumann axis aligned symmetry plane.
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.
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)
Dirichlet condition in non normal direction of a plane.
Overset interface BC for a scalar field.
Extension of the user defined dirichlet condition overset_interface
A shear stress boundary condition.
Mixed Dirichlet-Neumann symmetry plane condition.
A type collecting all the overridable user routines and flag to suppress type injection from custom m...
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...