Transcript Slide 1

HOMEWORK
Application of Environment Spatial Information System
HW – Boundary Conditions
Minkasheva Alena
Thermal Fluid Engineering Lab.
Department of Mechanical Engineering
Kangwon National University
2007.05.18
Contents
1. Boundary Condition Types
2. Boundary Conditions in CFD
Introduction
Inlet Boundary Conditions
Outlet Boundary Conditions
Wall Boundary Conditions
The Constant Pressure Boundary Condition
Symmetry Boundary Condition
Periodic or Cyclic Boundary Condition
Boundary Conditions in CFD - Final Remarks
1
Contents
3. Boundary Conditions in PHOENICS
Nomenclature
The Algebraic Equations
The Source Term
The Types of Boundary Condition in PHOENICS
Fixed Value Boundary Condition
Fixed Flux / Fixed Source Boundary Condition
Linear Boundary Condition
Non-Linear Boundary Condition
Laminar Wall Boundary Condition
Turbulent Wall Boundary Condition
Inflow Boundary Condition
Boundary Conditions in PHOENICS - Final Remarks
2
1. Boundary Condition Types
Five types of boundary conditions are defined at physical boundaries.
The “zeroth” type designates those cases with no physical boundaries.
In the equations below the coordinate at the boundary is denoted ri
and i indicates one of the boundaries.
Type 1. Prescribed temperature (Dirichlet condition)
specify the value of the function on a surface:
T ( ri, t )  f i (ri , t )
Type 2. Prescribed heat flux (Neumann condition)
specify the normal derivative of the function on a surface:
T
k
n i
 f i ( ri , t )
ri
here ni is the outward-facing normal vector on the body surface.
1
1. Boundary Condition Types
Type 3. Convective boundary condition
(sometimes called the Robin condition):
T
k
ni
 hi T (ri, t )  f i (ri, t )
ri
here hi is the heat transfer coefficient and specified function fi is
usually equal to hiT∞ where T∞ is a fluid temperature.
Type 4. Thin, high-conductivity film at the body surface:
T
k
n i
ri
T
 f i (ri , t )  (  cb)i
t
ri
here product (ρ cb)i are properties of the surface film (density,
specific heat, and thickness), and the surface film must have a
negligible temperature gradient across it (“lumped”).
2
1. Boundary Condition Types
3
Type 5. Thin, high-conductivity film at the body surface, with the
addition of convection heat losses from the surface:
T
T
k
 hi T ( ri, t )  f i ( ri , t )  (  cb)i
