0% found this document useful (0 votes)
134 views

The Euler Equations With A Single-Step Arrhenius Reaction

The document describes a numerical method for simulating reactive Euler equations with a single-step Arrhenius reaction. The method uses operator splitting to solve the inert Euler equations and reactive ODEs separately. For the Euler equations, it uses the HLLC Riemann solver along with MUSCL-Hancock reconstruction, but switches to the more diffusive HLLE solver near shocks to reduce oscillations. It implements the method using CUDA to run efficiently on GPUs. Results are shown reproducing detonation structures from previous studies.

Uploaded by

Bananaliks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views

The Euler Equations With A Single-Step Arrhenius Reaction

The document describes a numerical method for simulating reactive Euler equations with a single-step Arrhenius reaction. The method uses operator splitting to solve the inert Euler equations and reactive ODEs separately. For the Euler equations, it uses the HLLC Riemann solver along with MUSCL-Hancock reconstruction, but switches to the more diffusive HLLE solver near shocks to reduce oscillations. It implements the method using CUDA to run efficiently on GPUs. Results are shown reproducing detonation structures from previous studies.

Uploaded by

Bananaliks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

University of Cambridge

MPhil in Scientific Computing

Mini-project report

The Euler equations with


a single-step Arrhenius reaction

Candidate: Supervisor:
Graeme Morgan Dr. Nikolaos Nikiforakis

Submitted 13th February 2013


Abstract

The Euler equations with a single-step Arrhenius reaction rate are investigated. The HLLC
approximate Riemann solver is used with MUSCL–Hancock reconstruction to achieve efficent
second-order solution of the Euler equations. This is coupled with a simple ODE solver to
solve the reactive portion of the equations, which approximate a stoichiometric reaction
whose reactants and products can be described with the same ideal gas equation of state.
When simulating strong detonations, the HLLC Riemann solver is found to introduce severe
spurious oscillations, which are rectified by augmenting the algorithm with the more diffusive
but also more robust HLLE approximate Riemann solver in the vicinity of shocks. The solver
is implemented in Nvidia’s CUDA framework to achieve high performance on consumer
graphics hardware. Results from Nikiforakis and Clarke (1996) and Gamezo et al. (1999)
are reproduced, with good agreement seen.
Contents

Introduction 1

Governing equations 2
The inert Euler equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Single-step Arrhenius kinetics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Numerical method 4
Operator splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Euler equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Riemann problem and Godunov’s method . . . . . . . . . . . . . . . . . . . . . . 5
Spurious oscillations with the HLLC approximate Riemann solver . . . . . . . . . 7
MUSCL–Hancock scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Reactive ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Parallelisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
CUDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Complete algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Validation 13
Inert Euler equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Results 14
Shock-induced detonation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Structure of pulsating detonation waves . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Deflagration in the high ẼA regime . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Discussion 23
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Introduction
Detonations involve a high-pressure shock wave travelling through a material, with the com-
pression of the material initiating a chemical or mechanical reaction which provides energy to
the shock, allowing it to propagate until the reactants are exhausted.

The first model of detonations was provided by Chapman (Chapman, 1899) and Jouguet
(Jouguet, 1905) around the turn of the century. The Chapman-Jouguet condition states that
in the frame of the leading detonation wave, the reacting gases just reach sonic velocity as the
reaction ceases. Application of this condition allows for the prediction of detonation velocites
within around 1–2% of experimental results. Such accuracy provided little incentive to improve
upon detonation theory.

As such, much theoretical development did not occur until the 1940s, when Yakov Zel’dovich,
John von Neumann, and Werner Döring independently formulated the ZND detonation model,
which makes more detailed prediction of the structure of the propagating detonation. In this
model, the leading shock wave cannot cause the reaction itself, as the timescales for momentum
transfer in a gas are O(1 ns) while chemical reactions occur over O(1 µs).

Instead, the shock is followed by a finite region in which flow is locally subsonic, the reaction
occurs, and energy is acoustically transferred to the shock. The reaction zone ends with the CJ
condition, when the flow just reaches sonic velocity, and the reaction rate ceases. Detonations
must be distinguished from deflagrations, in which leading wave is subsonic, and typically of a
much lower pressure. The study of the transition from deflagration to detonation is of much
theoretical and practical interest.

Page 1 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Governing equations
Throughout this report, gas flow will be modelled by the Euler equations. We require a com-
pressible model to capture shock waves, but due to the high velocity of the flow, viscosity can
be neglected. A purely temperature-dependent one-step Arrhenius reaction rate will be used to
express the reaction of a stoichiometric mixture of ideal gases.

