Upload
others
View
21
Download
5
Embed Size (px)
Citation preview
Grid and Mesh Generation
Introduction to its Concepts and Methods
Elements in a CFD software system
Introduction
• What is a grid ?– The arrangement of the discrete points
throughout the flow field is simply called a grid.
• What is grid generation ?– The way that a grid is determined is called grid
generation.
Introduction• Why is grid generation necessary ?
– The standard finite difference methods require a uniformly spaced rectangular grid.
– If a rectangular grid is used, few grid points fall on the surface.
– Flow close to the surface being very important in terms of forces, a rectangular grid will give poor results in such regions.
The rectangular grid is not appropriate for solution of the flow field.
Introduction• How to overcame those problems ?
– Use a nonuniform, curvilinear grid to make the grid points naturally fall on the airfoil surface.
• The grid is not rectangular and is not uniformly spaced.
• The conventional difference equations are difficult to use.
• Need to transform the curvilinear grid in physical space (x,y) to a rectangular grid in computational space (ξ, η).
Introduction
• The procedure is as follows:– Establish the transformation relations between the
physical space and the computational space
– Transform the governing equations and the boundary conditions into the computational space.
– Solve the equations in the computational space using the uniformly spaced rectangular grid.
– Perform a reverse transformation to represent the flow properties in the physical space.
Outline• General transformation
• Grid Generation– Stretched (compressed ) grids
– Boundary-fitted coordinate system
– Adaptive grids
– Some modern development in grid generation
• Mesh Generation for Finite-Volume Method– Unstructured Meshes– Cartesian Meshes
Physical Space & Computational Space
• If the airfoil is cut and the surface straightened out, it would form the x-axis.
• Similarly, the outer boundary would become the top boundary of the computational domain.
• The left and right boundaries of the computational domain would represent the cut surface.
• Note the locations of points a, b, and c in the two figures.
General transformation
• The basic idea behind grid generation is the creation of the transformation laws between the physical space and the computational space.
• There is a one-to-one correspondence between the physical space and the computational space.– Each point in the computational space represents a point in the
physical space.
• These laws are known as the metrics of the transformation.
Transformation Relationship
),,(),,(),,,( zyxandzyxzyx ζζηηξξ ===
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
=
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
zyx
zyx
zyx
www
vvv
uuu
zw
yw
xw
zv
yv
xv
zu
yu
xu
ζζζ
ηηη
ξξξ
ζηξ
ζηξ
ζηξ
Jacobin matrix
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
=
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
−
ζηξ
ζηξ
ζηξ
zzz
yyy
xxx
J 1
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
=
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
zyx
zyx
zyx
Jζζζ
ηηη
ξξξ
• Evaluation of the Transformation ParametersTypically the mapping is only defined at grid and the transformation parameters must be evaluated numerically.
The same means of discretization should be used for the evaluation of the transformation parameters and the derivative in the governing equations
kjkj
kjkj xxx
,1,1
,1,1
−+
−+
−
−≈
ξξξ1,1,
1,1,
−+
−+
−
−≈
kjkj
kjkj xxx
ξηη
kjkj
kjkj yyy
,1,1
,1,1
−+
−+
−
−≈
ξξξ1,1,
1,1,
−+
−+
−
−≈
kjkj
kjkj yyy
ξηη
2,1,,1 2
ξξξ∆
+−= +− kjkjkj xxx
x
21,,1, 2
ηηη∆
+−= +− kjkjkj xxx
x
• The governing equations in generalized coordinatesThe continuity equation in Cartesian coordinates
The continuity equation in generalized coordinates
0)()()( =++ ηξρρρ
JV
JU
J
cc
t
vuU yxc ξξ +=where vuV yx
c ηη +=
0=∂∂
+∂∂
+∂∂
yv
xu
tρρρ
Formulation of grid generation problems• In the view of physics
– Find out topological correspondence between the physical and computational domains
• In the view of mathematics– Given x = xb(ξ, η) and y = y b(ξ, η) on the boundary ∂R.– Generate x = x(ξ, η) and y = y (ξ, η) in the region R bounded by ∂R
Grid Generation Methods
• Algebraic methods
• Elliptic Grid Generation
• Adaptive grids
• Some examples of modern development in grid generation– 3-D dimensional boundary-fitted coordinate + adaptive grid
– Zonal grids
– Hybrid scheme
– Overlapping block
Algebraic Methods
• Concepts– Known functions are used to map irregular physical
domain into rectangular computational domains.
• Examples– Stretched (compressed ) grids
– Boundary Fitted Coordinate System
Example: Stretched (compressed ) grids
• Grid stretching may be necessary for some problems such as flow with boundary layers.
• Consider the transformation:
)1ln( +==
yx
ηξ
Inverse transformation
1−=
=η
ξ
eyx
Example: Stretched (compressed ) grids
• The following derivatives are used in the transformation
1, 0
10, 1
x y
x y y
ξ ξ
η η
∂ ∂= =
∂ ∂∂ ∂
= =∂ ∂ +
1, 0
0,
x y
x y eξ ξ
ηη η
= =
= =
)1ln( +==
yx
ηξ
1−=
=η
ξ
eyx
Example: Stretched (compressed ) grids
• The relation between increments ∆y and ∆η
Therefore as η increases, ∆y increases exponentially.
Thus we can choose ∆η constant and still have an exponential stretching of the grid in the y-direction.
ηηη
ηηη ∆=∆⇒=⇒= eydedyeddy
Example: Stretched (compressed ) grids
• Transform the continuity equation
Note there is relation between (x,y) plane and (ξ,η) plane
Example: Stretched (compressed ) grids
Substitute for the derivatives in Eq. (5.54) to get
Eq. (5.57) is the continuity equation in the computational domain.
Thus we have transformed the continuity equation from the physical space to the computational space.
Boundary Fitted Coordinate System
• Here we consider the flow through a divergent duct
– de is the curved upper wall
– fg is the centerline.
• Let ys = f(x) be the function that represents the upper wall.
• The following transformation will give rise to a rectangular grid.
max
(5.65)/ (5.66)
xy y
ξη==
Boundary Fitted Coordinate System
• Example:2
max
2max
3
2 2
.......1 2
,
1, 0
2 2 2
1 1
y x xy yx
y x
x yy
x x x
y x
ξ η
ξ ξ
η η ηξ
ηξ
= ≤ ≤
= = =
∂ ∂= =
∂ ∂∂
= − = − = −∂∂
= =∂
Elliptic Grid Generation• The grid generation problem can be considered as a
boundary-value problem, where the boundary conditions (namely, values of x and y) are known everywhere along the boundary.
Given x = xb(ξ, η) and y = y b(ξ, η) on the boundary ∂R.
Generate x = x(ξ, η) and y = y (ξ, η) in the region R bounded by ∂R.
The transformation can be defined by an elliptic partial differential equation.
Elliptic Grid Generation• Simplest elliptic equations
• Comments• The elliptic equations are chosen to relate ζ and η to x and y
and hence constitute a transformation ( one-to-one correspondence of grid points) from the physical plane to the computational plane.
0
0
2
2
2
2
2
2
2
2
=∂∂
+∂∂
=∂∂
+∂∂
yx
yxηη
ξξ
Elliptic Grid Generation• An Example:
Adaptive Grids• Motivation
– Grid generation is important for the solution of CFD
Adaptive Grids
• Motivation - Why need adaptive grids ?– We should put more grid points in the flow field with
large gradients, and put less grid points in the flow field with small gradients.
– How do we know in advance where the major action is going to occur in the flow without actually solving the problem ?
– An adaptive grid is a solution !
Adaptive Grids• What is an adaptive grid ?
– A grid network that automatically clusters grid points in the regions of high flow-field gradient;
– It uses the solution of the flow-field properties to locate the grid points in physical plane.
– It is intimately linked to the flow-field solution and changes as the flow field changes.
• During the course of the solution, the grid points in the physical plane move in such a fashion to adapt to regions of large flow-field gradients as these gradients evolve with time.
• It became stationary only when the flow solution approach a steady state.
Adaptive Grids
• Example
Some Modern Developments• 3-D dimensional boundary-fitted coordinate + adaptive grid
F-20
Some Modern Developments
• Zonal grids (Multi-block methods)– The grid consists of two or more blocks– Each block is a separate grid different from the others.
Some Modern DevelopmentsA zonal grid wrapped an F-16 airplane.
Surface grid is shown as part of a 20-block grid.
Some Modern Developments in Finite-Volume Mesh Generation
• What is a structured mesh ?– The grid lines in physical space pertain to constant coordinate
values ζ, η and ζ in the transformed space.
– A given family of coordinate lines do not intersect.
• What is an unstructured mesh ?– Nonuniform grids in physical space, not necessarily having the
features of a structured mesh.
• The finite-volume calculations can be made directly in the physical plane on a nonuniform mesh.
Some Modern Developments in Finite-Volume Mesh Generation
• Examples for structured meshes and unstructured meshes
unstructured meshesstructured meshes
Return to Cartesian Meshes
• Ordinary Cartesian Meshes– Easy to generate rectangular cells
– Not accurate in the region adjacent to the body surface
• Modified Cartesian Meshes– The mesh cells away from the body can be rectangular
– Those cells adjacent to the body can be modified in the shape such that one side of each cell is along the body surface.
Return to Cartesian Meshes
• Schematic diagram of modified Cartesian meshes
Return to Cartesian Meshes
• Modified Cartesian meshes + Adaptive concept
A Cartesian mesh for the calculation of the subsonic flow over multielement airfoil
Return to Cartesian Meshes• Modified Cartesian meshes + Adaptive concept
A Cartesian mesh for the calculation of the hypersonic flow over a double ellipsoid, a configuration somewhat like the space shuttle
Overlapping block• This approach consists of building partially overlapping blocks.
• Boundary conditions need to be exchanged at the interface between domains and this is usually done through some form of interpolation.
Hybrid scheme• The hybrid scheme takes advantage of both unstructured and
structured methods by applying structured body fitted coordinates to the body and unstructured networks in the outer boundaries.
Final Remarks
• A transformation is required for finite-difference methods, because the finite-difference expressions are evaluated on the uniform grid.
• A transformation is inherently not required for finite-volume methods, because it can deal directly with a nonuniform mesh in the physical plane.