Professional Documents
Culture Documents
Boundary Conditions and Boundary Treatment
Boundary Conditions and Boundary Treatment
Boundary Conditions and Boundary Treatment
In CFD, Boundary Conditions (BC) are equally important than the governing
equations, even if most textbooks deal predominantly with the governing
equations only.
From mathematical point of view, BC’s are inherently linked with PDE’s. A
PDE must have BC’s to obtain a unique solution.
= ∞
u = u∞
v = v∞ for supersonic far-field inlet
w = w∞
p = p∞
However, BC’s only partially specify the flow at the boundary. For example,
the no-slip wall condition of (u=0, v=0, w=0) only specifies these three cell
variables and leaves the other two (pfree.
Also, BC’s don’t tell us that in what way should we ensure that (u=0, v=0,
w=0), i.e. what kind of formula should we apply (a linear or quadratic
extrapolation?) to ensure these conditions at the wall.
1
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
- FAR-FIELD:
- freestream, OR
OUTFLOW (outlet): - prescribed pressure, OR
- pressure extrapolated from
interior
[n100]
SYMMETRY PLANE
(same in wind tunnel and CFD)
Fig. 9.1. Illutstration of symmetry boundary conditions in two different CFD problems. an F-18 aircraft (top)
and a cylinder (bottom).
2
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
[n101]
COMPRESSOR STAGE COMBUSTOR TURBINE STAGE
a)
COMPUTATIONAL
BLADE 1
DOMAIN
BLADE 2
PERIODIC OUTLET
BLADE 3
PERIODIC INLET
b)
Fig. 9.2. Illustration of periodic boundary conditions for a turbine blade in a jet engine. General Electric J85
jet engine (a) and the computational domain for one of the blades (b).
3
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
Boundary Treatment (BT) reconstructs & models the flow properties at the
edges of the computational domain, using both BC’s and interior flow.
BT defines all flow properties at the boundaries, not just the ones required by
the BC’s.
Scheme: Stencil:
Cell to be solved
Fig. 9.3. Computational stencils for central, forward and backward differencing.
4
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
When we reach the edge of the computational domain, the scheme for the
interior cannot be applied since there are no neighbouring cells to solve for the
stencil. Thus, for boundary cells, the original numerical scheme applied for the
interior cells needs to be changed.
Example: [n103]
Fig. 9.4. Graphical illustration of changing the numerical method around a solid wall boundary.
[n103]
BOUNDARY OF COMPUTATIONAL
DOMAIN
Fig. 9.5. Graphical illustration of changing the computational domain around a solid wall boundary.
5
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
The big advantage of the ghost cell method is that the numerical scheme used
for the interior can be used unaltered for the boundaries. The idea is to introduce
“fake”, fictitious flow in the ghost cells – the so-called “ghost flow” - which will
yield the desired boundary conditions on the edge, i.e.
[n104]
For NO-SLIP SOLID WALL B.C. For FREE-STREAM FARFIELD B.C.
Fig. 9.6. Graphical illustration of setting up the ghost cell values for a solid wall and a free-stream
boundary condition.
6
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
[n105]
Solid Wall Solid Wall
Farfield Farfield
Boundary Boundary
Boundary Boundary
DESIRED
ACTUAL (WRONG)
Fig. 9.7. Graphical illustration of a signal’s reflection from a solid wall (left) and farfield (right)
boundary condition.
The second major criterion for developing Boundary Treatment is its effect
on the stability of a simulation. The selection of the proper combination of
the boundary conditions around all edges of the computational domain
will have a major effect on the stability of the simulation. To deal with
this, it is absolutely essential that one understands the mathematics and
physics behind Boundary Treatment.
In the following sections, the basics of the “ghost cell” method will be described
for the two most fundamental types of BC’s: solid wall and far-field, from the
point of view of compressible flow applications.
This will be followed by a look at the choice of BC’s on the stability of CFD
simulations, or in other words: what combination of BC’s should we set to not to
compromise the convergence of the solution.
For solid walls in 2D, the following BC’s are set as the requirement:
Note: - up1 is the velocity in the first cell near the wall.
- v = 0 is called the “no penetration BC”
7
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
For the ghost cell method, the most popular technique for constructing the BT
formula for solid walls is the “method of images”, also called as the “method of
reflections”. This method was originally invented for solving linear equations
around solid boundaries.
[n106]
v-distribution p and distribution
+2
+1
Fig. 9.8. Graphical illustration of the “method of images” for the treatment of solid wall boundary conditions
via the ghost cell method. Note that the illustration is for primitive variables, but similar definition could be
done for conservative variables too.
Note that the method of images means setting up equal but opposite flow in the
ghost cells, which will cause the interior flow to reflect back from the solid wall.
In other words, if there is a wave traveling at 50 m/s towards the wall from one
side, there will be an opposite wave traveling at 50 m/s from the other side. This
mechanism is in essence equivalent to the physics of shock-shock interaction.
[n107]
SHOCK REFLECTION DUE TO SHOCK 1-
SHOCK 2 INTERACTION.
Fig. 9.9. Shock reflection from two wedges exposed to supersonic (Mach > 1) flow. Flow from a solid wall
boundary should reflect in the same way as for example a shock wave from the symmetry line.
8
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
The problem with the ghost cell method is “cusping”. Cusping means that the
scalar quantities (, p) exhibit a discontinuity in their first derivatives at the
wall.
[n108]
Anyway, after discussing this simple Boundary Treatment in detail, now we are
in the position to summarize the pro’s and con’s of the ghost cell method:
DIS: - cusping: jumps in the 1st derivatives across the boundary can
lower the computational accuracy of the method at the boundaries.
- extra storage requirements (of the ghost cell geometry & values)
- quality of Boundary Treatment is determined by interior method
Note: - ghost cells are usually generated automatically within the code
and not in the grid generator.
9
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
Setting up the “ghost flow” for far-field BC’s is much trickier that it is for solid
walls. Why?
Because while solid boundaries are designed to reflect waves from the interior,
the far-field boundaries shall allow them to travel freely out of the domain, i.e. to
let them pass without reflection. Setting up such “non-reflecting BC’s” is not
simple.
Before looking into the Boundary Treatment of far-field boundaries, let us clarify
the terms far-field & freestream.
The real problem is that we do not know the far-field values, but only the
freestream ones. But, we need to set some values for the far-field, and we usually
set the freestream values for these.
Example: [n109]
(CLOSE TO FREESTREAM
CONDITIONS)
WAKE
THESE ARE NOT
FREESTREAM
CONDITIONS YET THE
EDGE IS DEFINED AS
FAR-FIELD OUTLET.
Fig. 9.11. Computational domain around an airfoil. Note that we impose freestream conditions at the far-
field inlet and outlet boundaries, even if these do not theoretically occur at these boundaries.
10
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
There are 3 steps for designing Boundary Treatment for a far-field boundary:
STEP 3: Assign values to chosen flow variables. This is the hardest step of
all, exactly because “far-field freestream” but we only know the free-
stream values.
The table below shows the number of flow variables to be specified for a far-field
boundary. We will explain later that how one arrives to these numbers.
INFLOW: SUBSONIC 2
SUPERSONIC 3
OUTFLOW: SUBSONIC 1
SUPERSONIC 0 (since no upstream
propagation of inform.)
Based on the above table, one can define the terms of ILL-POSED and WELL-
POSED problems:
11
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
Why do we need to define 3 quantities for supersonic inlet and none for
supersonic outlet, etc.?
This can be explained by looking at the characteristic curves of the flow. Any
flow can be described by the so-called characteristic curves or wavefronts, which
are in essence the curves along which the derivatives of the flow are
indeterminate (see Anderson pp. 97-100 and Laney pp. 36 for more details). An
example of the characteristic waves in a 1D subsonic and supersonic flow is
shown below.
[n110]
straight lines
for steady
uniform flow
Now, imposing a boundary at x=0 in the x-t plane (i.e. the point in the x-t plane
where the characteristic curves will emanate from) leads to:
12
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
[n111]
INFLOW – Subsonic: OUTFLOW – Subsonic:
2 chars. running into the domain 1 chars. running into the domain
(+ and 0) (-)
EXTERIOR INTERIOR
INTERIOR EXTERIOR
3 chars. running into the domain 0 chars. running into the domain
(+, - and 0) (none of +, - and 0)
Fig. 9.13. Characteristic waves running in and out of the domain at inflow and outflow
boundaries for both subsonic and supersonic flow.
Thus, the above figure explains the number of variables required for the various
types of far-field boundaries, as it was shown in the table at the beginning of this
section.
13
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
Recall that the characteristics are related to the primitive variables via the
following differential equations:
dp
dv0 d
a2
dp
Right running characteristic: dv du
a
dp
Left-running characteristic: dv du
a
Now, for example for SUBSONIC INLET, the two characteristics to be specified
at the boundary shall be the one, which are coming INTO the domain, i.e. :
dv 0
dv
The question is then that through which set of primitive variables can we define
dv0 and dv+ without ill-posing the problem? The possible choices and their
consequences are listed in the table below:
Specification of
Specify dv0 dv+ dv- Problem becomes
14
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
This is just one example. For SUPERSONIC INLET, for example, it does not
matter which 3 variables are given.
For external flows, where the nature of the far-field inlet and far-field outlet are
likely to be the same (either both subsonic or both supersonic), one can notice
from the table at the start of this section, that there is always a combination of 3
variables to be specified ALONG ALL far-field boundaries.
Once we know what to set at the inlet, we must take care not to duplicate these
at the outlet, i.e.
15
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
[n112]
OUTLET: must be u
(cannot be p or )
INLET: p,
Note: In this section, we will assume that the freestream (and not the far-field!!)
variables of (∞, u∞, p∞) are uniform and steady.
We have seen above that there are waves traveling across the interior of the
computational domain. This is the reason why we cannot simply set the ghost
cell values equal to the free-stream: when an outgoing wave passes across the
far-field boundary, it would like to rewrite the (, u, p) values in the ghost cells
and thus to violate the Boundary Conditions!!!
Option 1) set far-field boundary far away from the solid object,
16
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
Option 1) means that by the time the waves reach the far-field, they become
significantly damped by the numerical or physical viscosity in the simulations.
Thus, the waves will be too weak to cause significant effect by their reflection. In
this option, we can set far-field conditions equal to the freestream conditions.
However, this setup can introduce significant error. By moving the boundaries
far away, we create a very large circumference (or area) for the far-field, on
which the accumulated error between the enforced freestream and the actual
far-field boundaries can become significant. For example, circulation over an
airfoil must be constant along any closed line around the airfoil, which condition
is always going to be violated at the far-field if the freestream values are
imposed. If the far-field boundary line (or face) is too long, the accumulated error
will be significant.
So, instead of moving the far-field too far away from the solid object, it is better
to consider Option 2) and to develop non-reflecting boundary treatments.
u u u back-substitution to the Euler equations and dropping
the (f'g') terms leads to:
p p p
W W
C 0
t x
with the following matrix introduced:
u 0
1
C 0 u
0 a 2 u
17
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
The linearized Euler equations will then represent the flow in the ghost cells.
The waves traveling through the domain can be described via the 1D
wave equation as:
p = p1 (x – at) + p2 (x + at)
right-running left-running
wave wave
Thus, the outgoing waves will satisfy 2 equations at the same time:
- 1D wave equation
use these 2 eqs. for employing
- linearized differential eq. an asymptotic method
(math not shown in this course)
18
NGM_JF006_1: Computational Fluid Dynamics Széchenyi University
Instructor: D. Feszty, T. Jakubík Audi Department of Vehicle Engineering
- Take the differential eqs for the characteristics and solve them:
dp p
dv0 d v0
a2 a
2
dp
dv du v u
p
a a
dp
dv du v u
p
a a
- For the specific case of SUBSONIC INLET and SUBSONIC OUTLET:
19