52 character(len=25) :: FLUID_PNPN_KNOWN_BCS(14) = [character(len=25) :: &
59 "normal_outflow+user", &
61 "normal_outflow+dong", &
76 module subroutine pressure_bc_factory(object, scheme, json, coef,
user)
77 class(bc_t),
pointer,
intent(inout) :: object
78 type(fluid_pnpn_t),
intent(in) :: scheme
79 type(json_file),
intent(inout) :: json
80 type(coef_t),
target,
intent(in) :: coef
81 type(user_t),
intent(in) :: user
82 character(len=:),
allocatable :: type
84 integer,
allocatable :: zone_indices(:)
85 character(len=:),
allocatable :: default_name
86 character(len=64) :: buf
88 if (
associated(object))
then
93 call json_get(json,
"type", type)
95 select case (trim(type))
96 case (
"outflow",
"normal_outflow")
97 allocate(zero_dirichlet_t::object)
99 case (
"outflow+dong",
"normal_outflow+dong")
102 case (
"user_pressure",
"outflow+user",
"normal_outflow+user")
104 select type (obj => object)
106 obj%update =>
user%dirichlet_conditions
107 call json%add(
"field_name", scheme%p%name)
111 do i = 1,
size(fluid_pnpn_known_bcs)
112 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
115 FLUID_PNPN_KNOWN_BCS)
118 call json_get_or_lookup(json,
"zone_indices", zone_indices)
119 call object%init(coef, json)
121 do i = 1,
size(zone_indices)
122 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
125 write(buf,
'("pressure_bc_", I0)') zone_indices(1)
126 default_name = trim(buf)
127 call json_get_or_default(json,
"name", object%name, default_name)
128 object%zone_indices = zone_indices
129 call object%finalize()
133 do i = 1,
size(zone_indices)
134 do j = 1, scheme%msh%nelv
135 do k = 1, 2 * scheme%msh%gdim
136 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
137 scheme%msh%facet_type(k, j) = 1
143 if (
allocated(type))
then
147 if (
allocated(zone_indices))
then
148 deallocate(zone_indices)
150 end subroutine pressure_bc_factory
158 module subroutine velocity_bc_factory(object, scheme, json, coef,
user)
159 class(bc_t),
pointer,
intent(inout) :: object
160 type(fluid_pnpn_t),
intent(inout) :: scheme
161 type(json_file),
intent(inout) :: json
162 type(coef_t),
target,
intent(in) :: coef
163 type(user_t),
intent(in) :: user
164 character(len=:),
allocatable :: type
166 integer,
allocatable :: zone_indices(:)
167 character(len=:),
allocatable :: default_name
168 character(len=64) :: buf
170 call json_get(json,
"type", type)
172 select case (trim(type))
175 case (
"velocity_value")
179 case (
"normal_outflow",
"normal_outflow+dong",
"normal_outflow+user")
181 case (
"blasius_profile")
183 case (
"shear_stress")
184 allocate(shear_stress_t::object)
186 allocate(wall_model_bc_t::object)
188 call json%add(
"scheme_name", scheme%name)
190 case (
"user_velocity")
192 select type (obj => object)
194 obj%update =>
user%dirichlet_conditions
198 do i = 1,
size(fluid_pnpn_known_bcs)
199 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
202 FLUID_PNPN_KNOWN_BCS)
205 call json_get_or_lookup(json,
"zone_indices", zone_indices)
206 call object%init(coef, json)
207 do i = 1,
size(zone_indices)
208 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
211 write(buf,
'("velocity_bc_",I0)') zone_indices(1)
212 default_name = trim(buf)
213 call json_get_or_default(json,
"name", object%name, default_name)
214 object%zone_indices = zone_indices
215 call object%finalize()
218 if (trim(type) .ne.
"normal_outflow" .and. &
219 trim(type) .ne.
"normal_outflow+dong")
then
220 do i = 1,
size(zone_indices)
221 do j = 1, scheme%msh%nelv
222 do k = 1, 2 * scheme%msh%gdim
223 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
224 scheme%msh%facet_type(k, j) = 2
231 if (
allocated(type))
then
235 if (
allocated(zone_indices))
then
236 deallocate(zone_indices)
238 end subroutine velocity_bc_factory
240end 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.
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.
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.
Mixed Dirichlet-Neumann symmetry plane condition.
A type collecting all the overridable user routines and flag to suppress type injection from custom m...