The inert Euler equations

In conservative form, the compressible Euler equations are,

∂ρ
+ ∇ · (ρu) = 0, (1a)
∂t
∂ρu
+ ∇ · (ρu ⊗ u) + ∇p = 0, (1b)
∂t
∂E
+ ∇ · (u (E + p)) = 0, (1c)
∂t

where ⊗ denotes the tensor product, ρ is the gas density, u is velocity, p is pressure, and E is
the total energy density related to the internal molar energy density e by,

1
E = ρe + ρ |u|2 . (2)
2

However, this gives (in one dimension) three equations and four quantities for which we must
solve. As such, the system must be closed by one further equation. For this study, the ideal gas
equation of state will be used, given by,

p = ρe (γ − 1) , (3)

c
in “caloric form”, where γ = cvp is the adiabatic index. In terms of the number of degrees of
freedom, n, γ = n+2
n ; for a diatomic gas at room temperature γ = 1.4, dropping to γ = 1.33 at
high temperatures when additional rotational degrees of freedom are accessible.

Single-step Arrhenius kinetics

Single-step reactions assume that the combustion reactants exist in a stoichiometric mixture
and progress directly to the products; that is, A −−→ B with no intermediate species. To model
this, the Euler equations are augmented with an additional equation to track the mass fraction
of reactant, and an source term in the energy equation,

∂E
+ ∇ · (u (E + p)) = QK, (4a)
∂t
∂ρλ
+ ∇ · (ρλu) = −K, (4b)
∂t

Page 2 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

where λ is the mass fraction of reactant (defined here as 1 when no reaction has taken place,
and 0 when the fuel is fully consumed), Q is the energy of formation (amount of energy released
per unit mass by the reaction), and K is the reaction rate. For an Arrhenius reaction, K is
purely a function of temperature, and can be expressed as,
 
EA
K (T ) = B exp − , (5)
RT

where EA is the activation energy, which is the same order as the energy requred to initiate the
reaction, B is a pre-exponential factor which determines the timescale of the reaction, and R
is the gas constant. In order to evaluate K for each computational cell, we compute the local
temperature from the equation of state,

Mp
T = , (6)

where M is the molar mass (kg mol−1 ).

Page 3 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Numerical method
In order to numerically solve the Euler equations (Equation 1), we employ a finite volume
formulation in which the value at each point on the discrete grid Uni is interpreted as the
average over a single cell,
Z xi+ 1 Z zi+ 1
Uni = 2
... 2
U(n∆t, x, . . . , z) dx . . . dz
xi− 1 zi− 1
2 2
Z
= U(n∆t, x) dV. (7)
V

Taking the system of equations in conservative form,

∂U
= −∇ · F(U), (8)
∂t

and integrating over a single cell volume V , with application of the Leibniz integral rule (as V
is constant), and Stokes’ theorem, an expression for the rate of change of the cell average is
recovered,
Z Z
d
U(n∆t, x) dx = − ∇ · F(U) dV,
dt V
ZV
d n
U =− F(U) · dr. (9)
dt i ∂V

As the integral over the surface of the cell ∂V consists only of two points in one dimension, at
the front and back of the cell, further discretising the time integral leads to,

∆t h  n   i
Un+1
i = Uni − F Ui+ 1 − F Uni− 1 . (10)
∆x 2 2

Operator splitting

In two dimensions with the reaction term, the system of equations can be written as,

∂U
+ Lx U + Ly U + LR U = 0, (11)
∂t

with,
 
    0
ρu ρv
0
 
ρu2
     
∂   , Ly U = ∂ 
  ρuv   
Lx U =   , LR U =  0 , (12)
∂x  ρuv  ∂y  ρv 2   
−QK
     
 
u (E + p) v (E + p)
K

Page 4 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

where u = (u, v). Rather than solving the entire set of operators at once for each timestep,
which would be mathematically complex, each one is advanced individually while ignoring the
others. First, Lx is solved with a one dimensional Riemann solver, followed by Ly , and then
the spatially homogeneous problem for LR ,

∂U 1
+ Lx U = 0, Un → Un+ 3
∂t
∂U 1 2
+ Ly U = 0, Un+ 3 → Un+ 3
∂t
∂U n+ 3 2
n+1
+ LR U = 0, |U{z } → |U{z } (13)
∂t
ICs output

where the fractional time indices denote the progression within one time step rather than shorter
timesteps.

Euler equations

Riemann problem and Godunov’s method

The Riemann problem for a set of hyperbolic conservation laws deals with the solution for t > 0
with initial conditions discontinuous at the origin,

