Grid Generation in Hypersonic Flow Simulation · Grid Generation in Hypersonic Flow Simulation ......
Transcript of Grid Generation in Hypersonic Flow Simulation · Grid Generation in Hypersonic Flow Simulation ......
Grid Generation inHypersonic Flow SimulationReport for the CES Seminar Presentation
Henri KarhulaMatrikelnummer 294206
19. October 2013
Contents
1 Introduction 2
2 Characteristics of Hypersonic Flows 2
3 Grid Adaption 43.1 Error Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.2 Example of Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 y+ Adaption 7
5 Conclusion 10
1
1 Introduction
Numerical Simulations of complex aerodynamic flows have become an essential part of the
design and testing process in the aerospace industry. Primarily due to the potential to gain
valuable data without the use of costly testing facilities. In order to be able to rely on
computer simulations the algorithms need to have a high level of accuracy and reliability.
Moreover large-scale simulations have to meet an affordable level of convergence, such
that those can be used in a realistic time-frame. [1]
In hypersonic flow simulations the grid accuracy plays a great role in the accuracy of the
computed solution. Due to the high velocity and thus the strong upstream-dependency of
the flow small errors will be amplified greatly downstream. Considering this the perfect
grid is very difficult to obtain, especially in an automated fashion.
This report will show you how grid generation has developed on the basis of the changes
applied on the DLR-TAU code. Different techniques and algorithms were used in order to
identify the critical regions of the grid, determine the targeted quality of the grid and apply
changes accordingly. It will become clear that different techniques have to be used as a
single approach is unable to deal with all possible problematic regions with the required
accuracy.
2 Characteristics of Hypersonic Flows
Hypersonic flows bring a new set of problems and challenges that were negligible in
supersonic flows. But what happens when the Mach number of the flow crosses the
Ma = 5 threshold? First of all hypersonic flows cause high temperature effects and
shock wave/boundary layer interactions, which were mostly negligible before. Moreover
the boundary layers are affected as they hold extremely high heat-transfer rates. But there
is an additional new challenge within they boundary layers. Boundary layer transition from
laminar to turbulent flow is difficult to capture and simulate but is of great importance as
the flow is strongly affected by this process. [4]
How do these characteristics change the way we have to deal with grid generation? Ob-
viously the boundary layer has to be captured with an increased resolution in order to not
only capture the velocity boundary layer but the enthalpy boundary layer as well. As the
flow can only turn through a shock wave in supersonics these have to be captured with
precision as well. Moreover shock waves have extremely strong gradients which can lead
to great errors if not resolved correctly. [4]
2
In this report we will examine grid generation in general, but to give insight in one of its
applications we examine the hypersonic flow within a scramjet engines, in detail a scramjet
engine inlet. Figure 1 shows how complex a two-dimensional scramjet engine inlet ramp
is. At the leading edge of the engine a bow shock is found, which causes extremely high
gradients at the cowl. This leading edge shock wave has a very low angle and is therefore
close to the wall surface. We expect extremely strong shock wave/boundary layer interac-
tions. Moreover the ramp causes the separation and shortly after the reattachment of the
boundary layer. Both cause shock waves as the flow turns at these points. [4]
Figure 1: Simplified 2D scramjet engine inlet ramp [4]
When designing a hypersonic engine’s inlet that compressed the incoming flow into the
isolator one has to design more than just the inlet ramp in an efficient way. For a detailed
view of the scramjet inlet’s interior see the top of Figure 2.
We see the upper lip of the engine causing a shock wave that leads into the engine inter-
acting strongly with the lower boundary layer. This interaction causes a separation of the
boundary layer followed shortly after by a reattachment, which then induce a new shock
wave and an aerodynamic throat. If these effect can not be resolved precisely there is no
real possibility to predict whether the engine works at all. [4]
Summing up one has to deal with many different effects with different levels of strength.
Ingrid generation we try to find a way to create a grid that resolves all effects with sufficient
precision in order to achieve the needed level of reliability.
3 Grid Adaption
In order to generate a sufficiently precise grid in an automated fashion one wants to
implement grid adaption. Grid adaption is intergrated into the flow solver and refines the
3
Figure 2: 2D scramjet engine inlet (bottom) and detailed view of inlet’s interior(top) with streamlines [4]
grid according to the computed flow field. If the criteria are met grid adaption divides the
current cell and interpolates the solution of the old cell. An example for this refinement
is given in Figure 3. In order to apply this technique a reliable error-indictaor is needed,
such that areas that lead to high errors can be refined. This is no simple task as a simple
approach which correlates large gradients with large errors is not guaranteed to be correct.
In such a case unnecessary refinements on shock waves or boundary layers can be counter-
productive. [1]
Considering the example of the DLR-TAU code Venditti and Darmofal applied an adjoint
based error correction technique for functional outputs. This technique estimates the error
of the functional with respect to its value on a global fine grid. For this only functional
evaluations and a solution of the adjoint problem on the coarse grid were added to the flow
solver. Based on this error indicator the grid is refined and used in the next iteration until
convergence is achieved. The convergence is defined with respect to adaption parameters
and a prescribed error level for the computed functional. [1]
4
Figure 3: Left: a portion of a coarse grid near an airfoil-boundary; center:superimposed fine grid that replaces one coarse grid edge with N = 2 edges;right: superimposed fine grip corresponding to N = 7. [1]
3.1 Error Estimation
Let f(U) be the targeted quantity and U the solution of the partial differential equations
of our flow, then fH(UH) is the solution of f(U) on the coarse grid ΩH with the discrete
solution UH . Moreover let Ωh be the fine grid, then the goal of our error indicator is to
find an estimation of fh(Uh) without solving on the fine grid. We begin our analysis with
an expansion of fh(Uh) [1]:
fh(Uh) = fh(UHh ) +
∂fh∂Uh
∣∣∣∣UHh
(Uh − UHh ) + ... (1)
The term∂fh∂Uh
∣∣∣∣UHh
(Uh − UHh ) represents the linear sensitivities of fh with respect to
Uh evaluated with the coarse grid solution. Additionally UHh is the coarse grid solution
interpolated onto the fine grid with a projection operation UHh = IHh UH . [1]
Now we introduce the nonlinear residual operator Rh(Uh) = 0 which arises from some
discretization of the original partial differential equations. Linearizing this about ΩH yields
Rh(Uh) = Rh(UHh ) +
∂Rh
∂Uh
∣∣∣∣UHh
(Uh − UHh ) + ... (2)
in which∂Rh
∂Uh
∣∣∣∣UHh
is the Jacobian on the fine grid evaluated by a projected ΩH solution.
[1] The given terms let us define an approximation of the error
Uh − UHh ≈ −
[∂Rh
∂Uh
∣∣∣∣UHh
]−1
Rh(UHh ) (3)
that leads us to an estimate of the functional via substitution [1]:
5
fh(Uh) ≈ fh(UHh )− (Ψh|UH
h)TRh(U
Hh ) (4)
In this equation Ψh|UHh
is the discrete adjoint solution on the fine grid Ωh. Now we want
to find a way to use the discrete adjoint solution without calculating it on the fine grid.
For this we define a projection operation JHh such that we can use an interpolated coarse
grid adjoint solution ΨHh
∣∣UHh
= JHh ΨH and get a computable estimate [1]
fh(Uh) = fh(UHh )− (ΨH
h )TRh(UHh ). (5)
Now that a computable error estimate has been defined we found a suitable error indicator
for our grid adaption. But in the case of the DLR-TAU code Venditti and Darmofal [1]
applied an adaptive strategy in order to improve the accuracy of (5). This is considered
to be necessary as the error estimation by equation (5) alone may lead to an unnecessary
large amount of grid refinements.
In order to examine the remaining error in the functional we decompose equation (4) in
the following manner [1]:
fh(UHh )− fh(Uh) = (ΨH
h )TRh(UHh )︸ ︷︷ ︸
Computable error
+ Ψh|UHh−ΨH
h )TRh(UHh )︸ ︷︷ ︸
Error in computable
correction
(6)
Moreover one can define the error in the computable correction with an expression dual to
(6),
fh(UHh )− fh(Uh) = (ΨH
h )TRh(UHh )︸ ︷︷ ︸
Computable error
+ (RΨh (ΨH
h ))T (Uh − UHh )︸ ︷︷ ︸
Error in computable
correction
(7)
with the adjoint residual operator
RΨh (ΨH
h ) =
[∂Rh
∂Uh
∣∣∣∣UHh
]TΨ−
(∂fh∂Uh
∣∣∣∣UHh
)T
. (8)
With this we we have two expressions for the error in the computable correction, one with
respect to the primal residual and another with respect to the adjoint residual. Using both
equations in our error indication process the algorithm becomes more robust. [1]
In their work Venditti and Darmofal suggest the following definition for the adaption pa-
rameter, at an element k using the information on the superimposed fine-grid nodes l(k):
6
εk =1
2
∑l(k)
∣∣[QHh ΨH − LHh ΨH ]Tl(k)[Rh
(LHh UH
)]l(k)
∣∣+∣∣[QH
h UH − LHh UH ]Tl(k)[RΨh
(LHh ΨH
)]l(k)
∣∣ (9)
The operators LHh and QHh are interpolation operators that map from the coarse grid ΩH
to the fine grid Ωh. The adaption parameters of all cells are then summed up such that
the sum can be directly compared to a user-defined desired error level.
3.2 Example of Application
Venditti and Darmofal exectued a number of test cases to determine the effectiveness of
their changes to the DLR-TAU code. One test case computed the flow around a NACA
0012 airfoil at Ma = 0.95 and was iterated until the desired error level of 0.0005 was
achieved. Figure 4 shows us the initial and resulting grid of the test case.
Figure 4: Left: initial grid as used in the start of computations; right: finalgrid with obvious refinements near nose and modest refinements in the trailingedge region.[1]
4 y+ Adaption
Building up on the work of Venditti and Darmofal, Alrutz and Knopp implemented a y+-
Adaption to the DLR-TAU code [2]. As the code solves Reynolds averaged Navier-Stokes
Equations (RANS) using the k − ω turbulence model, the solver requires a low-Reynolds
7
grid. [2] This grid is characterized by its property to yield y+(1) ≈ 1 where y(1) is the
normal length of the first cell of the grid at the wall and
y+ =y(1)uτν
, where uτ =
√ν∂vt∂n
and ν =µ
ρ(10)
with the friction velocity uτ , which is defined by the kinematic viscosity ν and the wall-
parallel component of flow velocity vt, and the viscosity µ and the density ρ. In most cases
y+ is approximated by an initial guess of uτ , which obviously can lead to errors. In order
to deal with this problem the following algorithm was added to the flow solver: [2]
step 1: read RANS solution and grid
step 2: y+ grid adaption:
a) for each surface node x do:
i) determine y+old
ii) set ynew = yold ∗ y+target/y
+old
b) smooth ynew distribution
c) redistribute ray of nodes from surface node x to egde of near wall layer
step 3: interpolate RANS solution to new grid
This method creates a uniform grid on the surface of the body in our flow field. But in
more complex simulations that are common in aerodynamic flows this algorithm is not able
to create an optimal low-Reynolds grid. As a solution Alrutz and Knopp added a flow
based sensor [2]
p+ =ν
ρu3τ
∂p
∂x(11)
which is computed with the streamwise pressure gradient ∂p/∂x. With this sensor and
additional computations the extended code is supposed to be able to adjust the grid to
stagnation points with possibly not fully developed turbulent flows, regions with strong
adverse pressure gradients and regions of separated flow. The value pf p+ is a suitable
indicator since it grows extremely as the flow reaches a stagnation point or separation.
Thus the algorithm is extended in the following way: [2]
8
step 1: read RANS solution and grid
step 2: y+ grid adaption:
a) for each surface node x do:
i) determine y+old
ii) determine p+ and check for flow stagnation or separation
iii) set y+target based on ii)
iv) set ynew = yold ∗ y+target/y
+old
b) smooth ynew distribution
c) redistribute ray of nodes from surface node x to egde of near wall layer
step 3: interpolate RANS solution to new grid
For the steps 2 a) ii) and iii) p+0 = 0.09 is suggested as an indicating value for regions of
strong pressure gradient. Moreover the authors note that the surface curvature may be
used as an indicator as well.
Furthermore numerical test suggest that y+target ∈ [5, 10] in regions without flow separation
and y+target ∈ [1, 5] for regions with flow separation. In order to show the effectiveness of
their adaption algorithm Alrutz and Knopp provided Figure 5 to show that they were able
to compute the same results of a flow simulation on a very undesirable grid by applying
their adaption technique.
Figure 5: mach number isolines and streamtraces in region of flow separationon near-wall grid with y+(1) = 1 without adaption (left) and y+(1) = 60 withadaption (right). [2]
9
5 Conclusion
We have observed how two adaptive methods, an error-based grid adaption and an indicator-
based near-wall grid refinement, have been applied to the DLR-TAU code. These changes
are not unique for this code, but can be applied to a wide range of flow solvers. Both
methods were successful in achieving a higher level of detail and thus accuracy of the flow
solver they were implemented in. On the other hand we did make no observations with
respect to their performance. Indeed both methods increase performance of the flow solver
since the grid is only refined in areas of interest such that other areas remain coarsely re-
solved and do not require large amounts of computing resources.
Nevertheless later work by Alrutz [3] shows that there is still potential to improve the
performance and accuracy of the flow solver. He shows how a parallel grid refinement and
repartitioning can increase performance by over 50%, which is impressive considering the
enormous scale that simulations can reach. Moreover he suggests the implementation of a
vorticity-based indicator to detect and improve areas of strong vortical flows automatically
[3].
As a parting thought Alrutz questions the viability of adaption indicators that require a so-
lution on a fine grid, even it is only a single residual evaluation since the scale of simulations
can reach overwhelming levels. Future research may include implementations with hybrid
grids, different more efficient indicators or more sophisticated parallelization procedures.
It should have become clear how problems in the area of grid adaption are to be ap-
proached and dealt with. It is important to be able to identify the critical regions of the
grid and furthermore accurately analyse the flow field in this region and make changes
accordingly. If a single step of this procedure cannot be made efficiently or accurately
enough the technique may never achieve the targeted effect. After all the grid strongly
affects the quality of any simulation made on it. This effect is intensified in hypersonics
and has to be considered thoroughly.
10
References
[1] Venditti, D. , Darmofal, D. “Grid Adaption for Functional Outputs: Application to
Two-Dimensional Inviscid Flows”, 2001
[2] Alrutz, T. , Knopp, T. ”Near-wall grid adaption for wall-functions“, 2006
[3] Alrutz, T. , Vollmer, D. ”Recent Developments of TAU Adaption Capability“, 2007
[4] Reinartz, B. “Hypersonic Flight: Computational Propulsion Design“, lecture series,
2012