t
ni r
i
ri
Type 0. No physical boundary. The number 0 (zero) is used where
there is no physical boundary, which arises in some body shapes.
2. Boundary Conditions in CFD
Introduction
All CFD problems are defined in terms of initial and boundary conditions.
In transient problems the initial values of all the flow variables need to be
specified at all solution points in the flow domain.
The most common boundary conditions in the discretised equations of the
finite volume method:
• inlet
• outlet
• wall
• prescribed pressure
• symmetry
• periodicity (or cyclic boundary condition)
Inlet Boundary Conditions
The distribution of all flow variables needs to be specified at inlet boundaries
Figures 1 and 2 show the grid arrangement in the immediate vicinity of an inlet for
u- and v- momentum, scalar and pressure correction equation cells.
The grid extends outside the physical boundary and the nodes along the line I=1
(or i = 2 for u-velocity) are used to store the inlet values of flow variables (uin, vin p’in)
Fig. 1 u-velocity cell at the
inlet boundary
Fig. 2 v-velocity cell at the
inlet boundary
1
Inlet Boundary Conditions
2
The diagrams show the “active” neighbours and cell faces which are represented in the
discretised equation for the shaded cell.
All links to neighbouring nodes remain active for the first u-, v- and φ-cell, so to
accommodate the inlet boundary condition for these variables it is unnecessary to make
any modifications to their discretised equations.
Figure 3 shows that the link with the boundary side is cut in the discretised pressure
correction equation by setting the boundary side (west) coefficient aW equal to zero.
Fig. 3 Pressure correction cell
at inlet boundary
Fig. 4 Scalar cell at
inlet boundary
Outlet Boundary Conditions
1
If the location of the outlet is selected far away from geometrical disturbances the flow
often reaches a fully developed state where no change occurs in the flow direction.
In such a region we can place an outlet surface and state that the gradients of all
variables (except pressure) are zero in the flow direction.
Figures 5 to 8 show the grid arrangements near such an outlet boundary.
We have shaded the last cells upstream of the outlet, for which a discretised equation is
solved, and highlighted the active neighbours and faces.
Fig. 5 u-velocity cell at an
outlet boundary
Fig. 6 v-velocity cell at an
outlet boundary
Outlet Boundary Conditions
2
If NI is the total number of nodes in the x-direction, the equations are solved for cells up
to I (or i) = NI -1. Before the relevant equations are solved the values of flow variables
at the next node (NI), just outside the domain, are determined by extrapolation from the
interior on the assumption of zero gradient at the outlet plane.
For the v- and scalar eqs. this implies setting vNI,j = vNI-1,j and φNI,j = φNI-1,j
Calculation of u-velocity at the outlet plane i = NI by assuming zero gradient gives
uNI,J = uNI-1,J
Fig. 7 Pressure correction cell
at outlet boundary
Fig. 8 Scalar cell at
outlet boundary
Wall Boundary Conditions
The wall is the most common boundary in confined fluid flow problems.
Figures 9 to 11 illustrate the grid details in the near wall regions for the u-velocity
component (parallel to the wall), for the v-velocity component (perpendicular to the
wall) and for scalar variables.
Fig. 9 u-velocity cell at a
wall boundary
1
Wall Boundary Conditions
2
The no-slip condition (u = v =0) is the appropriate condition for the velocity
components at solid walls. The normal component of the velocity can simply be set to
zero at the boundary ( j = 2) and the discretised momentum equation at the next v-cell in
the flow ( j = 3) can be evaluated without modification.
For all other variables special sources are constructed, the precise form of which
depends on whether the flow is laminar or turbulent.
Fig. 10 v-velocity cell at a wall boundary
(a) j=3 and (b) j=NJ
Wall Boundary Conditions
Fig. 11 Scalar cell at a wall boundary
There are several types of wall boundary conditions:
Laminar Flow/Linear Sub-layer
Turbulent Flow
Rough walls
Moving walls
3
Wall Boundary Conditions
4
Velocity=0, temperature or heat flux given
Inflow
boundary
Density,
velocity and
temperature
given
Outflow
boundary
Flow
Solid wall
Velocity=0, temperature or heat flux given
Fig. 12 Boundary conditions for an internal flow problem
Wall Boundary Conditions
Inflow
boundary
Open boundary
Velocity = 0, temperature
or heat flux given
Density,
velocity and
temperature
given
Flow
Solid object
Open boundary
As inflow be where flow into
domain through open boundary
Or as outflow be where
flow out of domain
Fig. 13 Boundary conditions for external flow problem
5
Outflow
boundary
Wall Boundary Conditions
Inlet
boundary
condition
Wall boundary condition
Solution region
Symmetry
boundary condition
Fig. 14 Example of flow boundaries with
symmetry conditions
6
Outlet
boundary
condition
Wall Boundary Conditions
Cyclic
boundary
conditions
Wall
boundary
condition
7
Cyclic
bc
Inflow
bc
Outflow
bc
Fig. 15 Examples of flow boundaries with
cyclic conditions
The Constant Pressure Boundary Condition
The constant pressure condition is used in situations where exact details of the flow
distribution are unknown but the boundary values of pressure are known.
The pressure correction is set to zero at the nodes.
The grid arrangement of the p’-cells near a flow inlet and outlet is shown in Figures 16
and 17.
Fig. 16 p’-cell at an
intlet boundary
Fig. 17 p’-cell at an
outlet boundary
Symmetry Boundary Condition
The conditions at a symmetry boundary are:
(1) no flow across the boundary
(2) no scalar flux across the boundary.
In the implementation, normal velocities are set to zero at a symmetry boundary
and the values of all other properties just outside the solution domain (say I or i= 1)
are equated to their values at the nearest node just inside the domain
(I or i = 2):
φ1,J = φ2,J
In the discretised p’- equations the link with the symmetry boundary side is cut by
setting the appropriate coefficient to zero; no further modifications are required.
Periodic or Cyclic Boundary Condition
1
Consider for example swirling flow in a cylindrical furnace is shown in Figure 18.
In the burner arrangement gaseous fuel is introduced through six symmetrically
placed holes and swirl air enters through the outer annulus of the burner.
Fig. 18 An example of a cyclic boundary condition
Periodic or Cyclic Boundary Condition
2
This problem can be solved in cylindrical polar co-ordinates (z, r,θ).
The pair of boundaries k = 1 and k =NK are called periodic or cyclic boundaries.
To apply cyclic boundary conditions we need to set the flux of all flow variables
leaving the outlet cyclic boundary equal to the flux entering the inlet cyclic
boundary. This is achieved by equating the values of each variable at the nodes just
upstream and downstream of the inlet plane to the nodal values just upstream and
downstream of the outlet plane. For all variables except the velocity component
across the inlet and outlet planes (say w) we have
φ1,J = φNK-1,J and
φNK,J = φ2,J
For the velocity component across the boundary we have
w1,J = wNK-1,J and
wNK,J = w3,J
Boundary Conditions in CFD - Final Remarks
Flows inside a CFD solution domain are driven by the boundary conditions.
In a sense the process of solving a field problem (e.g. a fluid flow) is nothing more
than the extrapolation of a set of data defined on a boundary contour or surface
into the domain interior. It is, therefore, of paramount importance that we supply
physically realistic, well-posed boundary conditions.
The single most common cause of rapid divergence of CFD simulations is the
inappropriate selection of boundary conditions.
The “main” boundary conditions for viscous fluid flows include inlet, outlet and
wall condition; three further conditions are constant pressure, symmetry and
periodicity. They are physically realistic and very useful in practical calculations.
3. Boundary Conditions in PHOENICS
In PHOENICS, boundary conditions and sources appear on the r.h.s. of the
differential equation for a variable f. Thus:
( f)