U
L x≤0
U (t = 0, x) = . (14)
U x>0R

A vast amount of information about the problem is gained from analytically solving the Riemann
problem, but would be beyond the scope of this report. However, by regarding the numerical
solution Uni to be piecewise constant across each cell, as illustrated in Figure 1, the Riemann
problem can be solved at time t = ∆t with initial conditions Uni and Uni+1 to obtain the solution
at Uni+ 1 , which can then be used to compute Fi+ 1 . Using Equation 10 combined with the fluxes
2 2

at every cell boundary allows for the computation of Un+1


i .

The structure of the Riemann problem consists of left- and right-going shock or rarefaction
waves in various allowed combinations, separated by a contact surface. The Harten–Lax–van
Leer (Harten et al., 1983) approximate Riemann solver forms estimates for the speeds of the
left- and right-going waves based on the sonic velocity and gas velocity,

SL = min ((u − c)Roe , uL − cL ) , (15)


SR = min ((u + c)Roe , uR + cR ) , (16)

where the subscript Roe denotes the averaging,


√ √
ρL (·)L + ρR (·)R
(·)Roe = √ √ . (17)
ρL + ρR

Page 5 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Fi+ 1
2

Fi− 1
2

Ui−1 Ui Ui+1

Figure 1: The Godunov scheme uses solutions of the Riemann problem at the boundaries of
piecewise constant cells to compute the intercell flux F.

An estimate for the speed of the contact surface was restored in Toro et al. (1994) to form the
HLLC solver,
pR − pL + ρL uL (SL − uL ) − ρR uR (SR − uR )
S∗ = , (18)
ρL (SL − uL ) − ρR (SR − uR )
which together with an estimated “star state” between the left and rightmost waves,
 
ρk
Sk − uk  
U∗k =  ρkS∗  ,
 (19)
Sk − S∗  pk
Ek + (S∗ − uk ) ρk S∗ + Sk −uk

allows for the simple expression of the HLLC flux between two cells,



 F(UL ), 0 ≤ SL


F(U ) + S (U − U ), S ≤ 0 ≤ S

L L ∗L L L ∗
FHLLC (UL , UR ) = . (20)


 F(UR ) + SR (U∗R − UR ), S∗ ≤ 0 ≤ SR


F(UR ), SR ≤ 0

While exact solutions of the one dimensional Riemann solver are not difficult to compute, doing
so is around 20× slower than using an approximate solver, and the differences in result are
generally negligible.

Page 6 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Spurious oscillations with the HLLC approximate Riemann solver

Riemann solvers have the characteristic of sharply resolving discontinuities in the flow. Quirk
(1992) describes a number of possible failures of Riemann solvers used in Godunov schemes,
including the exact solver, HLL, HLLE, and Roe’s linearised solver. While Godunov-based
schemes are considered versatile, such failures can manifest in the presense of strong shocks or
reactive terms.

As shown later in Figure 10, using the HLLC approximate solver leads to the generation of
spurious waves at the detonation front, as well as some evidence of odd-even decoupling at points
where two transverse shocks interact with the detonation front (triple points). Quirk (1993)
suggests two possible solutions for this problem; we can either introduce diffusion explicitly
through terms of the form ∇ · D [∇ (ρλ)], or use a Riemann solver which is more diffusive where
necessary. As we only need additional diffusion in the region of the shock, we use a simple shock
detection criterion,
|pL − pR |
> α, (21)
min (pL , pR )
where pL and pR are pressures to the left and right of each interface. This condition is necessarily
applied over a coarser grid to the solution, as the shock will be (by design) diffused over multiple
cells. While introducing an additional parameter is undesirable, selecting a value of α has not
proved too odious a task; a value of 2 worked well throughout. Indeed, had an approach involving
explicit diffusion terms been employed, this too would introduce constants which would need
to be determined. The HLLE solver, described in Einfeldt (1988), is used inside the shocked
region.

Despite being more robust when solving for strong shocks, the HLLE solver can also introduce
spurious oscillations in some circumstances, particularly when a shock is moving slowly across
the computational grid. Unfortunately, this is exactly the scenario which is enforced by the
boundary conditions in Gamezo et al. (1999). However, given the HLLE solver is only used for
a small band of cells, this problem is not observed in the simulations herein.

MUSCL–Hancock scheme

