Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

OpenBowShock2D- A User-Friendly Numerical Simulator of

High-Speed Flow
Stanislav V. Karpuk1

Wichita State University, Wichita, KS, 67260

Computational fluid dynamics (CFD) has become an important and relatively efficient method of
simulating complex aerodynamic phenomena. Many sophisticated CFD tools have been developed to simulate
and visualize different flow characteristics. Supersonic and hypersonic flow lie in the field of problems that
have no theoretical solution for many flow cases, therefore CFD becomes a useful tool. However, access and
utility of modern CFD solvers for high-speed flow have certain problems: codes are either expensive or, if
they are available free, require other tools for post-processing and are not easy to use. This work presents an
open-source MATLAB 2-D code that simulates supersonic and hypersonic flow around arbitrary shapes. The
goal of the tool is to provide relatively quick, easy to use, and accurate visualization of high-speed flow
phenomena for educational purposes. The hypersonic flow regime includes an equilibrium flow model to
ensure more accurate flow simulation at high temperatures. Results for blunt bodies show high accuracy
compared to experimental data and modern commercial software.

Nomenclature

= computational domain variables


*
= non-dimensional
∞ = free-stream
γ = specific heat ratio
γ = specific heat ratio
ξ, η = computational domain axes
τ = time in computational domain
ρ = density
A,B = numerical Jacobian
a = speed of sound
Cp = pressure coefficient
E, F,Q = flux vectors
e = specific energy
hg = geometric altitude
I = identity matrix
i = index along the grid
J = Jacobian of transformation
j = index across the grid
k = clustering coefficient for algebraic grids
L = characteristic length
M = Mach number
p = pressure
T = temperature

I. Introduction

Numerical methods in fluid dynamics and aerodynamics became a subject of great interest since the second half of
the 20th century. Several numerical tools and schemes have been developed over the years to simulate complex
physical phenomena with relative accuracy. Moreover, plenty of attention is given to the phenomena of supersonic
______________________________
1
Undergraduate student, Department of Aerospace engineering, 1845 Fairmount/Box 44, AIAA student-member.

1
American Institute of Aeronautics and Astronautics
and hypersonic flow due to the complexity of the flow and design issues. Numerous computational tools have been
developed to simulate high-speed flow around shapes of different complexity. However, many numerical tools for
high-speed flows have limitations for users who are interested in learning or desire to perform simple design:

1. They may be expensive to afford


2. They may not be user-friendly: no Graphical User Interface (GUI) or post-processing tools, so external
programs are required for analysis
3. They may be limited to calorically perfect gas models
4. They are unavailable free for general public

In the present paper, OpenBowShock2D [1] is presented as a MATLAB tool which solves steady-state Euler
equations using Steger-Warming/ Van Leer flux vector splitting for an arbitrary simple 2D body at supersonic and
hypersonic speeds with equilibrium flow chemistry model.

II. Tool structure

In this section, the structure of the solver is presented. The flowchart of the tool is shown in Figure 1.

A. Input
OpenBowShock2D consists of three steps to input all initial data and run the solution.

Figure 1. Code flowchart

1. Geometry Input

OpenBowShock2D provides several options to piecewise set up the shape of the body:

1. Preset algebraic functions of simple shapes are included. The program includes linear, polynomial,
natural logarithmic, elliptic, and circular section functions.
2. User-specified algebraic or trigonometric function may be entered.
3. Curve input from data files may be provided by a user. A set of points is collected and Newtonian
polynomial [2] is created to obtain a general function for the curve.

2. Grid generation
Once the body shape is determined, grid type and structure must be identified. The grid can be set up
piecewise along the body using different amount of grid points, vertical and horizontal clustering, and one
of two grid types: algebraic or elliptic.
Algebraic grid is set up using equations (1) and (2) [3]

2
American Institute of Aeronautics and Astronautics
(1)
(2)

where in these equations, k is defined as

(3)

where m is a clustering coefficient and is a metric ratio [4].

The layout of the algebraic grid generation is shown in Figure 2

Figure 2. Algebraic grid construction