t
xh

f 
 U hf  Gf
  Sf  Sbc1  Sbc 2  ...  Sbcn
xh 

where: f - the variable in question
ρ - density
U - vector velocity
Sf - conventionally recognised source terms, such as pressure gradients or
viscous heating terms.
Gf - diffusive exchange coefficient for f.
Sbc1 etc. - various boundary conditions. These may be present only in
certain regions of the domain. More terms of this kind may be also be present in
other regions of the domain, and these regions may overlap.
Nomenclature
A compass-point notation:
P = Cell center
S → N = Positive IY
T = Cell center at previous time step
W → E = Positive IX
N,S,E,W,H,L = Neighbour-cell centers
L → H = Positive IZ
The Algebraic Equations
The differential equation is integrated over a control volume to yield the finitevolume equation actually solved. The integral of the boundary source is represented
in linearized form:
Sbc  TC(V  f )
The finite-volume discretization of the differential equation thus yields, for each
cell P in the domain, the following algebraic equation:
aPfP 

ahfh  Sf 
N ,S , E ,W ,H ,L,T
where: Sf - the “true” source
C - the coefficient
V - the value
T - the type, a geometrical multiplier
TC(V  f
P
patches
)
The Source Term
As a consequence of the integration procedure, the source is required per cell.
The units of the source are (f kg/s). The type is used to convert the source from any
given set of units.
Thus, if the source is defined as “per unit volume”, type supplies the cell volumes.
If the source is “per unit area”, type is an appropriate cell face area.
Note that TCV is added to the numerator, and TC to the denominator. As will be
shown, this allows for easy manipulation of the solution.
fP
af


h h
 Sf  TCV
a P   TC
The Types of Boundary Condition in PHOENICS
The types of boundary conditions in PHOENICS are:
• Fixed value
• Fixed flux / fixed source
• Linear boundary condition
• Non-linear boundary condition
• Wall conditions
• Inflows and outflows
• General sources
Fixed Value Boundary Condition
Practical example: we wish to fix the temperature in one corner of a cube
to 0.0, and to 1.0 in the diagonally opposite corner.
Numerical practice: the value of f can be fixed in any cell by setting C to a large
number, and V to the required value.
The equation then becomes:
fP
af