Unfortunately, using Godunov’s method with piecewise constant data is only first order accurate
in space. There are two main approaches to improving the convergence rate; one is to use more
information from the Riemann solution, as in the Weighted Average Flux method (Toro, 1989),
which allows for second order accuracy. The other, which in principle allows for better than
second order accuracy, involves constructing values at the cell boundaries which are better than
piecewise constant. The MUSCL–Hancock scheme reconstructs piecewise linear data across
each cell.

Page 7 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

ULi+1
L
Ui+1
R
Ui

UR
i

Ui Ui+1

Figure 2: The MUSCL–Hancock method extends the Godunov method by considering piecewise
L,R
linear solutions within cells (UL,R
i ), then advances these by half a timestep to Ui , which are
used as input to a Riemann solver.

Defining the forward difference between adjacent cells as,

∆Ui− 1 = Ui − Ui−1 ,
2

∆Ui+ 1 = Ui+1 − Ui , (22)


2

and the centred difference across each cell as,

∆i = ∆Ui+ 1 + ∆Ui− 1 , (23)


2 2

then the state vector is extrapolated to the left and right boundaries of each cell using,

1
ULi = Ui − ∆i ,
2
1
UR
i = Ui + ∆i , (24)
2

where ∆i is a limited slope. By Godunov’s theorem (Godunov, 1959), direct application of


a second order scheme leads to spurious oscillations around discontinuities. This problem is
avoided by applying a first order method where the solution changes rapidly, and the full
second order method in smooth regions. The limited slope is defined as,

∆i = φ(r)∆i (25)

where vector notation is somewhat abused; the function φ(r) should be taken to apply to each

Page 8 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

element of ∆i , and is defined by,

2 min(1, r) ,

r>0
φ(r) = 1+r . (26)
0, otherwise

where r is the ratio of slopes on each side of the cell,

∆Ui− 1
2
r= , (27)
∆Ui+ 1
2

is the van Leer limiter, used for this study. Figure 3 shows Equation 27 plotted along with the
permissible region for a slope limiter which does not introduce oscillations itself. As shown in

2.0
φ(r)

1.0

0.0
-1.0 0.0 1.0 2.0 3.0
r

Figure 3: The van Albada limiter drawn within the total variation diminishing (TVD) region
for slope limiters in the MUSCL–Hancock scheme (grey). The van Leer limiter has the desirable
symmetry property φ(r) = φ( 1r ).

Figure 2, the left and right interpolated values from Equation 24 are then advanced by a half
timestep, ∆t/2,

L 1 ∆t 
Ui = ULi + F(ULi ) − F(UR

i ) ,
2 ∆x
R 1 ∆t 
Ui = UR F(ULi ) − F(UR

i + i ) . (28)
2 ∆x

These advanced values are then used as the input for a Riemann solver at each cell interface,
R L
with the Ui and Ui+1 as the left and right states at the Ui+ 1 boundary, allowing for the
2
solution to be advanced by combining with Equation 10,

∆t h R L R L
i
Un+1
i = Uni + RF(Ui−1 , Ui ) − RF(Ui , Ui+1 ) . (29)
∆x

Page 9 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

To ensure positivity of the reconstructed pressure, we reconstruct the primitive state vector
q = (ρ, u, p) rather than the conservative state vector U = (ρ, ρu, E). This flux update formula
is stable for timesteps which satisfy the inequality (Courant et al., 1928),

∆t
max i (S) < 1, (30)
∆x

where max i (S) denotes the maximum wavespeed on the grid. Intuitively, this means that a
signal cannot propagate more than one cell in a single timestep. Rearranged, this provides a
formula for ∆t in terms of the CFL number, CCFL ,

∆x
∆t = CCFL . (31)
max i (S)

The stability criterion easily generalises to multiple dimensions,


 
∆x ∆y
∆t = CCFL min , ,... , (32)
max i,j,... (Sx ) max i,j,... (Sy )

where Sx is the maximum wave speed in the x direction, and max runs over all dimensions.
The CFL number is taken to be 0.9 throughout this report unless otherwise stated, although it
is reduced to 0.2 for the first five timesteps following the advice in Toro (2009).

Reactive ODEs

Following the operator splitting approach, the reactive terms are solved independently of the
spatial terms, yielding,
 
dE EA
= QρλB exp − , (33)
dt RT
 
dλ EA
= −λB exp − , (34)
dt RT

where the equation for ρλ can be replaced by one for λ, as ρ is constant during the reactive
step. Assuming that T is constant over one integration step, these equations are readily solved
to reach,
   
n+1 n EA
λ = λ exp − exp ∆tR , (35)
RT
E n+1 = E n + Qρ λn − λn+1 .

(36)