Elliptic grid is obtained by solving Laplace equation in curvilinear coordinates with Point Gauss-Seidel
technique [3], as shown in equations (4) and (5).

(4)
(5)

where, in these equations

(6)
(7)
(8)

3. Flow initial condition


Initial conditions of the flow are free-stream density, temperature, Mach number, and angle of attack. Also,
two flow models are possible: calorically perfect gas and ideal gas in chemical equilibrium.

B. Solution
Implicit finite difference Steger-Warming/Van-Leer flux vector splitting is used to solve Euler equations.
MATLAB parallel computing and Code Generation functions were used to accelerate computations.

C. Output

Output parameters are Mach number, density, pressure, temperature, pressure coefficient Cp along the
surface, and the convergence history. Data is both saved in an Excel document and presented in surface
diagrams.

3
American Institute of Aeronautics and Astronautics
III. Numerical procedure
A. Governing equations

Flux form of Euler equations [5] in two dimensions is given by

(9)

Where
(10)
Q= , E= , and F=

where
(11)

Elements of flux vectors Q, E, and F are non-dimensionalized using characteristic length and free-stream
conditions.

, , , , , , (12)

, ,
To be able to solve Euler equations for a curvilinear domain with non-uniform spacing between grid points,
transformation to a computational domain is performed. After transformation, the Euler equations become

(13)

where , , and are time and space coordinates in the computational domain and

, ,

where and are metrics of transformation from physical to computational domains and given by

, , ,

J is a Jacobian of transformation given by

B. Numerical scheme

To solve Euler equations, a combination of implicit finite difference Steger-Warming and Van-Leer flux vector
splitting [5] was used. An implicit scheme was used to both accelerate solutions and make the scheme
unconditionally stable.

Finite difference form of planar Euler equations is

4
American Institute of Aeronautics and Astronautics
(14)

The equation is non-linear, so linearization is required. Using Taylor series, flux vectors are represented as

(15)

(16)

where

(17)

Substituting relations above and rearranging terms, Euler equations become

(18)

The system obtained from modified Euler equations is a pentadiagonal system, so approximate factorization is used.
After factorization, the system becomes

(19)

Steger-Warming flux-vector splitting is used to separate Jacobian matrices A and B. To avoid problems related to
Steger-Warming technique in vicinity of the stagnation point, vectors E and F are split using Van-Leer flux vector
splitting. After splitting, Euler equations become

(20)

Derivation of flux vectors is described in Reference 5.

Applying first-order forward difference for negative terms and backward difference for positive terms,

(21)

so the equation above is split into two separate implicit equations

(22)

and

5
American Institute of Aeronautics and Astronautics
(23)

Rearranging equations above, the following system is obtained

(24)

and

(25)

where

, , ,

, ,
(26)

Each of the equations present a block-tridiagonal system matrix which can be solved for unknown [5],
so new flux becomes

(27)

The solution is continued until convergence criterion is satisfied.

Knowing , density, velocity components, and specific energy, pressure can be obtained by

(28)

which provides all required flow properties.

B. Boundary conditions

A sample layout of boundary conditions is shown on Figure 3.

Figure 3. Boundary condition diagram

6
American Institute of Aeronautics and Astronautics
Inflow boundary condition is represented as a uniform flow with free-stream conditions. Outflow boundary
condition is expressed using zero-order extrapolation of .

(29)

For the body surface, slip-wall boundary condition is used. For pressure, temperature, and density, zero-order
extrapolation is used

, , (30)

Velocity at the body surface must be tangent to the surface. A description of the boundary condition is shown in
Figure 4, where α can be obtained from the geometry set-up and β can be calculated relative to the free-stream.

From Figure 4,

(31)

From where

, (32)

β
α

Figure 4. Velocity tangency boundary condition

C. Equilibrium chemistry modeling

At high Mach number (above 5), the assumption of calorically perfect gas does not hold due to high flow
temperature which results in chemical reactions. Equilibrium chemical reaction assumption was used to simulate
flows at high speed. To satisfy flow parameters according to equilibrium flow, curve-fitting is applied. Curve fits
provided by Tanehill and Muge [6] are used to change γ, local speed of sound, pressure and temperature of the flow.