h h
 Sf  TCV
a P   TC
sm all num ber TCV

sm all num ber TC
TCV

V
TC
Fixed Flux / Fixed Source Boundary Condition
Practical example: heat is being generated at a constant (fixed) rate.
Numerical practice: a fixed source can be put into the equation by setting C to a
small number, so that the denominator is not changed, and by setting V to
(source/C). T then ensures that the final source is per cell.
The equation then becomes:
fP
af


h h
 Sf  TCV
a P   TC
source
 ahfh  Sf (T  tiny) tiny

aP  T  tiny
af


h h
 Sf  source
aP
Linear Boundary Condition
Practical example: One of the domain boundaries is losing heat to the surroundings.
The external heat transfer coefficient, H (W/m2/K), and the external temperature,
Text (K), are both known and constant.
Numerical practice: The heat source for a cell with area A is:
Q  AH (Text  TP )
This is obviously in TC(V - f) form if T = A, C = H and V=Text.
Non-Linear Boundary Condition
The non-linear source can always be linearized into TC(V - f) form by arranging to
update C and/or V during the course of the calculation.
Laminar Wall Boundary Condition
Laminar shear stress at stationary wall is expressed by:
dv
0  W1P
 W   A  1  area
dy
y
where area is the cell face area,
Δy is the distance from the cell face to the cell centre
This can be put into TC(V - f) form if T = area, C  1
y
and V=0.
The problem with this approach is that the density and laminar viscosity may be
varying, whilst the distance to the wall will change as the grid is refined, and
indeed may change from cell to cell in a BFC grid.
A special PATCH type is provided which automatically sets:
area
T  1
y
The coefficient is then a further multiplier, which is usually set to 1.0.
Turbulent Wall Boundary Condition
In a turbulent flow, the near-wall grid node normally has to be in the fully-turbulent
region, otherwise the assumptions in the turbulence model are invalid.
The wall shear stress and heat transfer can no longer be obtained from the simple
linear laminar relationships.
Unless a low-Reynolds number extension of the turbulence model is used, the
normal practice is to bridge the laminar sub-layer with wall functions. These use
empirical formulae for the shear stress and heat transfer coefficients.
Three types of wall function are available, selected by the COVAL settings:
• Coefficient GRND1 for Blasius power law
• Coefficient GRND2 for equilibrium Logarithmic wall function
• Coefficient GRND3 for Generalised (non-equilibrium) wall function
• Coefficient GRND5 for Fully-rough equilibrium Logarithmic wall function
Inflow Boundary Condition
All mass flow boundary conditions are introduced as linearized sources in the
continuity equation, with pressure (P1) as the variable. A mass source is thus:
Sm  TCm (Vm  P1P )
where Cm and Vm are coefficient and value for P1.
At an inflow boundary, the mass flow is fixed irrespective of the internal pressure.
This effect is achieved by setting Cm to FIXFLU, and Vm to the required mass flow.
The sign convention is that inflows are +ve, outflows are -ve. A fixed outflow rate
can thus be fixed by setting a negative mass flow.
Boundary Conditions in PHOENICS - Final Remarks
Boundary conditions and sources are treated in PHOENICS as linearized sources
having the form TC(V - f) .
For a variable f , the main kinds of boundary conditions are:
• Fixed-value boundary condition (coefficient = FIXVAL)
• Fixed-flux boundary condition (coefficient = FIXFLU)
• Wall-type boundary condition (patch type = *WALL)
• Linear boundary condition (coefficient = proportionality constant)
Boundary conditions for mass and pressure are both treated as linearized sources in
the continuity eq., with pressure as the variable in the linear source: TCm(Vm – P1p) .
FIXFLU is used as coefficient for the specification of mass fluxes,
and FIXVAL or FIXP for fixing the pressure.
Boundary conditions must be supplied for all the variables when there is an inflow
mass into the domain. This is done by using ONLYMS as coefficient in the
COVAL command for the property, and the inflowing value as value.
THE END