53 character(len=25) :: FLUID_PNPN_KNOWN_BCS(15) = [character(len=25) :: &
60 "normal_outflow+user", &
62 "normal_outflow+dong", &
78 module subroutine pressure_bc_factory(object, scheme, json, coef,
user)
79 class(bc_t),
pointer,
intent(inout) :: object
80 type(fluid_pnpn_t),
intent(in) :: scheme
81 type(json_file),
intent(inout) :: json
82 type(coef_t),
target,
intent(in) :: coef
83 type(user_t),
intent(in) :: user
84 character(len=:),
allocatable :: type
86 integer,
allocatable :: zone_indices(:)
87 character(len=:),
allocatable :: default_name
88 character(len=64) :: buf
89 logical :: temp_logical
91 if (
associated(object))
then
96 call json_get(json,
"type", type)
98 select case (trim(type))
99 case (
"outflow",
"normal_outflow")
100 allocate(zero_dirichlet_t::object)
102 case (
"outflow+dong",
"normal_outflow+dong")
105 case (
"user_pressure",
"outflow+user",
"normal_outflow+user")
107 select type (obj => object)
109 obj%update =>
user%dirichlet_conditions
110 call json%add(
"field_name", scheme%p%name)
113 case (
"overset_interface")
114 call json_get_or_default(json,
"couple_pressure", temp_logical, .false.)
115 if (temp_logical)
then
117 select type (obj => object)
119 call json%add(
"field_name", scheme%p%name)
120 obj%morph_interface =>
user%morph_interface
127 do i = 1,
size(fluid_pnpn_known_bcs)
128 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
131 FLUID_PNPN_KNOWN_BCS)
134 call json_get_or_lookup(json,
"zone_indices", zone_indices)
135 call object%init(coef, json)
137 do i = 1,
size(zone_indices)
138 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
141 write(buf,
'("pressure_bc_", I0)') zone_indices(1)
142 default_name = trim(buf)
143 call json_get_or_default(json,
"name", object%name, default_name)
144 object%zone_indices = zone_indices
145 call object%finalize()
149 do i = 1,
size(zone_indices)
150 do j = 1, scheme%msh%nelv
151 do k = 1, 2 * scheme%msh%gdim
152 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
153 scheme%msh%facet_type(k, j) = 1
159 if (
allocated(type))
then
163 if (
allocated(zone_indices))
then
164 deallocate(zone_indices)
166 end subroutine pressure_bc_factory
174 module subroutine velocity_bc_factory(object, scheme, json, coef,
user)
175 class(bc_t),
pointer,
intent(inout) :: object
176 type(fluid_pnpn_t),
intent(inout) :: scheme
177 type(json_file),
intent(inout) :: json
178 type(coef_t),
target,
intent(in) :: coef
179 type(user_t),
intent(in) :: user
180 character(len=:),
allocatable :: type
182 integer,
allocatable :: zone_indices(:)
183 character(len=:),
allocatable :: default_name
184 character(len=64) :: buf
186 call json_get(json,
"type", type)
188 select case (trim(type))
191 case (
"velocity_value")
195 case (
"normal_outflow",
"normal_outflow+dong",
"normal_outflow+user")
197 case (
"blasius_profile")
199 case (
"shear_stress")
200 allocate(shear_stress_t::object)
202 allocate(wall_model_bc_t::object)
204 call json%add(
"scheme_name", scheme%name)
206 case (
"user_velocity")
208 select type (obj => object)
210 obj%update =>
user%dirichlet_conditions
213 case (
"overset_interface")
215 select type (obj => object)
217 obj%morph_interface =>
user%morph_interface
221 do i = 1,
size(fluid_pnpn_known_bcs)
222 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
225 FLUID_PNPN_KNOWN_BCS)
228 call json_get_or_lookup(json,
"zone_indices", zone_indices)
229 call object%init(coef, json)
230 do i = 1,
size(zone_indices)
231 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
234 write(buf,
'("velocity_bc_",I0)') zone_indices(1)
235 default_name = trim(buf)
236 call json_get_or_default(json,
"name", object%name, default_name)
237 object%zone_indices = zone_indices
238 call object%finalize()
241 if (trim(type) .ne.
"normal_outflow" .and. &
242 trim(type) .ne.
"normal_outflow+dong")
then
243 do i = 1,
size(zone_indices)
244 do j = 1, scheme%msh%nelv
245 do k = 1, 2 * scheme%msh%gdim
246 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
247 scheme%msh%facet_type(k, j) = 2
254 if (
allocated(type))
then
258 if (
allocated(zone_indices))
then
259 deallocate(zone_indices)
261 end subroutine velocity_bc_factory
263end 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.
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.
Overset interface BC for a scalar field.
Extension of the user defined dirichlet condition overset_interface
Mixed Dirichlet-Neumann symmetry plane condition.
A type collecting all the overridable user routines and flag to suppress type injection from custom m...