A General Boundary Solution Method For 1D Gas Dynamic Models

You might also like

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

17th Australasian Fluid Mechanics Conference

Auckland, New Zealand


5-9 December 2010

A General Boundary Solution Method for 1D Gas Dynamic Models

Greg Gibbes, Guang Hong


School of Electrical, Mechanical and Mechatronic Systems
University of Technology, Sydney, New South Wales 2007, Australia

Abstract Pressure Wave Theory and Nomenclature


This paper outlines a generalised boundary solution method for A pressure wave passing a gas particle induces a change in
solving flow at boundaries of 1D duct models. It is adaptable to velocity in the particle which is given by Earnshaw [7] as
duct-duct connections and duct-volume connections with
subsonic, choked and supersonic flows. It is fully non- 1
homentropic (accounting for friction, and temperature and 2a0 P 2
u u0 1
property variations). The generalised approach aids in reducing 1 ( 1) P0 (1)
code complexity for the approximately 30 distinct flow types that

can exist at the boundaries of 1D ducts.
Assumptions are described and numerical methods outlined. The Where u and u0 are the final and initial velocities respectively, P
solution requires solution of a number of non-linear simultaneous and P0 are the final and initial pressures, is the ratio of specific
equations which is accomplished with the Newton-Raphson heats and a0 is the speed of sound at the original pressure P0.
method. Sample results for a converging flow compared to Equation (1) assumes a calorically perfect gas, and isentropic
experimental date are given. compression or expansion process, so the final speed of sound is
found as:
Introduction 1
P 2
One dimensional gas dynamics modeling is an important tool in 2 a a0 (2)
modern reciprocating internal combustion engine design. P0
Despite a long history and the feeling by some that it is time to
close the book on this field (see forward to [14]) high quality In equation (1) the positive direction of velocity is in the same
work continues to be reported in the literature eg [6, 12, 13]. direction as the motion of the pressure wave.
Moreover, there remains an incredible variety of methods and
Earnshaws equation can be extended to the general case of 1D
codes in use in engine research laboratories around the world that
duct flow where a both a rightward and leftward pressure wave
reflect the particular historical needs and emphases of each
superimpose. The pressure and velocity of the gas in the duct as
research group, and the pedigree of its gas dynamics code,
a function of both waves is:
whether it be a Method of Characteristics (MOC) based
formulation [1], other wave action method [4], or a finite
difference based formulation [14]. Much of the current work 3 u
2a0
X R X L (3)
reported in literature relates to improving boundary or junction ( 1)
models. Accuracy in modelling boundaries is critical in engine
modelling, since there are numerous duct boundaries that trace 4 X X R X L 1 (4)
the path from air inlet through the combustion cylinder to exhaust
outlet. Also, new opportunities in detailed CFD present new Velocity u is positive in the rightward direction. The variable X
challenges in interfacing. Boundary formulations are typically is shorthand for
1
based on wave action concepts (even finite difference codes).
P 2
Thus, work reported in this area has relevance for all 1D gas 5 X (5)
dynamics codes. P0
This paper and its companion [9] report the salient features of And the subscripts R and L signify the rightward and leftward
another 1D gas dynamics code which is based the method travelling pressure waves respectively. Where X appears without
developed at Queens University, Belfast in the 1990s eg. [2, 3, a subscript, this signifies the superposition pressure ie the static
11]. It is an attempt to simplify gas dynamic calculations and pressure. Note the reference pressure P0 can be set to an arbitrary
maintain or improve accuracy. In the model, each computational value, though it should be a similar pressure to that being
cell is treated as an idealised constant-area, constant-property, modelled. It is conventional to set it to atmospheric pressure.
frictionless duct, so that simple algebraic expression are
sufficient to describe the passage of finite amplitude waves [9]. Figure 1 shows the mesh nodes of a 1D duct plotted in space and
Area change, gas property change and friction are accounted for time. Right and left travelling waves propagate along the duct
at the interfaces between cells. Connection at duct ends is treated and intercept the nodes at cell boundaries. The values of the right
in exactly the same way. Thus the model uses a uniform and left travelling wave can be calculated if the pressure and
theoretical treatment of boundaries throughout. velocity are known by re-arranging equations (3) and (4) as:
The boundary solution algorithm summarised here was ( 1)
developed with careful consideration to the accuracy, numerical 6 X R X u 1 / 2 (6)
efficiency, and stability of the solution for a wide range of 2 a0
possible flow cases.
( 1) Single stage flow Two stage flow Stagnant volume
7 X L X u 1 / 2 (7)
2 a0
~1 ~10 ~20
It is convenient to name the waves according to whether they are
travelling toward the node (incident) or away (reflected). This is
~2 ~11 ~21
because the flow at a node is established only by the values of the
incident waves (if the flow is sub-sonic).
~3 ~12 ~22
time
current
time-step ~4 ~13 ~23
Xi
Xi Incident
waves Xi
~5 ~14 ~24
Xr
Xr Reflected
previous waves Xr
time-step ~6 ~15
~25
Position
x ~7 ~16
Figure 1 Duct cell boundary nodes in space and time ~26