However, taking ∆tR as being equal to the timestep for the Euler equations does not yield
a good approximation due to the stiffness of the ODE in Equation 33, so the integration is
subcycled,
∆t
∆tR = . (37)
N

Page 10 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Un+1
i

Uni−2 Uni−1 Uni Uni+1 Uni+2

Figure 4: The stencil of the MUSCL–Hancock scheme, showing the range of influence upon
each cell in each timestep.

Parallelisation

Solving the Euler equations is an almost trivially paralellisable problem, with the only complex-
ity being introduced by the reasonably large stencil of the MUSCL–Hancock scheme, as shown
in Figure 4.

CUDA

In this case, the entire solver was implemented using CUDA, so as to run on Nvidia general
purpose graphics processing units (GPGPUs). With CUDA, the solution for each cell is per-
formed by a single thread, with threads being logically grouped into blocks of around 64 threads
which have capability for inter-thread communication. Up to 512 threads are then executed in
parallel on the GPU. By executing multiple blocks at the same time, the GPU is able to “swap”
between blocks in order to hide memory latency.

Nx

Ny

|{z}
overlap

Figure 5: The thread and block structure of the implementation of a Riemann solver with a
one cell overlap between blocks.

Due to the large stencil, an overlapping cell at the end of each block is required in the solution
L
direction, as shown in Figure 5. Each cell loads data Ui−1 , Ui , and Ui+1 , and reconstructs Ui
R
and Ui . Then, the ith cell computes the flux Fi− 1 using the reconstructed values from cells
2
i − 1 and i. The overlap region is required as this flux cannot be computed in the first cell in a
block as there is no cell to the left of it.

Page 11 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

The number of blocks required to cover a grid with a given overlap at each block boundary is
given by,  
grid cells
blocks = 1 + . (38)
block width − overlap

Complete algorithm

• Enforce boundary conditions using a band of two ghost cells around the grid.

• Calculate the maximum wave speed on the grid by calculating the wave speed in each cell
and reducing using Harris (2007).

• Flag shocked cells using Equation 21. Expand the region of shocked cells by flagging all
the surrounding cells of each shocked cell.

• Calculate intercell fluxes:

– Read Ui−1 , Ui , Ui+1 into each thread.

– Extrapolate to UL R
i and Ui .
L R
– Advance to Ui and Ui .
R
– Copy Ui−1 from the adjacent cell, and find the flux using an approximate Riemann
solver.

– Store Fi− 1 in cell i.


2

• Add the fluxes to the solution grid, using the fluxes from cells i and i + 1.

• Integrate the reaction terms, subcycling as necessary.

Page 12 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Validation
Inert Euler equations

1.0
1.0
Density / kg m−3

Velocity / m s−1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0.0 0.0
-0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4
x/m x/m
3.0
1.0
2.8
Energy / m2 s−2
Pressure / Pa

0.8 2.6
0.6 2.4
2.2
0.4
2.0
0.2 1.8
0.0 1.6
-0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4
x/m x/m

Figure 6: Solution of the Sod shock tube at t = 0.2 using the MUSCL–Hancock method with
a 50 cell computational grid and HLLC approximate Riemann solver (dots) compared to exact
solution (lines).

The HLLC-based solver for the inert Euler equations is validated using the Sod shock tube
problem (Sod, 1978) in 1D, given by initial conditions qL = (ρ, u, p)L = (1.0, 0.0, 1.0) and
qR = (0.125, 0.0, 0.1). Figure 6 shows the numerical solution at t = 0.2 compared to the exact
solution. Despite using only 50 cells in the numerical solution, good agreement is observed;
both the shock and rarefaction wave are well captured, with the contact discontinuity slightly
more diffused.

Page 13 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Results
Shock-induced detonation

The results of Nikiforakis and Clarke (1996) are recreated at high resolution with the developed
solver, allowing for finer resolution of the detonation driving zone. The simulation is performed
with redimensionalised initial conditions,

ρ = 1.2 kg m−3 , p = 96 856 Pa, u = −ushock , γ = 1.4,


γR
B = 1.76 × 105 s−1 , Q = 1.24 Tshock , EA = 14.99 RTshock ,
(γ − 1) M

where the subscript “shock” refers to the state behind a Mach 3 shock. The left boundary is
reflective, so produces a Mach 3 shock in prevailing flow of ushock from the right as soon as the
simulation begins. The wall heating problem (Noh, 1986) is avoided by extrapolating correct
flow values from just inside the left boundary to x = 0 after a small number of time steps.
Failure to correct the density error at the wall results in the creation of a hot spot sooner than
would be expected.