Specific heat ratio for equilibrium flow is obtained by

(33)

where and . Knowing specific heat ratio, pressure can be obtained


using (28).

7
American Institute of Aeronautics and Astronautics
Temperature can be calculated using

(34)

where and

Local speed of sound is calculated using

(35)

Where coefficients a, b, and K are curve-fitting coefficients.

D. Validation and numerical examples

Validation tests were performed for a circular cylinder with an elliptic grid using 100x50 points. The grid
structure is shown in Figure 5. The circular cylinder was tested for Mach numbers M=2 through 5 and the
results are shown in Figures 6-7. In Figure 6, shock-wave locations compared to other numerical techniques are
shown. Results show high similarity to theoretical, experimental results, and the ROE Scheme used in Fluent.

Figure 5. Elliptic grid for a circular cylinder (100x50 points)

8
American Institute of Aeronautics and Astronautics
Figure 6. Shock thickness of the circular cylinder at different Mach numbers [7]

The Ratio of surface pressure to stagnation pressure plots were compared to the results obtained with the
method of integral relations and polynomial approximations by Fuller and Belotserkovskii [8]. In Figure 6, pressure
ratios show strong similarities in the vicinity of the stagnation point, although some minor fluctuations take place,
but disappear along the body. However, the error occurring is within reasonable values remaining less than 2%.

Figure 7. Surface pressure ratio on of the circular cylinder at different Mach numbers.

Typical results for the geometry in Figure 8 are presented in Figures 9(a)-(c) for density, pressure, and
temperature at 30 km altitude and Mach number 15. Surface plots are divided into two sections: the top half
represents equilibrium chemistry model, while the bottom half uses calorically perfect gas. Results show desired
behavior of the flow in chemical equilibrium; pressure and temperature behind shock waves are lower than for the
ideal gas model.

9
American Institute of Aeronautics and Astronautics
Figure 8. Grid generation for a typical spike

(a) Density (b) Pressure

(c) Temperature

Figure 9. Properties of the flow at M=15 and hg=30 km

10
American Institute of Aeronautics and Astronautics
E. Conclusion

In the current paper, a new open-source numerical solver for steady, 2D, supersonic and hypersonic, inviscid
flow simulation was developed. Implicit Steger-Warming/ Van Leer flux vector splitting was used for computation
of flow properties around user-defined bodies. Comparison with other numerical schemes illustrates accuracy of the
scheme, so the tool can be used for simplified investigation of shock behavior around bodies

Acknowledgments

I would like to thank Dr Hoffmann, Dr Kliment, and the Department of Aerospace Engineering of Wichita State
University for all help and support in the current project.

References

[1] Karpuk, S.V., OpenBowShock2D, V 1.1.3, http://openbowshock2dcom.com/

[2] Pizrikidis, C., Numerical Computation in Science and Engineering, 2nd edition, Oxford University Press, 2008, pp 396-397

[3] Hoffmann, K.A, and Chiang, S.T, Computational Fluid Dynamics, Vol 1, 4th ed., EESbooks, Wichita, 2000, Ch 9.

[4] Thompson, J.F., Handbook of Grid Generation, CRC Press, New York, 1999, p 32.6

[5] Hoffmann, K.A, and Chiang, S.T, Computational Fluid Dynamics, Vol 2, 4th ed., EESbooks, Wichita, 2000, Ch 11,12

[6] Tannehill, H.C and Mugge, P.H., “Improved Curve Fits for Thermodynamic Properties of Equilibrium Air Suitable for
Numerical Computation Using Time-Dependent or Shock-Capturing Method”, NASA CR-2470, October 1974

[7] B. SZASZ., “Numerical study of compressible flow past a re-entry vehicle nose,”Buletin Stiintific, U.P.B”, Series D, Vol. 75,
Iss. 4, 2013, pp. 3–12.

[8] W.D. Hayes and R.F. Probstein. Hypersonic Inviscid Flow. Dover Publications, New York, New York, 1st edition, 1966, pp.
408-422

11
American Institute of Aeronautics and Astronautics

You might also like