In general, to allow for varying gas composition and temperature ~8 ~17


within a duct, the gas properties on either side of a node will be ~27
different (in space and time). This is illustrated in Figure 2.
~9 ~18
cRc dRd Incident
~28

time a0c a0d waves Xi ~19


~29
aRa Reflected
bRb waves Xr
a0a
a0b converging flow super-sonic flow
Position
~30
x diverging flow travelling shock
Figure 2 Variation of gas properties around a node in space and time.
stagnant inlet standing shock
The flow area may change from one cell to the next. This will ~31
occur between the end cells of two connected ducts of different
stagnant outlet sonic flow
cross section, and it will also occur between cells of a tapered
duct (since the cell space is assumed to be constant area). More
complex area changes are also discussed in the following section. Figure 3 Catalogue of all flow types considered.
Flow is from left to right.
Flow Types
A correct solution for any one of the cases above is not especially
Considering all possible kinds of flow between duct sections difficult - the difficulty lies in managing the complexity in
and/or large volumes, there are about 31 distinct possibilities as providing for so many possibilities. Increasing complexity runs
shown pictorially in Figure 3. Constant area duct flow is a the risk of inadvertent programming error or code maintenance
special case of type ~1 where the change in area is zero. Friction problems. It is beneficial to arrange the different flow types
or reducing area may cause a choke point such as in type ~2. A according to families and use as much common code as possible.
sub-sonic diverging flow will typically experience increased
pressure loss due to flow separation. (~3) If a diverging flow is Assumptions
sonic or super-sonic on the upstream side it will expand further
unless it is decelerated and compressed by a standing shock. (~4- Steady Flow
6). A super-sonic flow may pass entirely through a duct section The flow at a node (be it a cell or duct boundary) conceptually
(~7) unless it becomes choked, or a shock travelling upstream passes through an infinitesimal control volume. This allows it to
against the flow passes through the section. In both cases a be solved as a steady state problem since there can be no
travelling shock on the upstream side first slows the flow to a accumulation of mass or energy within the (small) control
sub-sonic speed before it passes through section (~8-9). If the volume. The flow is quasi-steady. It is unclear if there is any
flow passes a restricted area between two ducts, the flow is in alternative to this approach. Chalet et al. [5] claim to avoid the
two stages. (~10-19). If a duct is connected to a volume which is assumption of steady flow, but are referring instead to the
supplying the flow, the kinetic energy and pressure of the gas in application of a tuning governor coefficient which is a function
the volume is fixed. The inlet flow is assumed to be sub sonic, of flow Mach number and not based on steady flow-bench data.
though the flow may choke. (~20-24) If the duct is supplying a The quasi steady assumption remains in place.
flow to a volume, then the pressure on the downstream side is
fixed to the volume pressure (~25, ~28) unless the flow has 1D Flow
choked, in which case the sonic condition fixes the downstream The flow is assumed to have uniform properties across any given
pressure, and the flow will expand somewhat as it enters the cross section. The flow area may change, thus it is not truly 1D
volume (~26, ~27, ~29). If two volumes are connected directly but quasi 1D. Clearly boundary layers, free jets and recirculation
by a short orifice, the flow may be sub-sonic or it may choke zones violate the 1D assumption, but experimental validation
(~30-31). work such as [3, 13] show remarkably faithful simulation results
notwithstanding. The influence of detached flow can be
modelled by adding extra friction at these locations or by 2 cell
Pstagnant
including an area coefficient. These methods are imperfect since 9 2 X i 1^ cell 1 (9)
they tend not to reproduce the experimental data at all operating P0
conditions. [8] reports a model for separated flow which attempts
to account for the recent flow history and its effect on flow Solving the Flow
separation. The solution of the flow shown in Figure 4 is shown to illustrate
Flow into a Volume the general procedure. This flow has five unknowns, namely
upstream and downstream X and u, and downstream a0. The flow
The pressure of a separated jet entering a large volume is must satisfy the conditions of conservation of energy equation
assumed to be identical to the volume pressure. The exception is (10) and conservation of mass equation (11). Equations (6)
if the jet is sonic or supersonic at the exit, in which case upstream and (7) relate the incident pressure waves to X and u. After
conditions determine the exit conditions. including the effect of the discontinuity in gas properties at the
Calorically Perfect Flow contact surface, they become equation (12 a,b). Finally, if a
model for friction work is available, the change in a0 from
Each quasi steady flow is assumed to have constant specific upstream to downstream can be written as equation (13)
heats. Thus the gas is modelled as locally perfect, though specific
heats are allowed to vary in both space and time. The calorically
Energy equation 1=>2
perfect flow assumption is not a serious impediment for engine
modeling (since there are relatively low pressure ratios across 2 2 2 2 2 2
a01 X 1 a X u u
flow restrictions), but may be problematic for high speed or high 10 02 2 1 2 0 (10)
temperature (rapidly reacting) flows such as gas guns. 1 1 2 2
Solution Method
Continuity Equation 1=>2
Figure 4 shows a typical single stage flow boundary (type ~1). 2 2
The gas properties (, a0) in the cell spaces are in general A1u1 X 1 1 A2u2 X 2 1
different to the gas properties of the boundary flow. 11 2
2
0 (11)
Conceptually, contact surfaces exist immediately adjacent to the a01 a02
flow boundary. The pressure and velocity on either side of the
flow boundary are usually different. Unless the flow is Wave Equation a, b
isentropic, the downstream reference pressure speed of sound a0
a,b 1
also increases slightly.
a,b 1 ( a,b 1)
12 X 1, 2 u1, 2 2 Xia,b 1 0 (12 a,b)
2a0a,b
X1 X2
Xia Xib a0 Equation 1=>2
a0a a01 a02 a0b
a b wf
a01 a02 0
2 2
13 (13)
u1 u2 X2