Figure 7 shows the evolution of the strong ignition case from Nikiforakis and Clarke (1996).
The reaction proceeds behind the initial shock, leading to thermal runaway at around 1 s. The
overpressure rises as the reaction continues, eventually leading to a ZND detonation forming,
with characteristic thin shockwave and trailing reaction zone. Figure 8 shows multiple variables
at key times during the detonation. The sharp drop in species fraction illustrates the difficulty
in simulating detonations with sufficient cells in the reaction zone.

Good agreement is seen between these results and those of Nikiforakis and Clarke (1996).

Page 14 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

1.2

1.0
Pressure / (106 Pa)

0.8

0.6

0.4

0.2

0.0
0 50 100 150 200 250 300 350 400 450 500
x/m
8.0
7.0
Pressure / (106 Pa)

6.0
5.0
4.0
3.0
2.0
1.0
0.0
0 50 100 150 200 250 300 350 400 450 500
x/m

9.0
8.0
Pressure / (106 Pa)

7.0
6.0
5.0
4.0
3.0
2.0
1.0
0.0
0 50 100 150 200 250 300 350 400 450 500
x/m

Figure 7: Pressure at times top: 20(20)100 s, middle: 110(1)115 s, bottom: 126(2)138 s showing
the evolution of the detonation wave.

Page 15 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

10.0
Pressure / (106 Pa)

8.0
6.0
4.0
2.0
0.0
0 50 100 150 200 250 300 350 400 450 500
x/m
2.8
Temperature / (1000 K)

2.4
2.0
1.6
1.2
0.8
0.4
0 50 100 150 200 250 300 350 400 450 500
x/m
18.0
Density / kg m−3

15.0
12.0
9.0
6.0
3.0
0.0
0 50 100 150 200 250 300 350 400 450 500
x/m

1.0
Species fraction

0.8
0.6
0.4
0.2
0.0
0 50 100 150 200 250 300 350 400 450 500
x/m

Figure 8: Pressure, temperature, density, and species fraction as the reaction begins at the left
wall, then builds into a ZND detonation.

Page 16 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Structure of pulsating detonation waves

reflective boundary

outflow

inflow
initial
shock

reflective boundary

Figure 9: Gamezo ICs and BCs

Gamezo et al. (1999) describes numerical simulations in two dimensions of unsteady shock waves
using a flux-corrected transport solver. The boundary and initial conditions are illustrated in
Figure 9. The top and bottom boundaries are reflective, while a constant inflow of speed DCJ
is defined at the right boundary, and the left boundary is relaxed toward the inflow conditions
Uin (with the exception λ = 0),

U−1 = (1 − r)U0 + rUin ,


U−2 = (1 − r)U1 + rUin , (39)

where Ui for i < 0 denote ghost cells, and r = 0.05. A region of overpressure 2PCJ is placed
in the left half of the domain to initiate the reaction, leading to a detonation wave produced
roughly half way across the simulation domain. While numerical error can be relied on the
perturb the shock, a single-mode perturbation is applied to the shock in some simulations to
speed up convergence to a steady state pulsating detonation. The parameters used in the
simulation, corresponding approximately to the reaction 2 H2 + O2 −−→ 2 H2 O with varying

Page 17 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

activation energy, are,

γ = 1.33, p0 = 1 × 105 Pa, ρ0 = 0.493 kg m−3 , M = 12.0 g mol−1 , EA = ẼA 14.1 J,


B = B̃ µs−1 , Q = 4.867 J kg−1 , PCJ = 17.5 × 105 Pa, DCJ = 2845 m s−1 ,

with three cases of ẼA = 2.1, B̃ = 40; ẼA = 4.9, B̃ = 700; and ẼA = 7.4, B̃ = 4000.

This numerical setup is reproduced using the algorithm described in earlier sections. Steady-
state density-schlieren plots for the HLLC solver are compared to those for the hybrid solver in
Figure 10. For the HLLC solver, the creation of spurious waves travelling along the leading shock
is obvious, as is the development of odd-even decoupling where three waves are approaching.
None of these flaws are visible in the solution obtained using the hybrid HLLC–HLLE solver,
despite a region of only 2–4 cells in width being solved with the HLLE solver.

Figure 10: Steady state density-schlieren plots of the detonation structure, solved using top:
the HLLC approximate Riemann solver; bottom: the hybrid HLLC–HLLE Riemann solver with
shock detection.

The unsteady interaction of the front is shown in Figure 11. Two transverse waves interact
with the main shock wave to form a hot region. As the reaction is temperature dependent,
this locally accelerates the reaction, advancing the detonation wave ahead of the surrounding
front. After interacting, the transverse waves continue along the front, and interact with waves
propagating in the opposite direction.

