Appendix: Boundary Conditions
Boundary conditions are specified by using boundary_conditions
run control file variable, an example of which is shown below.
boundary_conditions:
<
Inlet=totalPressureInlet(p0=135.0 psi, T=164 R, k=0.05, omega=282.46, incompressible),
IPipe=noslip(adiabatic),
OPipe1=noslip(adiabatic),
OPipe2=noslip(adiabatic),
YPart=noslip(adiabatic),
Outlet1=fixedMassOutlet(mdot=-1027.8 lbm/s),
Outlet2=fixedMassOutlet(mdot=-1027.8 lbm/s)
>
The names of the boundaries specified on the left-hand sides of the declarations above must match those defined in the .vog
file for the
simulation. In the .vog
file, each boundary name is identified with a set of boundary faces on the mesh which comprise the boundary. The
corresponding boundary condition specified on the right-hand side of the boundary condition declaration is applied to all faces that comprise the
boundary. During the grid generation process, it is important that all faces on the boundary of the domain be assigned to a boundary name.
Should any faces not be included in a boundary name group, the code has no way of specifying the boundary conditions for those faces, and will
terminate due to an insufficient problem specification. The types of boundary conditions supported in Stream are described in the following sections.
extrapolatedPressureOutlet
This outlet boundary condition is appropriate for compressible flow problems where the flow is supersonic at the outlet. An example of its usage is shown below:
Outlet=extrapolatedPressureOutlet
There are no options required by this boundary condition. Velocity, pressure, temperature, and turbulence quantities are all extrapolated from the center of the cell adjacent to the boundary face to the boundary face center. Density is then computed from the equation-of-state. Due to the use of zeroth-order extrapolation, it is prudent that outlet boundaries using this boundary condition be placed in a location where streamwise gradients are small, as well as to ensure that the grid is highly orthogonal, with the line from any boundary cell center to its respective boundary face center very closely aligned with the boundary normal vector.
fixedMassOutlet
This outlet boundary condition is appropriate for both incompressible and compressible flow problems. Two options are available. Using
the mdot
option, the total mass flow rate through the boundary can be specified directly, as shown below:
Outlet=fixedMassOutlet(mdot=-10.0 kg/s)
Alternately, using the massFlux
option, the mass flow rate per unit area over the boundary can be specified, as follows:
Outlet=fixedMassOutlet(massFlux=-2.0 kg/m/m/s)
Internally, Stream operates using only mass fluxes for the boundary faces. When the boundary mass flow rate is specified using the mdot
option,
the equivalent massFlux
is computed automatically by dividing the specified value by the total boundary area.
By convention, a negative value indicates mass flow out of the domain. Positive values for this boundary condition should not be used.
One may specify any units that are consistent with the units shown above, and conversion to SI units will be handled internally by the code.
For incompressible flows, density, pressure, and turbulence quantities are extrapolated from the center of the cell adjacent to the
boundary face to the boundary face center. For compressible flows, pressure, temperature, and turbulence quantities are extrapolated and
then density is computed from the equation-of-state. The velocity on any boundary face is then computed directly from the mass flux and the local
face density, and is assigned to be in the direction of the local face outward normal vector.
fixedPressureInlet
This inlet boundary condition is appropriate for both incompressible and compressible flow problems, and is designed to hold either a specified
pressure or a specified mean pressure over the boundary. The velocity at the boundary faces is obtained via extrapolation from the adjacent cell
centers in the interior of the domain. For incompressible simulations, one should specify the value of the pressure or the mean pressure.
For compressible simulations, the temperature at the boundary must also be specified using any of the
available scalar specification forms detailed here . If the simulation
involves turbulent flow, one should also specify the turbulence
intensity I
, and the turbulent to laminar viscosity ratio muRatio
. These
two quantities may only be assigned as constant values. Profiles for I
and muRatio
are not currently available. Inlet values for the primitive turbulence variables
variables k
, omega
, and epsilon
are then computed based on the following equations:
If the simulation contains multiple species, one should also assign the species mass fraction values using the mixture option. When using the mixture option, one need not list values for which the species mass fraction is zero, as this will be automatically handled by the code.
Inlet=fixedPressureInlet(p=101325.0 Pa, I=0.03, muRatio=100.0)
Inlet=fixedPressureInlet(pMean=101325.0 Pa, T=300.0K, mixture=[H2=0.5, O2=0.5],
I=0.03, muRatio=100.0)
fixedPressureOutlet
This outlet boundary condition is appropriate for both incompressible simulations and compressible simulations where the flow always remains subsonic on the outlet boundary. There are two types of pressure constraints which may be employed for this boundary condition. Since there is no default value, one must explicitly specify either one of the constraints. With the first constraint, a constant pressure is specified and maintained on all boundary faces of the mesh comprising the boundary.
Outlet=fixedPressureOutlet(p=202650 Pa)
With the second type of constraint, a mean pressure is specified and maintained on the boundary. This is implemented internally within the code by extrapolating the current pressure field from the cells next to the boundary to the boundary faces and then adding the same constant pressure correction value to all boundary faces to achieve the desired mean value.
Outlet=fixedPressureOutlet(pMean=101320 Pa)
All other solver variables including velocity are extrapolated from the interior of the domain to the boundary. By default, this extrapolation will not allow flow to come into the domain through any face on the boundary. In certain instances, such as the case where one is using this boundary condition to approximate a far-field boundary of nearly constant pressure, one may wish to allow entrainment (flow coming into the domain from outside the domain) to occur.
Outlet=fixedPressureOutlet(p=202650 Pa, entrainment)
The entrainment
option can be used with both the p=
and pMean=
options. In general, one will only want to use this option when there is
relatively weak recirculation through the boundary. For internal flow problems, if one finds any recirculation zones in the vicinity of the
outlet boundary, it is preferable to re-grid the domain in such a way (by including a part of a downstream component, for example) as to
eliminate recirculation at the outlet, which otherwise could be a cause of numerical instability preventing the simulation from achieving
convergence.
incompressibleInlet
This boundary condition is used only for incompressible flow simulations. For laminar flow simulations, one need only specify the velocity, either directly via the velocity value (using any the of methods detailed here) or indirectly via the mass flux or mass flow rate through the boundary. The usage of these three methods is shown below:
Inlet=incompressibleInlet(v=[1.0 m/s, 0.5 m/s, 0.1 m/s])
Inlet=incompressibleInlet(massFlux=0.5 kg/m/m/s)
Inlet=incompressibleInlet(mdot=2.7 kg/s)
For turbulent flow simulations, one must also specify the turbulence quantities at the inlet using the k=
and omega=
options using any of the
methods for scalar values detailed here.
For compatibility with Chem, the option prescribed=
is also allowed. With this option, one can specify a data file in which the velocity,
pressure, temperature, and turbulence quantities are specified at several control points. Values are computed at the centers of the faces
on the boundary via a generalized interpolation of the data specified at the control points. For the incompressibleInlet
boundary condition, only
the velocity and turbulence quantities (for turbulent simulations) are used from the data file, since this is the only required information for
incompressible flow.
Inlet=incompressibleInlet(prescribed="bc.dat")
Any name may be specified for the boundary condition file. If one specifies no name between the quotes, the default file name bc.dat
is
used.
noslip
The noslip
boundary condition should be used for all solid surfaces in viscous flow simulations. For compressible flow simulations, it is
IMPORTANT to note that there is no default method that is automatically selected for heat-transfer at the boundary. Thus, one must
explicitly assign either an adiabatic, specified temperature or specified heat flux conditions as an option. The following sections
detail all the available options for the no-slip boundary condition.
Wall Functions
The default mode of operation is to compute wall viscous stresses and heat transfer using the standard gradient operations with information in the vicinity of the wall. This is the so-called gridding down to the wall approach, where wall functions are not employed by default. When using this mode, one should ensure that \(y^+ < 3`\) for accurate viscous stresses and heat fluxes. For incompressible flow, because the energy equation is not solved, if one is gridding down to the wall, there are no options required for the no-slip boundary and the boundary condition can be used in either of the following ways:
Wall=noslip
Wall=noslip()
Wall functions can be activated by using the wallFunction
option.
Wall=noslip(wallFunction)
The only wall function model currently available is that of [NiNe2003]. It is important to note that wall functions are enabled on a patch-by-patch
basis. Only boundary patches with the wallFunction
option will employ wall functions, while the remaining no-slip surfaces without the
wallFunction
option will employ the default approach of gridding down to the wall.
Adiabatic Wall
For solid surfaces with no heat flux through any part of the boundary, one should use the adiabatic
option. If one is gridding down to the
wall, one would specify the boundary condition as follows:
Wall=noslip(adiabatic)
Wall functions can also be enabled for adiabatic boundaries, in which case one need only tack on the wallFunction
option.
Specified Temperature at the Wall
For solid surfaces with a fixed temperature distribution, one should use the option T=
, with any of the methods
specified here to assign
the temperature distribution. Wall functions may also be used for boundaries with specified temperature by tacking on the wallFunction
option, in a manner like the following:
Wall=noslip(T=500 K, wallFunction)
For compatibility with Chem, the option Twall=
is also supported. This option can also be used to specify a constant scalar wall temperature
value like the example above.
Specified Heat Flux at the Wall
For solid surfaces with a fixed heat flux (\(\frac{W}{m^{2}}\)) through the wall, one should use the option qwall=
in the following
manner (default units shown):
Wall=noslip(qwall=1024 W/m/m)
A single constant heat flux value is the only means of specification currently supported. Any units consistent with \(\frac{W}{m^{2}}\) may be used. By convention, the value specified is defined to be the heat flux from the fluid domain to the wall. Thus, one should specify a negative value to have positive heat transfer from the wall to the fluid. At the current time, wall functions cannot be used with the specified heat flux condition, so one must use this option only when gridding down to the wall.
Specified Wall and Reservoir Conditions
If one wants to approximate the condition in which a wall of known effective thermal resistance separates the fluid domain from a reservoir held at constant temperature, one can specify the wall and reservoir conditions in the following manner (default units shown):
Wall=noslip(Treservoir=400 K, Rwall=10.0 m*m*K/W)
At the current time, only constant value specifications for both Treservoir
and Rwall
are supported. With the supplied reservoir
temperature and wall effective thermal resistance, the code will perform a 1-D wall heat-transfer balance to compute the wall temperature that
balances the flux leaving the fluid domain with that entering the reservoir. At the current time, wall functions cannot be used with this
specification, so one must use this option only when gridding down to the wall.
slip
The slip
boundary condition should be used for all solid surfaces in inviscid flow simulations. All flow variables are extrapolated to the
boundary from the cell values in the interior of the domain. There are no options required for this boundary condition.
Wall=slip
subsonicInlet
This boundary condition is only used for compressible flow simulations. For numerical stability purposes, the flow should remain subsonic on the boundary during the entire simulation. Pressure on the boundary is obtained by extrapolation from the interior of the domain. Density on the boundary is computed from the equation of state once the temperature at the boundary is known. The velocity on the boundary may be specified either directly via the velocity value (using any the of methods detailed here) or indirectly via the mass flux or mass flow rate through the boundary. The usage of these three methods is shown below:
Inlet=subsonicInlet(v=[0.5 m/s, 0.1 m/s, 1.0 m/s])
Inlet=subsonicInlet(massFlux=0.5 kg/m/m/s)
Inlet=subsonicInlet(mdot=2.7 kg/s)
Note that unlike for incompressibleInlet
, the explicit specification of the boundary velocity via the v=
option does not result in a fixed-mass
inlet because the density at the boundary will evolve during the simulation. The temperature on the boundary must also be specified with
the T=
option using any the of methods detailed here for scalar
specification. For turbulent flow simulations, one must also specify the turbulence quantities at the inlet with the k=
and omega=
options,
again using any of the methods detailed here for scalar
specification. If the simulation contains multiple species, one should also assign the species mass fraction values using the mixture=
option.
When using the mixture=
option, one need not list values for which the species mass fraction is zero, as this will be automatically handled by
the code.
Inlet=subsonicInlet(mdot=2.7 kg/s, T=400 K, k=0.05 m*m/s/s, omega=500.0 1/s,
mixture=[H2=0.5, O2=0.5])
For compatibility with Chem, the option prescribed=
is allowed. With this option, one can specify a data file in which the velocity,
pressure, temperature, mixture species mass fractions and turbulence quantities are specified at several control points. Values are computed
at the centers of the faces on the boundary via a generalized interpolation of the data specified at the control points. For the
subsonicInlet
boundary condition, the only quantity not used from the data file is the pressure because pressure is extrapolated from the
interior of the domain.
Inlet=subsonicInlet(prescribed="bc.dat")
Any name may be specified for the boundary condition file. If one specifies no name between the quotes, the default file name bc.dat
is
used.
supersonicInlet
This boundary condition is only used for compressible flow simulations. For numerical stability purposes, the flow should remain supersonic on the boundary during the entire simulation. The velocity on the boundary may be specified either directly via the velocity value (using any the of methods detailed here) or indirectly via the mass flux or mass flow rate through the boundary. The usage of these three methods is shown below:
Inlet=supersonicInlet(v=[0.5 m/s, 0.1 m/s, 1.0 m/s])
Inlet=supersonicInlet(massFlux=0.5 kg/m/m/s)
Inlet=supersonicInlet(mdot=2.7 kg/s)
The temperature and pressure on the boundary must also be specified with the T=
and p=
options, respectively. Temperature may be specified
using any the of methods detailed here for scalar specification,
however, at the current time only a single constant value may be specified for pressure. For turbulent flow simulations, one must also
specify the turbulence quantities with the k=
and omega=
options, again
using any of the methods detailed here for scalar
specification. If the simulation contains multiple species, one should also assign the species mass fraction values using the mixture=
option.
When using the mixture=
option, one need not list values for which the species mass fraction is zero, as this will be automatically handled by
the code.
Inlet=supersonicInlet(mdot=2.7 kg/s, p=202650 Pa, T=400 K, k=0.05 m*m/s/s,
omega=500.0 1/s, mixture=[H2=0.5, O2=0.5])
For compatibility with Chem, the option prescribed=
is also allowed. With this option, one can specify a data file in which the velocity,
pressure, temperature, mixture species mass fractions and turbulence quantities are specified at several control points. Values are computed
at the centers of the faces on the boundary via a generalized interpolation of the data specified at the control points. For the
supersonicInlet
boundary condition, all entries from the data file are used since no information is extrapolated from the interior to the
boundary for supersonic flow. The prescribed=
option is used in a manner shown below:
Inlet=supersonicInlet(prescribed="bc.dat")
Any name may be specified for the boundary condition file. If one specifies no name between the quotes, the default file name bc.dat
is
used.
Symmetry
This boundary condition is used where one desires to enforce a zero normal gradient condition at the boundary. This includes symmetry
boundaries in 3-D simulations where the flow is symmetric about the boundary. For 2-D simulations, flow variables are only a function of two
of the coordinate directions. Grid boundaries with normal vectors parallel to the third coordinate direction should be assigned as
symmetry
so the flow solution will not vary in this third direction. As there are no options required for this boundary condition, it is
generally used as follows:
Boundary=symmetry
totalPressureInlet
This boundary condition can be used for both incompressible and compressible flow and is designed to hold a single fixed value of total
pressure at each of the faces on the boundary. The total pressure value is specified using the p0=
option. Temperature can be specified either
directly with the T=
option or indirectly with a total temperature via the T0=
option. If temperature is specified, any of the methods detailed
here for scalar specification may be used. If total temperature
is specified, one may only use a single constant value. For turbulent flow simulations, one must also specify the turbulence quantities with
the k=
and omega=
options, again using any of the methods detailed here
for scalar specification. If the simulation contains multiple species, one should also assign the species mass fraction values using
the mixture=
option. When using the mixture=
option, one need not list values for which the species mass fraction is zero, as this will be
automatically handled by the code.
Inlet=totalPressureInlet(p0=202650 Pa, T0=400 K, k=0.05 m*m/s/s, omega=500.0 1/s,
mixture=[H2=0.5, O2=0.5])
For compressible flows with real fluids, one must also use the option incompressible
. This is currently required since the implementation of
the total pressure inlet for compressible flow is based on equations which assume an ideal-gas equation of state. Use of the incompressible
option instructs the code to revert to the incompressible form of the total pressure relations, which is a suitable approximation for low Mach
number inlet flows.
Inlet=totalPressureInlet(p0=202650 Pa, T0=400 K, k=0.05 m*m/s/s, omega=500.0 1/s,
mixture=[H2=0.5, O2=0.5], incompressible)
If the simulation involves an incompressible flow, then one should not include the incompressible
option, as the incompressible form of the
total pressure relation is automatically invoked by the code.
References
Nichols and C. C. Nelson, “Application of hybrid rans/les turbulence models,” in Technical Report, 2003.