A1 A2 These form a system of five non-linear algebraic equations in


five unknowns which can be solved simultaneously using the
Figure 4 A typical flow boundary showing all flow properties. Newton-Raphson method for simultaneous equations.
Unknown values in bold. Flow is from left to right.
If the flow on the downstream side exceeds the local sonic
Change of Reference Frame. velocity, the downstream wave equation (12b) must be replaced
with the sonic equation:
A flow boundary (node) is free to move relative to the ducts
reference frame. If the node is moving, the value of the each 14 a02 X 2 u2 0 (14)
wave must be modified to match the velocity of the nodal
reference frame: Initial Guess
( cell 1) The Newton-Raphson method is generally robust, and fast-
8 X wave_mod X wave Vnode (8) converging, but the process is greatly assisted if the initial guess
4a0cell
supplied is near the solution. Moreover, problems occur if the
Where Xwave_mod is the modified wave value and Vnode is the flow solution lies outside of the parameters of the chosen flow
velocity of the node relative to the waves original reference equations (such as a supersonic flow developing at the throat of a
frame with positive being in the same direction as the waves sub-sonic problem). It is thus of great importance to do careful
direction of propagation. cell and a0cell are the cell space gas analysis of the flow before passing it to the final solver. There is
properties in which the wave is travelling. Thus a waves a mass of detail in this process covering initial guesses for simple
effective magnitude is increased by a node moving to meet it, and straight ducts, to highly restricted two stage flows with possible
decreased if the node is moving with it. choking, to inflows from stagnant volumes and so on.

Determining Flow Direction Shocks