Figure 11: Plots of pressure showing the development of a triple point as two transverse
waves interact with the detonation front to form a hot spot, which then locally accelerates the
reaction.

Page 18 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

A common way to experimentally record the structure of a pulsating detonation wave is to


coat one wall of the test apparatus with soot. As the shock wave passes the sooted surface,
differences in pressure give rise to shear forces on the soot, which rearrange it to give a history of
the longitudinal waves. Numerically, soot tracks can be simulated by recording the maximum
pressure at each grid cell, viewed in the laboratory frame. Figure 12 shows simulated soot
tracks for for the ẼA = 4.9 case, including the early development of the instability from an
unperturbed shock. Initially, a very fine cellular structure emerges from round-off error, which
quickly develops into a larger-scale pattern.

3.00

2.25
x / mm

1.50

0.75

0
0 1.5 3.0 4.5 6.0 7.5 9.0
z / mm
3.00

2.25
x / mm

1.50

0.75

0.00
49.5 51.0 52.5 54.0 55.5 57.0 58.5
z / mm
Figure 12: “Numerical smoke foil” results for the case ẼA = 4.9. Top: early time, showing the
initiation of the instability from a planar shock wave with no applied perturbation, bottom:
late time evolution of the unsteady detonation wave, showing characteristic cellular structure.

The late evolution of the cellular pattern is also shown. For this moderate activation energy
case, the pattern is reasonably regular. With the exception of cases in which transverse waves
split or combine, the size of cells is similar. The low activation energy case, ẼA = 2.1 is shown
in Figure 13; the pattern is significantly more regular, with far more evenly-sized cells, and the
maximum pressure is significantly lower.

Page 19 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Soot tracks for the high activation energy case, ẼA = 7.4, are shown in Figure 14. There is
no discernible pattern to the waves, with fully chaotic interactions of more than three waves in
close proximity leading to regions of extreme overpressure. Significantly faster transverse waves
are present than in the low activation energy case. Density-schlieren images are compared in
Figure 15. The low activation energy case has an almost planar detonation wave, while the high
activation energy case is extremely non-uniform, with a complex structure, with some regions
lagging far behind the main front.

3.00

2.25
x / mm

1.50

0.75

0.00
49.5 51.0 52.5 54.0 55.5 57.0 58.5
z / mm
Figure 13: “Numerical smoke foil” results for the case ẼA = 2.1 at late times, displaying a
regular cellular structure.

3.00

2.25
x / mm

1.50

0.75

0.00
49.5 51.0 52.5 54.0 55.5 57.0 58.5
z / mm
Figure 14: “Numerical smoke foil” results for the case ẼA = 7.4 at late times, showing highly
chaotic interaction of transverse waves.

Page 20 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Figure 15: Comparison of density-schlieren images for ẼA = 2.1, 4.9, 7.4 respectively.

Page 21 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Deflagration in the high ẼA regime

In the high activation energy regime, large regions of reactant are “pinched off” from the deto-
nation wave by incoming transverse wave. Figure 16 gives an example of such a case, showing
the cold region of gas detaching from the shock front. The cold region slowly burns (deflagrates)
further downstream, later in the reaction zone. This is one driving force of the instability; not
all of the energy released by the reactant is effectively transported to the detonation front in
all areas.

Figure 16: Detachment of a region of reactant in the high activation energy case. Left: reactant
mass fraction, middle: density-schlieren, right: temperature.

Page 22 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

Discussion
Previous numerical studies of pulsating detonation waves have been based on diffusive centred-
schemes such as FLIC and SLIC. While Godunov-like schemes are generally considered robust,
this report describes the problems encountered when applying the otherwise extremely useful
and accurate HLLC solver to systems with reactive terms. Following the ideas of Quirk (1992)
and 1993, a hybrid HLLC–HLLE solver is implemented with excellent results.

After validation of the 1D Euler solver, the results of Nikiforakis and Clarke (1996) on shock-
induced ignition are reproduced to validate the reactive solver. In 2D, the results of Gamezo
et al. (1999) are successfully recreated over a wide range of parameters at high resolutions.

The implementation of the algorithm in CUDA allows for extremely fast execution on cheap
consumer hardware. While no equivalent CPU code has been developed for direct comparison,
from previous experience, the solver is expected to perform around 100× faster than a single-
core CPU code. The author anticipates that a fast solver could be of use in parametric studies
such as Ng et al. (2005) and Cael et al. (2009), with whom members of the group have previously
had fruitful collaboration.

