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(:)
84 if (
associated(object))
then
89 call json_get(json,
"type", type)
91 select case (trim(type))
92 case (
"outflow",
"normal_outflow")
93 allocate(zero_dirichlet_t::object)
95 case (
"outflow+dong",
"normal_outflow+dong")
98 case (
"user_pressure",
"outflow+user",
"normal_outflow+user")
100 select type (obj => object)
102 obj%update =>
user%dirichlet_conditions
103 call json%add(
"field_name", scheme%p%name)
107 do i = 1,
size(fluid_pnpn_known_bcs)
108 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
111 FLUID_PNPN_KNOWN_BCS)
114 call json_get_or_lookup(json,
"zone_indices", zone_indices)
115 call object%init(coef, json)
117 do i = 1,
size(zone_indices)
118 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
120 call object%finalize()
124 do i = 1,
size(zone_indices)
125 do j = 1, scheme%msh%nelv
126 do k = 1, 2 * scheme%msh%gdim
127 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
128 scheme%msh%facet_type(k, j) = 1
134 if (
allocated(type))
then
138 if (
allocated(zone_indices))
then
139 deallocate(zone_indices)
141 end subroutine pressure_bc_factory
149 module subroutine velocity_bc_factory(object, scheme, json, coef,
user)
150 class(bc_t),
pointer,
intent(inout) :: object
151 type(fluid_pnpn_t),
intent(inout) :: scheme
152 type(json_file),
intent(inout) :: json
153 type(coef_t),
target,
intent(in) :: coef
154 type(user_t),
intent(in) :: user
155 character(len=:),
allocatable :: type
157 integer,
allocatable :: zone_indices(:)
159 call json_get(json,
"type", type)
161 select case (trim(type))
164 case (
"velocity_value")
167 allocate(zero_dirichlet_t::object)
168 case (
"normal_outflow",
"normal_outflow+dong",
"normal_outflow+user")
170 case (
"blasius_profile")
172 case (
"shear_stress")
173 allocate(shear_stress_t::object)
175 allocate(wall_model_bc_t::object)
177 call json%add(
"scheme_name", scheme%name)
179 case (
"user_velocity")
181 select type (obj => object)
183 obj%update =>
user%dirichlet_conditions
187 do i = 1,
size(fluid_pnpn_known_bcs)
188 if (trim(type) .eq. trim(fluid_pnpn_known_bcs(i)))
return
191 FLUID_PNPN_KNOWN_BCS)
194 call json_get_or_lookup(json,
"zone_indices", zone_indices)
195 call object%init(coef, json)
196 do i = 1,
size(zone_indices)
197 call object%mark_zone(coef%msh%labeled_zones(zone_indices(i)))
199 call object%finalize()
202 if (trim(type) .ne.
"normal_outflow" .and. &
203 trim(type) .ne.
"normal_outflow+dong")
then
204 do i = 1,
size(zone_indices)
205 do j = 1, scheme%msh%nelv
206 do k = 1, 2 * scheme%msh%gdim
207 if (scheme%msh%facet_type(k,j) .eq. -zone_indices(i))
then
208 scheme%msh%facet_type(k, j) = 2
215 if (
allocated(type))
then
219 if (
allocated(zone_indices))
then
220 deallocate(zone_indices)
222 end subroutine velocity_bc_factory
224end 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...