56 character(len=25) :: FLUID_PNPN_KNOWN_BCS(15) = [character(len=25) :: &
63 "normal_outflow+user", &
65 "normal_outflow+dong", &
81 module subroutine pressure_bc_factory(object, scheme, json, coef,
user)
82 class(bc_t),
pointer,
intent(inout) :: object
83 type(fluid_pnpn_t),
intent(in) :: scheme
84 type(json_file),
intent(inout) :: json
85 type(coef_t),
target,
intent(in) :: coef
86 type(user_t),
intent(in) :: user
87 character(len=:),
allocatable :: type
89 integer,
allocatable :: zone_indices(:)
90 character(len=:),
allocatable :: default_name
91 character(len=64) :: buf
92 logical :: temp_logical
94 if (
associated(object))
then
99 call json_get(json,
"type", type)
101 select case (trim(type))
102 case (
"outflow",
"normal_outflow")
105 case (
"outflow+dong",
"normal_outflow+dong")
108 case (
"user_pressure",
"outflow+user",
"normal_outflow+user")
110 select type (obj => object)
112 obj%update =>
user%dirichlet_conditions
113 call json%add(
"field_name", scheme%p%name)
116 case (
"overset_interface")
117 call json_get_or_default(json,
"couple_pressure", temp_logical, .false.)
118 if (temp_logical)
then
120 select type (obj => object)
122 call json%add(
"field_name", scheme%p%name)
123 obj%morph_interface =>
user%morph_interface
130 do i = 1,
size(fluid_pnpn_known_bcs)
131 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
134 FLUID_PNPN_KNOWN_BCS)
137 call json_get_or_lookup(json,
"zone_indices", zone_indices)
138 call object%init(coef, json)
140 do i = 1,
size(zone_indices)
141 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
144 write(buf,
'("pressure_bc_", I0)') zone_indices(1)
145 default_name = trim(buf)
146 call json_get_or_default(json,
"name", object%name, default_name)
147 object%zone_indices = zone_indices
148 call object%finalize()
152 do i = 1,
size(zone_indices)
153 do j = 1, scheme%msh%nelv
154 do k = 1, 2 * scheme%msh%gdim
155 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
156 scheme%msh%facet_type(k, j) = 1
162 if (
allocated(type))
then
166 if (
allocated(zone_indices))
then
167 deallocate(zone_indices)
169 end subroutine pressure_bc_factory
177 module subroutine velocity_bc_factory(object, scheme, json, coef,
user)
178 class(bc_t),
pointer,
intent(inout) :: object
179 type(fluid_pnpn_t),
intent(inout) :: scheme
180 type(json_file),
intent(inout) :: json
181 type(coef_t),
target,
intent(in) :: coef
182 type(user_t),
intent(in) :: user
183 character(len=:),
allocatable :: type
185 integer,
allocatable :: zone_indices(:)
186 character(len=:),
allocatable :: default_name
187 character(len=64) :: buf
189 call json_get(json,
"type", type)
191 select case (trim(type))
194 case (
"velocity_value")
198 case (
"normal_outflow",
"normal_outflow+dong",
"normal_outflow+user")
200 case (
"blasius_profile")
202 case (
"shear_stress")
207 call json%add(
"scheme_name", scheme%name)
209 case (
"user_velocity")
211 select type (obj => object)
213 obj%update =>
user%dirichlet_conditions
216 case (
"overset_interface")
218 select type (obj => object)
220 obj%morph_interface =>
user%morph_interface
224 do i = 1,
size(fluid_pnpn_known_bcs)
225 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
228 FLUID_PNPN_KNOWN_BCS)
231 call json_get_or_lookup(json,
"zone_indices", zone_indices)
232 call object%init(coef, json)
233 do i = 1,
size(zone_indices)
234 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
237 write(buf,
'("velocity_bc_",I0)') zone_indices(1)
238 default_name = trim(buf)
239 call json_get_or_default(json,
"name", object%name, default_name)
240 object%zone_indices = zone_indices
241 call object%finalize()
244 if (trim(type) .ne.
"normal_outflow" .and. &
245 trim(type) .ne.
"normal_outflow+dong")
then
246 do i = 1,
size(zone_indices)
247 do j = 1, scheme%msh%nelv
248 do k = 1, 2 * scheme%msh%gdim
249 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
250 scheme%msh%facet_type(k, j) = 2
257 if (
allocated(type))
then
261 if (
allocated(zone_indices))
then
262 deallocate(zone_indices)
264 end subroutine velocity_bc_factory
266end submodule fluid_pnpn_bc_fctry
Defines a Blasius profile dirichlet condition.
Defines a dirichlet boundary condition.
Defines a dong outflow condition.
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...
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...