Acknowledgements
The author wishes to thank his supervisor, Dr. Nikolaos Nikiforakis for suggesting pulsing
detonations as an interesting application of a reactive solver, Dr. Philip Blakely for his assistance
with CUDA, and Elise Croft for useful advice on detonations.

Page 23 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

References
K. R. Bates. Numerical simulation and analysis of the transition to detonation in gases. PhD
thesis, University of Cambridge, 2005.
G. Cael, H. D. Ng, K. R. Bates, N. Nikiforakis, and M. Short. Numerical simulation of detonation
structures using a thermodynamically consistent and fully conservative reactive flow model for
multi-component computations. Proceedings of the Royal Society A: Mathematical, Physical
and Engineering Sciences, 465(2107):2135–2153, April 2009.
D. L. Chapman. On the rate of explosion in gases. In Philosophical Magazine, volume 47 of 5,
pages 90–104. London: Taylor & Francis, January 1899.
A. Chinnayya, E. Daniel, and R. Saurel. Modelling detonation waves in heterogeneous energetic
materials. Journal of Computational Physics, 196(2):490–538, May 2004.
R. Courant, K. Friedrichs, and H. Lewy. Über die partiellen Differenzengleichungen der math-
ematischen Physik. Mathematische Annalen, 100(1):32–74, 1928.
B. Einfeldt. On Godunov-type methods for gas dynamics. SIAM Journal of Numerical Analysis,
25(2):294–319, 1988.
V. N. Gamezo, D. Desbordes, and E. S. Oran. Formation and evolution of two-dimensional
cellular detonations. Combustion and Flame, 116(1-2):154–165, January 1999.
V. N. Gamezo, A. A. Vasil’ev, A. M. Khokhlov, and E. S. Oran. Fine cellular structures
produced by marginal detonations. Proceedings of the Combustion Institute, 28(1):611–617,
January 2000.
S. K. Godunov. A difference scheme for numerical solution of discontinuous solution of hydro-
dynamic equations. Sbornik: Mathematics, 47:271–306, 1959.
M. Harris. Optimizing parallel reduction in CUDA. Technical report, 2007.
A. Harten, P. D. Lax, and B. van Leer. On upstream differencing and Godunov-type schemes
for hyperbolic conservation laws. SIAM Review, 25(1):35–61, 1983.
X. Hu, N. Adams, and G. Iaccarino. On the HLLC Riemann solver for interface interaction in
compressible multi-fluid flow. Journal of Computational Physics, 228(17):6572–6589, Septem-
ber 2009.
J. C. E. Jouguet. Sur la propagation des ractions chimiques dans les gaz. 1:347–425, 1905.
A. Khokhlov, E. S. Oran, and G. Thomas. Numerical simulation of deflagration-to-detonation
transition: the role of shock–flame interactions in turbulent flames. Combustion and Flame,
117(1-2):323 – 339, 1999.
H. Ng et al. Nonlinear dynamics and chaos analysis of one-dimensional pulsating detonations.
Combustion Theory and Modelling, 9(1):159–170, February 2005.
N. Nikiforakis and J. F. Clarke. Numerical Studies of the Evolution of Detonations. Mathl.
Comput. Modelling, 24(8):149–164, 1996.

Page 24 of 25
Graeme Morgan The Euler equations with a single-step Arrhenius reaction

W. F. Noh. Errors for calculations of strong shocks using an artificial viscosity and an artificial
heat flux. Journal of Computational Physics, 72(1978):78–120, 1986.
J. J. Quirk. A contribution to the great Riemann solver debate. Technical Report 92, Institution
for Computer Applications in Science and Engineering, 1992.
J. J. Quirk. Godunov-type schemes applied to detonation flows. Technical report, Institute for
Computer Applications in Science and Engineering, 1993.
P. Roe. Approximate Riemann solvers, parameter vectors, and difference schemes. Journal of
Computational Physics, 43(2):357 – 372, 1981.
G. A. Sod. A survey of several finite difference methods for systems of nonlinear hyperbolic
conservation laws. Journal of Computational Physicsl, 27:1–31, 1978.
E. F. Toro. A weighted average flux method for hyperbolic conservation laws. Proceedings of the
Royal Society of London. A. Mathematical and Physical Sciences, 423(1865):401–418, 1989.
E. F. Toro, M. Spruce, and W. Speares. Restoration of the contact surface in the HLL–Riemann
solver. Shock Waves, 4(1):25–34, July 1994.
E. F. Toro. Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Intro-
duction. Springer, 2009.

Page 25 of 25

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy