50 character(len=25) :: FLUID_PNPN_KNOWN_BCS(14) = [character(len=25) :: &
57 "normal_outflow+user", &
59 "normal_outflow+dong", &
74 module subroutine pressure_bc_factory(object, scheme, json, coef,
user)
75 class(bc_t),
pointer,
intent(inout) :: object
76 type(fluid_pnpn_t),
intent(in) :: scheme
77 type(json_file),
intent(inout) :: json
78 type(coef_t),
target,
intent(in) :: coef
79 type(user_t),
intent(in) :: user
80 character(len=:),
allocatable :: type
82 integer,
allocatable :: zone_indices(:)
83 character(len=:),
allocatable :: default_name
84 character(len=64) :: buf
86 if (
associated(object))
then
91 call json_get(json,
"type", type)
93 select case (trim(type))
94 case (
"outflow",
"normal_outflow")
95 allocate(zero_dirichlet_t::object)
97 case (
"outflow+dong",
"normal_outflow+dong")
100 case (
"user_pressure",
"outflow+user",
"normal_outflow+user")
102 select type (obj => object)
104 obj%update =>
user%dirichlet_conditions
105 call json%add(
"field_name", scheme%p%name)
109 do i = 1,
size(fluid_pnpn_known_bcs)
110 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
113 FLUID_PNPN_KNOWN_BCS)
116 call json_get_or_lookup(json,
"zone_indices", zone_indices)
117 call object%init(coef, json)
119 do i = 1,
size(zone_indices)
120 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
123 write(buf,
'("pressure_bc_",I0)') zone_indices(1)
124 default_name = trim(buf)
125 call json_get_or_default(json,
"name", object%name, default_name)
126 object%zone_indices = zone_indices
127 call object%finalize()
131 do i = 1,
size(zone_indices)
132 do j = 1, scheme%msh%nelv
133 do k = 1, 2 * scheme%msh%gdim
134 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
135 scheme%msh%facet_type(k, j) = 1
141 if (
allocated(type))
then
145 if (
allocated(zone_indices))
then
146 deallocate(zone_indices)
148 end subroutine pressure_bc_factory
156 module subroutine velocity_bc_factory(object, scheme, json, coef,
user)
157 class(bc_t),
pointer,
intent(inout) :: object
158 type(fluid_pnpn_t),
intent(inout) :: scheme
159 type(json_file),
intent(inout) :: json
160 type(coef_t),
target,
intent(in) :: coef
161 type(user_t),
intent(in) :: user
162 character(len=:),
allocatable :: type
164 integer,
allocatable :: zone_indices(:)
165 character(len=:),
allocatable :: default_name
166 character(len=64) :: buf
168 call json_get(json,
"type", type)
170 select case (trim(type))
173 case (
"velocity_value")
176 allocate(zero_dirichlet_t::object)
177 case (
"normal_outflow",
"normal_outflow+dong",
"normal_outflow+user")
179 case (
"blasius_profile")
181 case (
"shear_stress")
182 allocate(shear_stress_t::object)
184 allocate(wall_model_bc_t::object)
186 call json%add(
"scheme_name", scheme%name)
188 case (
"user_velocity")
190 select type (obj => object)
192 obj%update =>
user%dirichlet_conditions
196 do i = 1,
size(fluid_pnpn_known_bcs)
197 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
200 FLUID_PNPN_KNOWN_BCS)
203 call json_get_or_lookup(json,
"zone_indices", zone_indices)
204 call object%init(coef, json)
205 do i = 1,
size(zone_indices)
206 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
209 write(buf,
'("velocity_bc_",I0)') zone_indices(1)
210 default_name = trim(buf)
211 call json_get_or_default(json,
"name", object%name, default_name)
212 object%zone_indices = zone_indices
213 call object%finalize()
216 if (trim(type) .ne.
"normal_outflow" .and. &
217 trim(type) .ne.
"normal_outflow+dong")
then
218 do i = 1,
size(zone_indices)
219 do j = 1, scheme%msh%nelv
220 do k = 1, 2 * scheme%msh%gdim
221 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
222 scheme%msh%facet_type(k, j) = 2
229 if (
allocated(type))
then
233 if (
allocated(zone_indices))
then
234 deallocate(zone_indices)
236 end subroutine velocity_bc_factory
238end 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.
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...