It is useful to know the direction of the flow before performing The effect of a standing shock within a diverging section is
detailed calculations, and this can be checked by calculating the automatically satisfied by the energy, continuity and downstream
stagnation pressure of the flow on both sides of the boundary. wave equation, but the possibility of a fully supersonic outlet
The inlet side will be the side with the highest stagnation must be checked, in which case the downstream wave equation
pressure. must be replaced by the a0 Equation (13).
On the other hand, if the upstream flow is supersonic, checks Nomenclature
must be made to see if the flow will choke, or have a shock
migrate upstream from the exit. If the upstream flow becomes
A area
shocked, a simple correction can be made to the upstream a, a0 speed of sound, isentropic reference pressure a
incident wave Xia on each iteration of the main Newton-Raphson P, P0 pressure, reference pressure
solution. This works quite effectively, since the value of the u fluid velocity
incident wave changes only slightly when it traverses such a wf friction work
shock. ratio of specific heats
Sample Results 1
P 2
Results of experiments by Kirkparick [10] are used to test the X pressure amplitude ratio
model for flows with area change. The results shown in Figure 5 P0
are for converging flow since flow separation effects are small.
A single shot apparatus on the left side of a pipe system injects a References
pressure pulse into an 80mm pipe. The pulse propagates along
[1] Benson, R.S., The Thermodynamics and Gas Dynamics
the pipe toward the right and traverses an area change to a 25 mm
of Internal Combustion Engines Volume 1, ed. J.H.
pipe. The pressure is recorded at a location downstream of the
Horlock and D.E. Winterbone. Vol. 1. 1982: Oxford
area change. For better accuracy, the measured pressure on the
University Press, Walton Street, Oxford.
upstream side was used to drive the simulation.
[2] Blair, G.P., S.J. Kirkpatrick, and R. Fleck.
Pexp P Experimental Validation of a 1d Modelling Code for a
Pipe Containing Gas of Varying Properties. 1995:
1.25 SAE. Paper 950275
1.2 experiment [3] Blair, G.P., et al. Experimental Validation of 1-D
simulation
1.15 Modelling Codes for a Pipe System Containing Area
1.1 Discontinuities. 1995: SAE. Paper 950276
bar
1.05 [4] Blair, G.P., Design and simulation of Four-Stroke
1 Engines. 1999: Society of Automotive Engineers,
0.95 Warrendale PA U.S.A.
0.008 0.01 0.012 sec 0.014 0.016 0.018 [5] Chalet, D., et al., Inflow boundary condition for one-
dimensional gas dynamics simulation code of internal
Pexp P combustion engine manifolds. Proc. IMechE Part D: J.
Automobile Engineering, 2009. Vol. 223
[6] Depcik, C., B. van Leer, and D. Assanis, The
1.2
experiment Numerical Simulation of Variable-Property Reacting-
1.15
simulation Gas Dynamics: New Insights and Validation.
1.1
Numerical Heat Transfer, Part A: Applications, 2004.
bar
1.05 47(1): p. 27 - 56.
1 [7] Earnshaw, S., On the Mathematical Theory of Sound.
0.95 Philosophical Transactions of the Royal Society of
0.008 0.01 0.012 sec 0.014 0.016 0.018 London, 1860. 150: p. 133-148.
[8] Gibbes, G. and G. Hong. A Model for Pressure
Figure 5 Single shot experimental pressure compared to simulation
Recovery of Flows in Expanding Ducts for 1D Gas
Dynamic Simulations. in Asia Pacific Automotive
Discussion and Conclusion Conference. 2009. Hanoi, Vietnam: SAE.
An overview of a boundary calculation method has been given, [9] Gibbes, G. and G. Hong. Improving the accuracy of a
which rigorously considers flow losses (friction etc) and non- 1D Gas Dynamics Model. in 17th Australasian Fluid
uniform gas properties. This method is applied both to duct ends Mechanics Conference. 2010. Auckland, New Zealand.
and also to cell boundaries within ducts. Typically four or five [10] Kirkpatrick, S.J. An Evaluation of One-Dimensional
equations are solved simultaneously for a single stage flow while Simulation Techniques for Predicting Unsteady Gas
two more equations are added for two stage flow. If the flow can Flow in Engine Ducting. For degree of Doctor of
be assumed isentropic (frictionless) then equation (13) can be Philosophy in Department of Mechanical and
eliminated. Further, uniform gas properties could remove Manufacturing Engineering. 1994: The Queens
another two equations. However, these special cases are not University of Belfast.
representative of most real flows, so it is considered better to [11] Kirkpatrick, S.J., et al. Experimental Evaluation of 1-D
solve the full set for general applicability. Computer Codes for the Simulation of Unsteady Gas
Flow Through Engines - a First Phase. 1994: SAE.
The results of simulation compared to experiment are good for Paper 941685
the cases tested here. Unfortunately the original experimental [12] Pearson, R., et al. Exhaust system gas dynamics in
data is no longer available, so it was manually extracted from a internal Combustion Engines. in ASME Internal
photocopy of the original publication. Some error may be due to Combustion Engine Division 2006 Spring Technical
this process, since the resolution of the simulation results is Conference. 2006. Aachen, Germany. ICES2006-1444
higher than most of the printed experimental data. [13] Thornhill, D., et al., Particle image velocimetry
investigation of a finite amplitude pressure wave.
This generalised approach to boundary flows aids in reducing
Experiments in Fluids, 2006. 40: p. 400-404.
simulation code complexity, while maintaining full rigour for
[14] Winterbone, D.E. and R.J. Pearson, Theory of Engine
ideal gas 1D flow models.
Manifold Design: Wave Action Methods for IC
Engineers. 1999: Professional Engineering Publishing
Ltd, Suffolk, UK.

You might also like