Computational Fluid Dynamics Course: Grid Generation
Computational Fluid Dynamics Course: Grid Generation
Computational Fluid Dynamics Course: Grid Generation
Grid Generation
Ramesh K. Agarwal
Washington University in St. Louis, MO 63130, USA
Phone: +1-314-935-6091, Email: rka@wustl.edu
∂Q ∂E ∂F
+ + =0
∂t ∂x ∂y
• 2D Conservation Equations in Curvilinear Coordinates
There are certain general guidelines that are normally employed in generating a
suitable grid for a given application. Near solid or porous walls, the grid must be
very fine for calculating skin-friction and heat transfer. For turbulent flow, the first
grid point away from the wall should be at y+ < 2, if a low Reynolds number form of
the two-equation turbulence model is employed. With standard model, with the use
of wall functions, y+ ~ 20 may be O.K. However, the use of wall functions in general
is not recommended, especially for complex flows.
In other regions of high flow or temperature gradients such as shear layers, jets
and wakes, the grid should be fine enough to capture the gradients using a second-
order solver. This requires some knowledge of the expected flow features on the part
of the user unless a solution-adaptive grid approach is employed which
automatically arranges the grid density appropriately.
Grid Requirements for a Given Problem (Cont.)
In practice, the solution should be computed on at least two grids, a coarse
and a fine grid. It provides the user some idea about the dependence of the
solution on grid density. Based on these two solutions, an appropriate grid can
be generated that would result in almost grid independent solution.
It is very difficult to determine a good grid a-priori except using the above
guidelines. The visualization can be very helpful in generating a good grid as a
first guess.
Grid Generation
• Mesh morphing
Geometric Complexity – Grid Types
• Single block structured
• Multiple block structured (zonal)
• Single block unstructured
• Multiple block unstructured
• Patched and overset grids
• Cartesian grids with nested refinement
• Adaptive meshes
• Moving meshes
Grid Types
Cartesian Single Block
Structured
Multi-Block Chimera/
Structured Overset
Unstructured Hybrid
Properties of Good Grids
Structured Grids: It should be noted that the governing equations of fluid flow
are almost always written in orthogonal coordinate system. A good grid should
reflect this property for obtaining a good solution, when solving the equations in
differential form. Thus, the grid lines should be orthogonal as much as possible.
Additionally, they should not be skewed and should not have any cross-overs and
kinks. Even with the finite-volume method, these properties are important for
accurate calculation of fluxes across the cell faces and cell volumes (Jacobians).
∂Q ∂E ∂F
+ + =0
∂t ∂x ∂y
• 2D Conservation Equations in Curvilinear Coordinates
C-Grid:
H-Grid:
O-Grid:
Potential lines and Stream lines form a orthogonal net and represent a body conforming
orthogonal curvilinear grid around the circular cylinder.
∂Φ
∇2Φ = 0 , = 0 at r = a
∂r
∇ 2 Ψ = 0 , Ψ = 0 at r = a
Φ − lines
Ψ=0
ELLIPTIC GRID GENERATION
Body-Conforming Structured Grids
O-Topology:
C-Topology:
ELLIPTIC GRID GENERATION
2-D Body-Conforming Structured Grids
• Governing Equations:
∂ 2ξ ∂ 2ξ ∂ 2η ∂ 2η
+ 2 =0 , + 2 =0
∂ x ∂ y
2
∂ x ∂ y
2
ξ xx + ξ yy = P (ξ ,η )
η xx + η yy = Q (ξ ,η )
• Governing Equations with (x, y) as Dependent Variables:
• Orthogonality Condition
⇒ ∇ξ ⋅ ∇η = ∇ξ ⋅ ∇η ⋅ cosθ
1
ξ xη x + ξ yη y = (ξ x + ξ y
2 2
)(η x
2
+ η y ) cosθ
2 2
(1)
1
or xξ xη + yξ yη = − ( xξ 2 + yξ 2 )( xη 2 + yη 2 ) cosθ 2
(2)
⇒ ∇ξ × ∇η = ∇ξ ⋅ ∇η ⋅ sin θ
1 1
ds = ( dx ) + ( dy ) = ( xξ d ξ + xη dη ) + ( yξ d ξ + yη dη )
2 2 2 2 2 2
Along ξ = constant line , d ξ = 0
1 1
⇒ ds = ( xη + yη ) dη or = sη = ( xη + yη )
2 2 2 ds 2 2 2
dη
⇒ Equations (1) and (2) become
xξ xη + yξ yη = − sη ( xξ 2 + yξ 2 ) cosθ (3)
xξ yη − xη yξ = sη ( xξ 2 + yξ 2 ) sin θ (4)
ELLIPTIC GRID GENERATION
2-D Body-Conforming Structured Grids
• Boundary Condition
• On the boundary:
1
1
( η )b ( η )b yξ
x = − s ( xξ 2 + yξ )
2 2
b ( η )b ( η )b xξ
, y = s ( xξ 2 + yξ )
2 2
b
• Determine Φ and Ψ on the boundary:
2β γ
Φ = − ( yη xξξ − xη yξξ ) + ( xξη yη − yξη xη ) −
( yη xηη − xη yηη )
α α
2β γ
Ψ = ( yξ xηη − xξ yηη ) − ( x y
ξη ξ − yξη ξ )
x + ( yξ xξξ − xξ yξξ )
α α
ELLIPTIC GRID GENERATION
2-D Body-Conforming Structured Grids