Scramjet
-
Upload
adam-resler -
Category
Documents
-
view
35 -
download
2
Transcript of Scramjet
Design and Analysis of a Scramjet Engine
by Adam J. Resler
In partial fulfillment
of the requirements for:
ME566 Aerospace Propulsion
Professor Kramer
Spring 2015
University of South Alabama
College of Engineering
Department of Mechanical Engineering
307 North University Boulevard
Mobile, Alabama 36688 USA
i
Table of Contents
List of Figures ................................................................................................................................ iii
List of Tables ................................................................................................................................. iii
1.0 EXECUTIVE SUMMARY .................................................................................................1
2.0 INTRODUCTION ...............................................................................................................2
3.0 METHODS, ASSUMPTIONS, AND PROCEDURES .......................................................4
3.1 Equations – General, Constitutive, and State.......................................................................4
3.2 Generalized Quasi-One-Dimensional Flow .........................................................................6
3.3 Predictor-Corrector Convergence (PE(CE)∞) Method .........................................................8
3.4 Scramjet Engine Design .....................................................................................................10
3.4.1 Design Parameters. ............................................................................................................11
3.4.2 Engine Characteristics. ......................................................................................................12
3.4.3 Mechanical Characteristics. ...............................................................................................14
3.4.4 Thermal/Thermodynamic Characteristics. .........................................................................14
3.4.5 Fluid Thermal/Thermodynamic Modeling – GASINFO.m ...............................................15
3.4.6 Perspective. ........................................................................................................................17
3.5 Materials Used ...................................................................................................................17
3.6 Inlet Diffuser Design..........................................................................................................18
3.7 Combustor Design .............................................................................................................20
3.8 Nozzle Design ....................................................................................................................20
3.9 Other Considerations .........................................................................................................21
4.0 RESULTS AND DISCUSSION ........................................................................................22
5.0 CONCLUSIONS................................................................................................................28
ii
REFERENCES ..............................................................................................................................29
APPENDIX A – Calculation of Atmospheric Conditions by Altitude Above Sea Level .............31
APPENDIX B – Specific Heat Capacity of Dry Air vs. Temperature ..........................................35
APPENDIX C – SCRAMJET.m Code/MATLAB ........................................................................37
APPENDIX D – GASINFO.m Code/MATLAB ...........................................................................55
APPENDIX E – Rate Constants for 15 Species, 52 Reactions, Hydrogen Combustion Model....64
LIST OF SYMBOLS, ABBREVIATIONS, AND ACRONYMS ................................................65
iii
List of Figures
Figure Page
Figure 1. Scramjet engine concept design. ..................................................................................... 2 Figure 2. Scramjet general arrangement sketch. ........................................................................... 10 Figure 3. 3D representation of scramjet design (isometric view, from front to back); note the
rapidly divergent nozzle. ............................................................................................................... 21
Figure 4. Velocity, temperature, and pressure profile from SCRAMJET.m outpout. .................. 24 Figure 5. Exergy/Entropy analysis of flow through engine at M = 5. .......................................... 25 Figure 6. Estimated operational range; general conditions ........................................................... 26 Figure 7. Estimated range at high-drag conditions. ...................................................................... 27
Figure 8. Temperature and Pressure vs. Altitude Above Sea Level ............................................. 32 Figure 9. Density vs. Altitude Above Sea Level .......................................................................... 33
List of Tables
Table Page
Table 1. Flow variables and how to obtain them. ........................................................................... 4 Table 2. Sutherland's Formula values for atmospheric gases [5] ................................................... 6 Table 3. Thermodynamic and mechanical effects comprehended in scramjet design model. ...... 11
Table 4. Species names. ................................................................................................................ 17
Table 5. Ranges of dissociation and ionization for air at approximately 1-atm pressure. ............ 19 Table 6. Ambient conditions according to altitude ....................................................................... 31 Table 7. Pressure, Temperature, and Density: Sixth-order polynomial coefficients .................... 32
Table 8. Variance of polynomial calculations vs. altitude ............................................................ 34 Table 9. Specific heat capacity vs. temperature up to T = 2500 K ............................................... 35
Table 10. Specific heat at constant pressure vs. temperature. ...................................................... 36
1
1.0 EXECUTIVE SUMMARY
This report is a study of the design of a scramjet engine for use in an aerospace
propulsion application. The steady-state compressible flow phenomena and combustion effects
are studied using the generalized quasi-1D flow equations, complete combustion model, and
known mechanical and thermodynamic equations used to describe typical aerospace engines.
The purpose of studying the scramjet was due to general interest in the emerging field of
supersonic propulsion, a field that is growing in funding and feasibility. The primary burdens on
scramjet design involve material technology and lack of testing. Computational flow modeling
has only just now, within the last 5 to 10 years, entered a point where high-speed transient flow
can be studied with some validation (this model is steady-state).
The results of this study were good. Pressure recovery was optimal for this type of
engine. A thrust of 405.7 kN was obtained, almost 4 times more powerful than a single F-15C
fighter aircraft engine. A specific impulse of 174.1 seconds was achieved with a net mass flow of
716.5 kg/s at an exhaust velocity of 1635.2 m/s.
Further study is required to combustion chamber operation. A working non-equilibrium
model is desired as this will provide the most accurate estimate of gas phenomena in the
chamber. Boundary layer analysis of the exterior of the engine should be considered as well as a
deeper analysis of engine cooling schemes. Interior machinery studies should also be considered
– there might be a good opportunity to use a Stirling engine to drive a pump bank necessary to
provide fuel injection and coolant flow via heat source at the nozzle and heat sink at the fuel
tank.
2
2.0 INTRODUCTION
The graduate students of the University of South Alabama Spring 2015 ME566
Aerospace Propulsion class are tasked with completing a project in aerospace propulsion engine
design. The choice of engine design was left to the student.
The engine type chosen for this project was a design of a supersonic combustion ramjet,
or scramjet. The scramjet is distinguished from other air-breathing engines in that it performs the
combustion process at supersonic speeds rather than to decelerate inlet flow to subsonic speeds
prior to combustion.
Analysis of this type will take place primarily in a quasi-one-dimensional setting. Solving
non-linear partial differential equations (PDEs) becomes complex very quickly, and it is possible
to conceive a “good” design by using techniques in the 1D framework. If time permits there may
be discussion and/or demonstration of some higher level non-linear PDE computation solutions
for well-studied supersonic/hypersonic flow characteristics.
The scramjet engine design generally involves directing flow through a series of oblique
shocks so that the flow is slowed to an acceptable level where maximum combustion of the fuel
may take place. A concept of a scramjet can be found in Figure 1 below:
Figure 1. Scramjet engine concept design.
3
A good design Mach number for initial iteration of design would be M∞ = 5.0. The reason
this may be a good starting point is that it’s the Mach number, by scientific consensus [1], where
the hypersonic flow regime begins, an area of interest in design of this engine.
The first iteration of this design will explore design and optimization of the engine at M∞
= 5.0. A look at flow characteristics in both the mechanical and thermal regime will be explored,
including potential heat transfer to the skin of the interior of the engine. This may require
extended study into boundary layer effects of supersonic/hypersonic flow. It will prove difficult
[2]—an initial scan of the theory required to accomplish analysis of the boundary layer requires
study of turbulent boundary layer computational methods, such as computation of Reynolds-
Averaged Navier-Stokes relations (RANS), large-eddy viscosity simulation, and/or other
turbulent flow models that require considerable computing cost in the course of design of such
an engine. The flow outside of the boundary layer may be considered inviscid, and the standard
quasi-1D relationships will apply at this level. The effects of friction, heat addition, and area
change will be studied during this project. An appropriate dissociation model may also be
applied.
The ideal available flow work (flow exergy) will be derived from the standard
thermodynamic models in the consideration of no friction or heat losses. Losses from shock,
boundary layer friction and heat transfer, completeness of combustion, and dissociation of
nitrogen and oxygen in the working fluid will be subtracted from the ideal energy budget in order
to provide a theoretical thermal and propulsion efficiency.
The conceptual design criteria were given as:
1. Design requirements/assumptions (e.g. fuel, propellants, mission, etc.)
2. Assess readiness availability (e.g. materials, manufacturing processes, etc.)
3. Concept sketch
4. Initial sizing estimate (e.g. dimensions of components/assemblies; i.e. ramjet: inlet,
combustor, nozzle, etc.)
5. Engine performance estimate (e.g. thrust, Isp/TSFC, etc.)
6. Operational boundaries (e.g. starting Mach number, velocity, maximum Mach
number, burn-out velocity, range, service ceiling, etc.)
7. Initial mass properties (e.g. weights, mass fraction)
The design is to be iterated in the event the original design did not result in the desired
performance.
4
3.0 METHODS, ASSUMPTIONS, AND PROCEDURES
3.1 Equations – General, Constitutive, and State
The equations most useful for analyzing fluid flow as a continuum are the well known
Navier-Stokes equations, composed of the fundamental theory of matter (mass continuity),
Cauchy laws of motion, first law of thermodynamics, entropy equations, and constitutive models,
which will be displayed and discussed here.
In general the flow will be modeled as isentropic across the majority of the flow regime.
The viscous effects at the boundary layer will be accounted for in the appropriate boundary layer
equation, if necessary. The most helpful equations for studying fluid flow are the Navier-Stokes
equations [3]:
Mass Continuity 0
i
i
x
u
Dt
D (1)
Momentum Conservation ijiji bT
Dt
Du , (2)
Energy Conservation i
i
ijijx
qqT
Dt
D
int
uD (3)
Table 1 below displays the unknown variables and the method by which they can be computed
[1].
Table 1. Flow variables and how to obtain them.
Variables Name Comment
ρ density (kg/m3)
Obtained from a simultaneous solution of the continuity,
momentum, and energy equations. u, v velocities (m/s) (u = vx, v = vy)
h enthalpy (J/kg)
T = T(ρ, h) temperature (K) Obtained from the equilibrium thermodynamic properties of high-
temperature air. p = p(ρ, h) pressure (Pa)
μ = μ(T) dynamic viscosity (Pas)
The constitutive model used for the Cauchy stress tensor shall be that of a viscous,
Newtonian, compressible fluid, with bulk viscosity of zero (Stokes’ condition) equated as
follows:
ijijij pT D 2 (4)
where:
i
j
j
i
ijx
u
x
u
2
1D (5)
5
is the rate-of-deformation tensor component of the strain rate tensor. In general, a significant
portion of the flow regime will be modeled as inviscid; however, any boundary layer analysis
may require utilization of the viscous terms, so they’re left here.
The flow will be modeled as a semi-perfect gas using the following equations:
RTp (6)
Tch p (7)
Tce (8)
The specific heat at constant volume/pressure and specific enthalpy can be modeled for a
semi-perfect gas using the Shomate equations [4]:
2
32
T
EDTCTBTAc p (9)
HFT
EDTCTBTAThh
432
432
15.298
(10)
GT
EDTCTBTTAs
2
32
232ln (11)
The constants are tabulated in the National Institute of Standards and Technology public
database [4].
The local speed of sound will be calculated as follows:
RTa (12)
The Mach number is defined as:
RT
u
a
uM
(13)
From the second law of thermodynamics, the entropy can be calculated as:
dPvdhdvPdedsT (14)
Application of the ideal gas equation to second law results in the familiar entropy relation
6
01
02
01
02
12 lnlnp
pR
T
Tcss p (15)
where T0 and p0 are the stagnation temperature and pressure, respectively, given by
pc
uTT
2
2
0 (16)
and
2
2
0
upp
(17)
Where gas viscosity may be concerned it will be assumed as solely temperature-
dependent using Sutherland’s Formula [5]:
CT
CT
T
TT 0
5.1
0
0 (18)
Table 2. Sutherland's Formula values for atmospheric gases [5]
Fluid
μ0
(x 10-6
poise)
(x 10-7
kg/ms)
T0
(K)
C
(K)
Air (A) 221.0 296.15 142
Nitrogen (N2, N) 176.5 296.15 110.6
Oxygen (O2, O) 203.9 296.15 127
Hydrogen (H2, H) 88.2 296.15 83
3.2 Generalized Quasi-One-Dimensional Flow
This section will briefly discuss those equations involved for generalized quasi-one-
dimensional flow – flow that takes into account heat flux, friction, and area change
simultaneously. The equation is derived from the continuity, momentum, and energy equations
from section 3.1 taking into account the equation is steady-state, one-dimensional, semi-perfect,
compressible, inviscid fluid [6]:
Continuity 01111
dx
md
mdx
dA
Adx
du
udx
d
(19)
Momentum 02
1 22
dx
du
u
M
D
cM
dx
dp
p h
f (20)
7
Combining these equations with the definition of Mach number, the ideal gas equation,
and the stagnation temperature relation, the following equation is derived that can be marched to
a solution using a numerical integration method:
h
f
D
cM
dx
dT
T
M
dx
dA
AM
M
Mdx
dM2
0
0
2
2
2
22 412
1
2
11
(21)
The differential mass term has been neglected in the above equation due to design of the
scramjet having an impermeable boundary. The program will be constructed to assign the
appropriate value to fuel mass flow, at the location required, modeled as piecewise continuous –
there is no need for the differential mass term.
The total pressure differential given the above equation is calculated as:
h
f
D
c
dx
dTMp
dx
dp 4
2
0
2
0
0 (22)
The user defines the differential area, differential stagnation temperature, and material
characteristics (that define friction factor) as functions of x in order to produce a system of linear
ordinary differential equations that can be solved using a numerical method. This will be done by
a second order polynomial for each design parameter in this project.
For a rectangular cross-section duct with a completely wetted perimeter:
xzxy
xzxy
xP
xAxD
2wetted
eff (23)
The Reynolds number for flow in a rectangular cross-section duct is:
xPx
m
x
xDxuxx
wetted
effRe
(24)
The Darcy-Weisbach friction factor for turbulent flow can be found by using the
Colebrook equation:
fhf cDc Re
256.1
3.7
1log2
110 (25)
where the goal is to calculate the Fanning friction factor (used in compressible fluid analysis) –
in fact, the friction factor only differs from Darcy-Weisbach by a factor of four.
Many have studied the friction factor calculation searching for the best explicit solution
(the Colebrook equation requires implicit solution methods in order to solve). A study done by
Ghanbari, Farshad, and Rieke [7] states the following as a best-fit explicit solution to finding the
8
friction factor (modified by the factor of four in the below equation, to find the Fanning friction
factor):
169.29152.0042.1
10Re
731.2
21.7
1log52.125.0
h
fD
c (26)
where ε is the sand-grain roughness of the duct material. Most materials in the duct will be
considered smooth, having a sand-grain roughness on the order of 0.001. The equation is good
for 2100 < Re < 108, which is the expected range for high-speed fluid flow in the scramjet
design.
The Prandtl number, where required, will be taken as constant 0.85 throughout the fluid
flow.
The user inputs polynomial equations of the form
2
210 xcxcdx
d
(27)
to describe the behavior of ϕ = cross-sectional area and ϕ = stagnation temperature addition. By
changing the variables c1 and c2, a linear or polynomial fit is achieved that is useful for
describing area and temperature characteristics in the regime under study.
The integral relations for temperature, pressure, and density are used to calculate the
temperature, pressure, and densities in stepwise fashion:
2
2
0
0
2
11
02
11
00xM
M
T
xT
T
xT
(28)
0
00
0 T
xT
xM
M
xA
A
p
xp (29)
11
1
ii
ii
i
i
xAxu
xAxu
x
x (30)
3.3 Predictor-Corrector Convergence (PE(CE)∞) Method
MATLAB is used as the primary analysis tool for the scramjet engine design. The Mach
number derivative and the subsequent polynomial design factor and integral relations that are
used to evaluate the profile throughout the engine are generally “soft” enough that a simple Euler
method with small step-size can be used to march the equations towards a solution. However,
9
additional stability may be required in areas of choked flow (a condition that will not be allowed
to occur in this model) or sharp increases in stagnation temperature, area change, or friction
factor (i.e. during combustion, nozzle expansion, or material change, among other possibilities).
Therefore, a predictor-corrector method is utilized in order to converge upon a solution within a
tolerance before proceeding stepwise into the equation.
In general, an initial solution is predicted using an Euler method, where the differential
equation and an initial condition are known:
0011 ,,~ yxyyyxhfyy iiii (31)
The derivative is then evaluated at the new point:
111~,, iiii yhxfyxf (32)
The corrector equation is evaluated as follows:
111~,,
2 iiiiii yxfyxf
hyy (33)
The error is measured between the initial calculation and the corrected calculation against
a user-defined tolerance, σ, such that:
11
11
11
~
ifwhere~
ii
ii
iiyy
yyyy (34)
This algorithm is run until the solution converges to the user-defined tolerance. A
tolerance of 0.0001 was used routinely throughout the program. The error in this method is on
the order of step size – in this program the error is on the order of 0.001, although it can be set
lower without drastically affecting computation time. This tolerance was validated informally by
trial-and-error and found to be more than adequate in terms of fast convergence and reasonability
of result while not incurring excessive computation cost. It can be used for nonlinear ordinary
differential equations and is inherently stable throughout the velocity regime under study.
MATLAB does not carry this method hard-programmed in its student package – the
program is written using the algorithm specifically for this purpose. MATLAB contains fourth-
order Runge-Kutta methods, Adams-Moulton implicit methods, as well as many other algorithms
to solve most stiff and non-stiff differential equations with moderate to low accuracy; however,
this program as written allows the user to make changes that would be helpful to the final result
whereas hard-programmed MATLAB methods require changes to existing code that may be
detrimental to the program’s use. Thus, the PE(CE)∞ method is used throughout the program.
10
3.4 Scramjet Engine Design
Figure 2. Scramjet general arrangement sketch.
A typical scramjet configuration is used in this design. The vehicle itself provides the
initial inlet pressure and temperature by shocking flow down to the entry conditions using
vehicle geometry. This flow is then directed into a supersonic inlet diffuser or inlet
diffuser/isolator assembly. It is then directed into a combustion chamber before being fired out of
a diverging or converging/diverging (CD) nozzle, depending on desired configuration.
There are many types of diffusers utilizing various modes of compression. Most modes
for the scramjet variety attempt to allow as much airflow as possible before continuing to shock
it down to a “workable” level in a shock train, a process that can create tremendous heat. Some
designs incorporate an isolator as part of the diffuser where shocks are facilitated and fuel-
mixing occurs. The flow is compressed to near sonic conditions (from supersonic) before
advancing to the combustor. If the flow is of certain temperature, it is possible for combustion to
begin in the isolator; however, this is typically only seen in applications where fuel is pre-mixed
with flow in advance of the combustor and the vehicle speed. For example, hydrogen auto-
ignites at around 800 K, and this temperature can be achieved (depending on vehicle
configuration) at around M = 7.0, or thereabouts. Further retarding of the flow after this point
causes the temperature to further rise. It is noted here as a consideration in inlet design.
As the flow reaches the diffuser or diffuser/isolator throat, it has achieved the maximum
compression possible. At this point the flow is blasted into a combustor at near-sonic speeds. The
addition of heat will cause the flow to simultaneously expand and retard towards choked
conditions. In order to avoid this problem, the combustor geometry must undergo a positive area
change so that the flow has room to expand and accelerate to supersonic speed. Combustor
design must take into consideration heat addition by combustion, heat reduction by dissociation,
and corrosion protection in the event dissociation occurs (in the case of using hydrogen as a fuel)
where highly corrosive byproducts are created during the combustion process. Combustor length
must be taken into account as well – consider a supersonic flow field in an air-breathing engine:
The time that one particle spends in the engine, from diffuser to exhaust, is measured on the
order of thousandths of a second (in the model evaluated in this design project, the control
11
volume travel time in a 3.5-m long engine was approximately 0.003 seconds). Counter to this
line of thought, increased length will cause higher mass burden and higher drag (skin friction)
that may be detrimental to the overall vehicle design.
From the combustion chamber the flow is then directed towards the nozzle. Sometimes
the nozzle incorporates the vehicle as part of its design. The flow is already supersonic, so
further expansion can be produced by increasing area from supersonic flow, or the flow can be
choked and advanced through a divergent section. The benefit of added thrust comes at a cost of
higher material burden and entropy in the nozzle section with a C-D nozzle design. Again, there
will be high material burden at any choked points in the nozzle as this is where the highest
temperature will be experienced.
The design in this project will consider an inlet diffuser, two combustion chamber
sections, and two nozzle sections, with no isolator. It further assumes constant deceleration in the
inlet diffuser after the diffuser cowl flap, and that the small angle redirection into the combustion
chamber will cause a negligible-strength shock to form that is quickly dissipated in the
combustion chamber (the diffuser purposely drives the flow to M = 1.0). The combustion
chamber expands to accommodate the supersonic flow without choking the flow, the fuel is
combusted completely prior to entering the nozzle, and the flow expands through the nozzle
creating thrust.
Table 3 represents the phenomena studied in this design project.
Table 3. Thermodynamic and mechanical effects comprehended in scramjet design model.
Mode Desc.
Area
Change Friction
Heat
Addition
Dissociation
Technique Eq. Non-Eq.
1 Inlet Shock Train N N N N N Oblique
Shock
Relations
2 Diffuser Y Y N N N Generalized
Quasi-1D
Flow with
GASINFO
algorithm
3 Combustor Y Y Y N* N*
4 Nozzle Y Y N N* N*
* The GASINFO program was written to solve the chemical kinetic equations to solve for chemical-
thermodynamics in the combustor and the nozzle. At the time of this report’s due date the GASINFO algorithm had
not been successfully implemented, and an artificially added stagnation temperature differential was added based on
desired fuel fractions using the generalized equations.
3.4.1 Design Parameters.
Engine design parameters shall consist of level flight altitude, flight Mach number,
number of inlet shocks chosen by the designer, and the engine maximum operating temperature.
Atmospheric air temperature, pressure, and density is measured as a direct function of altitude
above sea level using the information found in APPENDIX A – Calculation of Atmospheric
Conditions by Altitude Above Sea Level.
12
3.4.2 Engine Characteristics.
The engine characteristics to be measured include inlet/exhaust area, engine length,
thrust, thrust-specific fuel consumption (TSFC), specific impulse, propulsion efficiency, thermal
efficiency, overall efficiency, fuel fraction, thrust per unit airflow, diffuser to nozzle transit time,
fuel-air equivalence ratio, burn time per unit fuel tank volume, and mass flow.
For the scramjet engine, the thrust is measured as follows:
eaeea Appuufm 1T (35)
Thrust per unit airflow:
a
eae
e
a m
Appuuf
m
1
T (36)
Thrust-specific fuel consumption is calculated as
T
fmTSFC
(37)
Specific impulse is calculated as
e
eq
spg
uI (38)
where
netm
Appuu eae
eeq
(39)
Propulsion efficiency is calculated as
e
e
uu
uu
1
2pr (40)
Thermal efficiency shall be calculated as
R
e
fQ
uuf 221 22
th
(41)
Overall efficiency is then calculated as
13
thpro (42)
Fuel fraction is calculated using the ideal equation. It was desired to have the fuel fraction
found by optimization from user input considering the effects of possible flow dissociation,
frozen flow, and other phenomena that could’ve appeared in design of the engine. However, the
algorithm designed for this purpose was not functional; therefore, the fuel fraction calculation is
solved using classical means. The maximum temperature is stated in pre-processing, and the
following equation is used to calculate the optimal fuel fraction required to create thrust:
02
max
02
02
max 1
T
T
Tc
Q
T
T
f
p
R
(43)
where T02 is the temperature at the combustor inlet. Textbook equations show use of the ambient
air temperature in this place; however, this seems to be derived from subsonic diffuser relations
that show a negligible increase in enthalpy across the diffuser whereas the combustor inlet in a
scramjet may be a vastly different temperature than at diffuser entrance.
Fuel-air equivalence is calculated as
stf
f (44)
where fst for hydrogen is 0.029154519.
Diffuser to nozzle transit time, or, the time that one particle-sized control volume of air
takes to travel from one end of the engine to the other is calculated by direct discretization of the
differential equation for velocity:
L
x u
xt
u
xtu
dt
dx
0
and (45)
Burn time per unit tank flow volume (per cubic meter) is useful for sizing potential
vehicles utilizing the scramjet engine design. It is simply found using the liquid H2 density and
fuel mass flow calculations as follows:
ff
l
mm
3)(H kg/m70
2
(46)
The solution to the specific burn time is given in seconds per cubic meter of tank storage volume.
14
For comparison purposes, the scramjet engine design is compared side-by-side with the
United States Air Force F-15C propulsion unit – the Pratt & Whitney F100-220 Turbofan, which
has an unclassified maximum thrust (in the late models) of 129.7 kN (29,160 lbf) [8]. A ratio of
scramjet thrust to PW F100-220 thrust is provided as output.
The service range is calculated in terms of ratios as might be useful for the designer. The
approximate range of the engine can be calculated using:
g
Q
m
mLs R
f
0
0 ln
D (47)
This is a two-parameter problem where the x-axis is plotted using the mass ratio, and the y-axis is
plotted using the lift-to-drag ratio, and the range is fitted to the resultant curves.
Finally, mass flow is calculated as:
afa mfmuAm and (48)
3.4.3 Mechanical Characteristics.
The only mechanical characteristics studied in this project are pressure recoveries across
each engine section. A distinction between scramjets and ramjets, turbojets, and turbofans is that
there is a significant loss of pressure recovery in the combustor section of the scramjet whereas
the combustors in the ideal ramjets, turbojets, and turbofans are nearly isobaric (constant
stagnation pressure).
Since the model relies on stepwise calculation of total pressure, the pressure recovery can
be easily calculated at each step, at each section, or as the user defines. In general,
01
02
p
pr (49)
3.4.4 Thermal/Thermodynamic Characteristics.
Thermal characteristics under review include adiabatic efficiencies, section average
specific heats and specific heat ratios, entropy, and exergy.
The engine is entropic throughout, primarily through reduction of stagnation pressure due
to friction and combustion. Adiabatic efficiencies are primarily obtained using a combination of
theories and empirical evidence. In the absence of empirical data, it was assumed that the
adiabatic efficiency could be best measured by applying an exergy analysis to each engine
section whereby the efficiencies are more easily calculated by exergy destroyed (entropy gained)
than by a direct entropy analysis. Flow exergy for a steady flow process can be modeled as:
15
00
o
0
o
0 ssThhbbex (50)
where b = ho – T0s. By calculating the methalpy and entropy at each section against a reference
temperature (for air, T0 = 298.15 K) the available flow work can be found. Values between 0.9
and 1.0 are expected during the analysis. By definition, the adiabatic efficiency in the combustor
is 1, as available work is added to the flow in the form of heat. These adiabatic efficiencies may
assist the engineer in more convenient analysis using thermal efficiency factors rather than
complex functions.
The adiabatic efficiency in this case is calculated, in general, as:
i
f
xe
ead
(51)
3.4.5 Fluid Thermal/Thermodynamic Modeling – GASINFO.m
The program GASINFO.m was created for calculating fluid properties in the flow. It
originally was intended for use in studying non-equilibrium dissociation effects while returning
data necessary to calculate flow characteristics in the typical scramjet engine.
The program is centered on a study of hydrogen combustion in air using a 15-species
model [9]. The model is ambitious – it contains reaction kinetic equations for the 52 elementary
reactions that occur in mixing of hydrogen and atmospheric oxygen and nitrogen (trace
atmospheric elements are neglected). To compile the program, the general model used by
students at the Polytechnic University of Catalunya was implemented [10].
Mass balance for species conservation with overall mass differential set to zero requires
the use of a mass fraction relation:
i i
iii
m
m
m
mY (52)
The species differential mass fraction is then found using the following calculation:
AMdx
mdi
i (53)
and combining the mass relations with species conservation:
u
M
dx
dY ii
(54)
General reaction equations of the form
16
r
N
i
riri
N
i
riri Nrvvii
,,2,11
,,
1
,,
(55)
are carried out for i species and r reactions (Nr is the number of reactions under consideration). v’
and v’’ are the forward and backward stoichiometric coefficients (integers) and χ is the chemical
symbol for the ith species.
The production rate of the ith species can be calculated as follows:
r
N
r
ririi qvvr
1
,, (56)
where r is the rate-of-progress variable. r is found by (inclusive of third-body collision
efficiencies) the following equation:
i
ri
i
ri
i N
i
v
rirb
N
i
v
rirf
N
i
ririr kkq1
,,
1
,,
1
,,,, (57)
where γ is the third-body efficiency as given in the literature (for all rate-of-progress variable
calculations where the third-body efficiencies are all 1, and first factor is the total concentration
of the mixture).
Reaction kinetics are modeled with the Arrhenius equation:
RT
ETk exp (58)
where α, β, and E/R are given by empirical information in literature [9].
The backward rate constant is related to the forward rate constant as follows
rc
rf
rbK
kk
,
,
, (59)
where Kc,r is the concentration constant, defined by
i riri vv
atm
rprcRT
pKK
,,
,, (60)
and the equilibrium constant Kp,r defined by
RT
h
R
s
RT
GK ii
rp
oo
, expexp (61)
17
where G is the Gibbs free energy as a function of temperature, s is the species-specific entropy,
and h is the species-specific enthalpy, all as functions of temperature only.
The program makes use of the Shomate constants found using NIST Webbook values [4].
It has the capability of calculating mole fractions, partial pressures (when activated), and all of
the constituents found in this section. Primarily it can be used to solve for differential mass
fractions that can be marched to gas info solutions where dissociation and other gas effects are
concerned.
The species reviewed are as follows:
Table 4. Species names.
Symbol Species Name
H atomic hydrogen
H2 hydrogen
H2O dihydrogen oxide (water)
H2O2 hydrogen peroxide
HNO nitrosyl hydride
HNO2 nitrous acid
HO2 hydroperoxy radical
N atomic nitrogen
N2 nitrogen
N2O nitrous oxide
NO nitric oxide
NO2 nitrogen dioxide
O atomic oxygen
O2 oxygen
OH hydroxyl radical (hydroxide)
The purpose of the program was ultimately to find the heat released in the exothermic
hydrogen oxidation reaction while accounting for heat removed from the system through
dissociation/recombination reactions of the working fluid. The program was run many times but
was found to be unstable when coupled with the scramjet.m script, therefore, it’s only use is to
pull specific fluid properties of air, such as specific heat, specific enthalpy, etc., dependent on
temperature, pressure, density, velocity, and instantaneous cross-section area, which sufficed for
the project. The Arrhenius equation constants can be found in APPENDIX E – Rate Constants
for 15 Species, 52 Reactions, Hydrogen Combustion Model.
3.4.6 Perspective.
This section was entered to give a view of how the engine performed in general by
comparing flight speed (in miles per second), transit time from New York, NY to Los Angeles,
CA, and the time to circumnavigate Earth about the equator. This was just done for fun to see
what a hypersonic vehicle could truly accomplish if technology allowed for a feasible design.
3.5 Materials Used
Many of the preliminary studies make use of ceramic matrix composites (CMC),
utilization of carbon/carbon and carbon silicon oxide, and use of experimental materials as of yet
classified to the public. The primary purpose of this project is to study the system from
theoretical standpoint. The general temperature regime of the upper limit of carbon-carbon
18
composites, which will be assumed for engine construction throughout, is around 2000°C
(2273.15 K) [11]. Active cooling of the engine surfaces is assumed such that the maximum
operating temperature in the engine is around 2000 K.
Since much of the material used is classified, the assumption of CMC or carbon-carbon
materials is implemented.
3.6 Inlet Diffuser Design
The inlet uses the geometry of the hypersonic vehicle itself to shock-compress the flow
down to a workable flow velocity. Multiple shocks have been the typical method by which to
compress the flow; preferably arriving at choked flow conditions at the combustor in order to
allow the maximum time for combustion to occur (This also maintains the specification of
supersonic combustion as M ≥ 1 throughout the engine). This is typically accomplished using the
vehicle’s own frontal geometry to the advantage of the engine inlet.
Oblique shocks occur when a deflection into the flow geometry occurs, typically in the
form of a sharp turn at a vertex such that the flow is forced to undergo a shock in order to meet
the new flow geometry. The shock angle can be found explicitly (and exactly) by the following
equation [1]:
tan2
113
3
cos4cos21
tan,,2
12
1
M
M
M (62)
where δ = 0 yields the strong shock solution, δ = 1 yields the weak shock solution;
2/1
22222 tan2
11
2
1131
MMM (63)
and
242232
3tan
4
1
2
11
2
1191
1MMMM (64)
The Mach number in the new region, the region after the shock, can be found using the
following relation [12]:
2/1
1
22
11
22
1
1
22
11
22
11
24
1
2
22sin11sin2
1sin1sin4sin1
MM
MMMM (65)
The optimization criterion to maximize total pressure recovery was developed by
Ostwatitsch [13], who discovered that the maximum recovery occurred when all shocks were of
equal strength:
19
112211 sinsinsin nnMMM (66)
This relationship considerably eases the burden of calculating and iterating to find the
necessary deflection angles. However, it is also helpful to state an explicit relationship between
deflection angle and shock angle [12]:
1
1sin2
1tancot
22
1
2
11
M
M (67)
The goal of inlet design for this project will be to decelerate the flow to choked
conditions (or as close to choked conditions as can be allowed) while minimizing total pressure
loss and static temperature increase. A limiting factor will be the inlet temperature because the
combustion materials may combust at a lower temperature and may not cause proper expansion
due to “frozen” behavior at high energy states. Further limitations may exist downstream in the
case that complete combustion does occur. Notwithstanding engine material limitations, there
could also be significant mechanical losses due to fluid dissociation and ionization. For air, these
effects can be approximated by assuming that the air is composed only of nitrogen (N2) and
oxygen (O2) in the standard 1:3.76 mass ratio (20.9% O2, 79.1% N2).
Table 5 below displays criteria for dissociation and ionization of air at 1-atm pressure:
Table 5. Ranges of dissociation and ionization for air at approximately 1-atm pressure.
Temperature Range Nitrogen Oxygen
0 K – 2500 K No reactions No reactions
2500 K No reactions Dissociation begins
O2 → 2O
4000 K Dissociation begins
N2 → 2N
Dissociation almost complete
9000 K Dissociation almost complete
Ionization begins
N → N+ + e
-
Ionization begins
O → O+ + e
-
Some effects of dissociation, which will be discussed more in-depth in the combustion
portion of the design analysis, include endothermic chemical reactions that result in loss of flow
exergy. The concern is listed here as a means to bring attention to the limitations of speed, total
pressure loss, and static temperature increase.
20
3.7 Combustor Design
The scramjet combustor is designed such that the flow remains supersonic and full
combustion occurs. Most combustion chambers under review, for flight speeds of Mach 5 or
thereabouts, required approximately 0.5 to 1.0 meters in length of combustion chamber in order
to achieve full combustion and maximum mixing efficiency. The flow must also expand quickly,
as the diffuser has increased the pressure and reduced flow to near-choked levels – in order to
avoid any standing normal or oblique shocks within the system, the flow must be allowed to
remain supersonic throughout the engine. So there will be an area increase, friction, and heat
addition in this location. The pressure recovery in the combustor is expected to be low in
comparison with the rest of the engine. The addition of heat and friction to supersonic flow
causes the flow to tend towards choked conditions; therefore, the application of area expansion,
and how much heat is added at what time are important considerations when designing the
combustor.
It’s important to note here that the model has the hydrogen fuel being injected near the
choke point – the point of highest static pressure in the entire engine. Ideally the hydrogen fuel
may be added in the diffuser and isolator phase of the engine to allow maximum time for mixing
prior to combustion. In the event of high-speed flow, the temperature may cause the hydrogen to
auto-ignite (~800 K), so location of the injectors becomes important at that point as well. It
seemed to be a fairly common idea to inject hydrogen at different sections of the engine to
provide additional power where mixing was difficult but thrust power was required. For instance,
hydrogen may be atomized and injected in the isolator and then again halfway down the
combustion chamber to break up frozen flow conditions or add additional heat to supersonic
flow.
Figure 2 was created as a general-concept-level design as to what a potential vehicle may
look like with the scramjet installed. There could be design considerations as to what provides
impetus for fuel flow. Some suggest a turbopump driven by bleed-air from a high pressure
section of the engine. At a cost of mass, a battery or hydrogen PEM fuel cell could be used to
power a motor to drive a pump. There is a well-defined heat source at the combustion chamber
entrance and exhaust nozzle, and a heat sink at the fuel tank (cryogenically stored hydrogen)
such that a Stirling engine design may be feasible for driven machinery.
The primary cause of loss in the combustion chamber is friction due to fuel mixing and
flow combustion (poor pressure recovery at supersonic speeds), and effect of heat removal due to
dissociation. As an example, the dissociation of oxygen is described as:
O2O2 (68)
where the heat of formation of the atomic oxygen is 249.17 kJ/mol endothermically such that
heat is removed from the flow to form the atomic oxygen molecules. As the engine is
constrained to a maximum temperature of 2000 K, and oxygen only begins to dissociate at 2500
K, the dissociation effects are not considered at present.
3.8 Nozzle Design
The scramjet nozzle is a barely discernible converging-diverging nozzle that compresses
the incoming air to near-choked conditions before blasting the exhaust out of a rapidly expanding
21
(area changing) nozzle. The divergent section of the nozzle primarily uses the vehicle geometry
as its expanding plane. Effort was made to direct the thrust in the axial direction by parabolically
curving the nozzle to save on both added mass and pressure recovery at true exhaust plane. This
was done using the scramjet.m code such that the maximum exhaust velocity was found, then
manually reducing the length of the nozzle until the exhaust velocity was a maximum at the
exhaust plane (thereby maximizing thrust). Ideally the flow should be expanded to ambient
conditions, but at the altitude in which the scramjet is operating (almost 10 miles above Earth’s
surface), the ambient pressure is very low, and there is a high probability of underexpanding the
flow.
Figure 3. 3D representation of scramjet design (isometric view, from front to back); note the rapidly divergent
nozzle.
The nozzle represents the largest portion of the engine, geometry-wise. It is noted that the
engine is designed to “tuck under” the main body of the hypersonic vehicle. There is a high
temperature area at the choke point that would most likely require active cooling in order to
operate at 2000 K – it is generally assumed this is done by pumping hydrogen around the engine
cowling at this point in a pre-heating of fuel before injection.
3.9 Other Considerations
Some considerations not included in this analysis are sustainability,
reliability/maintainability, and vibration modes. Most scramjet tests result in destruction of
instrumentation and often the vehicle itself, so data on these points is slim. Vibration may be
excessive with high-frequency pressure fluctuations inside the engine and flow outside the
engine (flutter). Prevention of excessive vibration may result in increase of mass. Vibration
testing may also lend to design of appropriate engine hardpoints. Engines of this nature are
frequently modeled as free-free hollow beam continuous structures; however, the use of carbon-
carbon or silicon oxide composites requires very sensitive models incorporating high-level
micromechanics, fracture mechanics, and other anisotropic stress analyses. This is not done here.
22
4.0 RESULTS AND DISCUSSION
The SCRAMJET program was utilized given design parameters of Mach 5 flight speed, 15 km
altitude, three shocks prior to engine inlet, and maximum allowable temperature of 2000 K. The
following output was achieved:
--------------- SCRAMJET.m Program Results ---------------
DESIGN PARAMETERS:
Flight Mach #: 5
# Initial Shocks: 3
Altitude: 1.5e+04 m
Max. Temp: 2000 K
----------------------------------------------------------
ENGINE CHARACTERISTICS:
Diffuser Intake Area: 0.3333 m^2
Engine Length: 2.155 m
Exhaust Area: 1.818 m^2
Thrust:...............SI: 405.7 kN
...................SAE: 9.121e+04 lbf
F-15 PW F100-220 Ratio: 3.839
Specific Impulse: 174.1 s
Propulsion Eff.: 0.8268
Thermal Eff.: 0.5644
Overall Eff.: 0.4666
TSFC: 0.01757 kg/kN-s
Thrust per Unit Airflow: 0.572 kN-s/kg
Diffuser To Nozzle Transit Time: 0.002058 s
Fuel Fraction: 0.01005
Fuel-Air Equivalence Ratio: 0.3447 Lean
Burn Time per Unit Fuel Tank Vol.: 9.82 s/m^3
Air Flow: 709.3 kg/s
Fuel Flow: 7.129 kg/s
Total Mass Flow: 716.5 kg/s
----------------------------------------------------------
MECHANICAL COEFFICIENTS:
Diffuser Recovery: 0.8355
Combustor Recovery: 0.5433
Nozzle Recovery: 0.6724
Total Recovery: 0.3053
Exh. Condition @ Design Altitude: UExpand
Pe/Pa: 3.412
----------------------------------------------------------
THERMAL/THERMODYNAMIC COEFFICIENTS:
Diffuser Adiabatic Eff.: 0.9243
Combustor Adiabatic Eff.: 1
Nozzle Adiabatic Eff.: 0.9127
Diffuser Avg. cp: 1109 J/kg-K
gam: 1.352
Combustor Avg. cp: 1191 J/kg-K
gam: 1.321
Nozzle Avg. cp: 1136 J/kg-K
gam: 1.342
Entropic Power Lost.: 6.744e+05 kW
Avg. Available Power.: 7.921e+05 kW
----------------------------------------------------------
23
PERSPECTIVE:
Actual speed-over-land: 0.9131 mi/s
Transit Time - New York to LA: 44.68 minutes
Circumnavigate Earth about Equator: 7.576 hours
The engine is about the size of a large office desk with a large nozzle at the end. The
engine developed 405.7 kN (91,200 lbf) of thrust. In comparison to an F-15 Eagle fighter jet, this
engine produces almost 4 times as much thrust. The specific impulse of 174.1 s is small and
unexpected. Specific impulse for a scramjet is maximum in a full combustion, no dissociation
model. Impulse decreases in equilibrium dissociation models, and decreases even further in non-
equilibrium dissociation models. The specific impulse for this engine was projected to be in the
1000 – 2000 second range.
Propulsion efficiency of 0.8268 is realized. This, coupled with a thermal efficiency
0.5644, results in an overall efficiency of 0.4666. This is near the range expected due to
expectation of the large pressure recovery drop across the combustor in-flight.
One control volume of air spends only 2 milliseconds inside the engine. While this is on
the order of time for a complete reaction to occur, it is highly desirable to refine the combustion
model to better portray real-world effects in the combustion chamber.
The engine utilizes almost 10 seconds of burn time per cubic meter of stored liquid
hydrogen. Engine operation time may not be very high, especially in small hypersonic vehicles.
Fuel mass flow is ~7 kg/s; this is a large amount of fuel in order to create the temperature change
required to fully combust the flow and expand the flow optimally through the nozzle. For a 2
cubic meter fuel tank, only 20 seconds of burn time will be available, and the scramjet will only
propel itself (at constant speed) about 18 miles during that 20 second time lapse.
The flow is underexpanded, and total recovery of 0.3053 is realized with the largest drop
occurring in the combustion chamber. The exhaust pressure is 3.412 times the ambient pressure;
expansion fans will form at the nozzle exit and some mechanical losses may occur there.
Fuel efficiency appears to be an opportunity for improvement here. Utilizing the
maximum amount of space in a small vehicle is another opportunity. Large vehicles generally
are not considered due to large drag coefficients, tendency of boundary layer to separate along
control surfaces at supersonic flow speeds (turbulent flow losses and drag), ionization and
dissociation of air surrounding the vehicle, and other considerations.
24
The following velocity, pressure, and temperature profiles were obtained (vertical lines represent
distinction between diffuser, combustion chamber section 1, combustion chamber section 2,
nozzle section 1, and nozzle section 2):
Figure 4. Velocity, temperature, and pressure profile from SCRAMJET.m output.
The minimum Mach number allowed in the model was 1.05. The average static
temperature throughout the engine is near 1000 K, well above the auto ignition temperature for
hydrogen fuel. The pressure is maximum at the entrance to the combustor at about 1 MPa (~10
atm), and then expands and remains fairly constant throughout the engine length up to the
nozzle. The total pressure decreases significantly in the combustion chamber while near-total
recovery occurs in section 1 of the nozzle before dropping yet again. In all, a total recovery of
0.3053 is realized.
25
Figure 5. Exergy/Entropy analysis of flow through engine at M = 5.
Entropy behaves as expected – only increasing or remaining constant throughout the
length of the engine. Exergy is destroyed at the rate of entropy gained with the exception of the
addition of heat which adds exergy to the flow, but at the cost of a high entropy differential. The
behavior is near isentropic at the end of combustion chamber section 2 and nozzle section 1.
An adiabatic efficiency of 0.9243 is realized in the diffuser, and the nozzle adiabatic
efficiency is 0.9127. The specific heats and specific heat ratios remained close to constant, which
serves to validate the assumption that the designer may be able to hold the variables cp and γ
constant without much loss of accuracy in the model. The total power lost to entropy is on the
order of 67 MW. It is obvious there is a tremendous energy source in the scramjet, yet it comes
at high waste in the energy budget. Available power on the exergy side appears in the range of 1-
1.25 MJ/kg (or around ~700 MW if flow speed is factored in!). How could that flow power be
tapped to drive onboard systems?
26
Figure 6. Estimated operational range; general conditions
Figure 6 is shown here with potential ranges, in kilometers, that the scramjet may be
capable of with general lift-drag ratios. The circumference of Earth is 24,901.55 miles
(40,075.16 km), so at high lift-drag (if this were possible) a scramjet may be able to power a
vehicle nearly twice around the earth at high mass ratio and lift-drag ratio.
27
Figure 7. Estimated range at high-drag conditions.
These curves are more realistic as to the range capabilities of the scramjet engine as the
vehicle should be assumed to have very high drag, even at altitude. However, considering the
craft is moving at approximately 1.5 km/s, a target at a range of 454 km will be attained in about
5 minutes (the equivalent of flying from Destin, FL to New Orleans, LA).
28
5.0 CONCLUSIONS
In conclusion, a scramjet engine design was undertaken using the generalized quasi-1D
flow scheme with complete combustion. A design was achieved similar to other designs
currently under study. MATLAB programs were developed to study the mechanical and
thermodynamic properties of fuel-air flow through the scramjet with success, albeit utilizing
complete combustion criteria – a model that may not be valid for most scramjet applications.
A gas non-equilibrium dissociation model was created but was not able to be
implemented with success prior to project due date. The primary purpose of studying the non-
equilibrium dissociation model was to account for thermal flow losses, and, possibly, to aid in
cooling the flow to lessen material burden in the engine (designing for dissociation as a cooling
measure).
The program utilized a predictor-corrector method with a fourth-order tolerance and
third-order error resulting in good results at low computation cost and high stability. It would be
desirable to apply multiple mesh implicit techniques, and even to apply high-order turbulent
equations (i.e. from a CFD model) to analyze the flow.
Scramjet technology development is required before any more advances can be made in
the field of supersonic/hypersonic propulsion. Materials that can handle extreme temperatures
and pressures require further development to make any reusable scramjet design possible.
Reliability/Maintainability cannot be analyzed until there is data from several successful test
flights where instrumentation and structure is recovered and studied.
29
REFERENCES
[1] J. D. Anderson, Modern Compressible Flow (With Historical Perspective), Third ed., New
York, NY: The McGraw-Hill Companies, Inc., 2003.
[2] K. N. Roberts, Analysis and Design of a Hypersonic Scramjet Engine with a Starting Mach
Number of 4.00, Arlington, Texas: The University of Texas at Arlington, 2008.
[3] L. E. Malvern, Introduction to the Mechanics of a Continuous Medium, Upper Saddle
River, NJ: Prentice-Hall, Inc., 1969.
[4] "NIST Webbook," National Institute of Standards and Technology, 2011. [Online].
Available: http://webbook.nist.gov/chemistry/. [Accessed 29 November 2014].
[5] E. Washburn, "International Critical Tables of Numerical Data, Physics, Chemistry, and
Technology," 1926-1930:2003. [Online]. Available:
http://app.knovel.com/hotlink/toc/id:kpICTNDPC4/international-critical/international-
critical. [Accessed 21 February 2015].
[6] P. G. Hill and C. R. Peterson, Mechanics and Thermodynamics of Propulsion, Second ed.,
Reading, Massachusetts: Addison-Wesley Publishing Co., 1992.
[7] A. Ghanbari, F. Farshad and H. H. Rieke, "Newly Developed Friction Factor Correlation
For Pipe Flow and Flow Assurance," Journal of Chemical Engineering and Materials
Science, Laguna Niguel, 2011.
[8] P. &. Whitney, "Pratt & Whitney F-100 Engine Fact Sheet," Pratt & Whitney Corporation,
2015. [Online]. Available: http://www.pratt-whitney.com/F100_Engine. [Accessed 27 April
2015].
[9] S. Javoy, V. Naudet, S. Abid and C. Paillard, "Elementary Reaction Kinetics Studies of
Interest in H2 Supersonic Combustion Chemistry," Experimental Thermal and Fluid
Science, no. 27 (2003) 371-377, p. 7, 9 July 2002.
[10] M. M. Mateu, "Study of an Air-Breathing Engine For Hypersonic Flight," Catalunya, 2013.
[11] "MatWeb," MatWeb, LLC., 2015. [Online]. Available: www.matweb.com. [Accessed 27
April 2015].
[12] A. R. Staff, "Equations, Tables, and Charts For Compressible Flow," National Advisory
Committee For Aeronautics, Moffett Field, 1953.
30
[13] H. Ran and D. Mavris, "Preliminary Design of a 2D Supersonic Inlet to Maximize Total
Pressure Recovery," American Institute of Aeronautics and Astronautics, Atlanta, 2005.
31
APPENDIX A – Calculation of Atmospheric Conditions by Altitude Above Sea Level
It is useful to calculate the ambient pressure, temperature, and density of air according to
altitude. The International Civil Aviation Organization Standard Atmosphere Manual [6] lists the
measured ambient conditions against geopotential (altitude) as follows:
Table 6. Ambient conditions according to altitude
Altitude
Above Sea Level Temperature Pressure Density
h T P ρ
(m) (K) (Pa) (kg/m3)
0 288.150 1.0133E+05 1.2250E+00
1000 281.651 8.9876E+04 1.1117E+00
2000 275.154 7.9501E+04 1.0066E+00
3000 268.659 7.0121E+04 9.0925E-01
4000 262.166 6.1660E+04 8.1935E-01
5000 255.676 5.4048E+04 7.3643E-01
6000 249.187 4.7217E+04 6.6011E-01
7000 242.700 4.1105E+04 5.9002E-01
8000 236.215 3.5651E+04 5.2579E-01
9000 229.733 3.0800E+04 4.6706E-01
10000 223.252 2.6500E+04 4.1351E-01
11000 216.774 2.2700E+04 3.6480E-01
12000 216.650 1.9399E+04 3.1194E-01
13000 216.650 1.4170E+04 2.6660E-01
14000 216.650 1.4170E+04 2.2786E-01
15000 216.650 1.2112E+04 1.9475E-01
16000 216.650 1.0353E+04 1.6647E-01
17000 216.650 8.8496E+03 1.4230E-01
18000 216.650 7.5652E+03 1.2165E-01
19000 216.650 6.4674E+03 1.0400E-01
20000 216.650 5.5293E+03 8.8910E-02
21000 217.581 4.7274E+03 7.5715E-02
22000 218.574 4.0420E+03 6.4510E-02
23000 219.567 3.4562E+03 5.5006E-02
24000 220.560 2.9554E+03 4.6938E-02
25000 221.552 2.6077E+03 4.0084E-02
26000 222.544 2.1632E+03 3.4257E-02
27000 223.536 1.8555E+03 2.9298E-02
28000 224.527 1.5949E+03 2.5076E-02
29000 225.518 1.3737E+03 2.1478E-02
30000 226.509 1.1855E+03 1.8410E-02
It is advantageous to have this data readily available in the form of a continuous,
polynomial equation derived from standard regression methods. The data points above were
assembled into sixth-order polynomials using Microsoft Excel with the goal of minimizing error
from tabulated data, obtaining a regression coefficient approximately equivalent to unity, and
minimizing any existing outliers.
The following general equation is used for sixth-order polynomials:
32
7
1
6
2
5
3
4
4
3
5
2
6
1 chchchchchchch (69)
For the data in Table 6, the following (truncated) coefficients are derived:
Table 7. Pressure, Temperature, and Density: Sixth-order polynomial coefficients
ϕ c1 c2 c3 c4 c5 c6 c7 R2
T -6.7926E-25 1.0929E-19 -6.0442E-15 1.4432E-10 -1.2554E-6 -3.0382E-3 2.8673E+2 0.995919
P 3.2529E-22 -2.6320E-17 8.4963E-13 -2.0738E-8 5.9261E-4 -1.1971E+1 1.0127E+5 0.999788
ρ 1.1142E-26 -1.0161E-21 3.4458E-17 -5.7177E-13 7.3275E-9 -1.2355E-4 1.2268E+00 0.999597
Figure 8. Temperature and Pressure vs. Altitude Above Sea Level
0.0000E+00
2.0000E+04
4.0000E+04
6.0000E+04
8.0000E+04
1.0000E+05
1.2000E+05
0.000
50.000
100.000
150.000
200.000
250.000
300.000
350.000
0 5000 10000 15000 20000 25000 30000 35000
Pre
ssu
re (
Pa)
Tem
pe
ratu
re (
K)
Altitude Above Sea Level (m)
Pressure and Temperature vs. Altitude
Temperature vs. Altitude Pressure vs. Altitude
Poly. (Temperature vs. Altitude) Poly. (Pressure vs. Altitude)
33
Figure 9. Density vs. Altitude Above Sea Level
Let Tm, Pm, and ρm designate the measured values of temperature, pressure, and density,
respectively, and Tc, Pc, and ρc represent the polynomial calculated values. There will be another
quantity of density, ρmc. This density is calculated from the Tm, Pm values using the Ideal Gas
Law Equation of State, stated here in its explicit form for finding density:
m
m
mcT
PM
R (70)
where M is the molar mass of air (28.97 kg/kmol), and R is the universal gas constant (8314
J/kmol·K). The percent difference shall be measured as:
m
cm
100var (71)
where ϕ is the function of pressure, temperature, or density. The results are tabulated in Table 8
below:
y = 1.11423324E-26x6 - 1.01608476E-21x5 + 3.44581931E-17x4 - 5.71772739E-13x3 + 7.32748527E-09x2 - 1.23549329E-04x + 1.22675810E+00
R² = 9.99597335E-01
0.0000E+00
2.0000E-01
4.0000E-01
6.0000E-01
8.0000E-01
1.0000E+00
1.2000E+00
1.4000E+00
0 5000 10000 15000 20000 25000 30000 35000
Den
sit
y (
kg
/m3)
Altitude Above Sea Level (m)
Density vs. Altitude
Density vs Altitude Poly. (Density vs Altitude)
34
Table 8. Variance of polynomial calculations vs. altitude
h var(T) var(P) var(ρmc) var(ρc)
(m) (%) (%) (%) (%)
0 0.49% 0.05% -0.02% 0.14%
1000 -0.33% 0.00% -0.02% -0.15%
2000 -0.56% -0.06% -0.02% -0.17%
3000 -0.41% -0.10% -0.02% -0.01%
4000 -0.05% -0.12% -0.02% 0.21%
5000 0.36% -0.08% -0.02% 0.38%
6000 0.69% 0.02% -0.02% 0.44%
7000 0.83% 0.18% -0.02% 0.30%
8000 0.68% 0.39% -0.02% -0.09%
9000 0.17% 0.63% -0.02% -0.76%
10000 -0.75% 0.86% -0.02% -1.76%
11000 -2.13% 1.02% -0.02% -3.08%
12000 -0.95% 1.25% -0.02% -1.85%
13000 -0.07% -15.02% 14.52% -1.19%
14000 0.48% 2.24% -0.02% -1.06%
15000 0.75% 2.74% -0.03% -1.30%
16000 0.78% 3.05% -0.03% -1.77%
17000 0.64% 3.03% -0.02% -2.24%
18000 0.36% 2.55% -0.02% -2.49%
19000 0.00% 1.57% -0.02% -2.31%
20000 -0.41% 0.12% -0.02% -1.57%
21000 -0.39% -1.64% 0.01% 0.06%
22000 -0.34% -3.39% 0.11% 1.91%
23000 -0.25% -4.67% 0.29% 3.52%
24000 -0.14% -4.88% 0.53% 4.31%
25000 0.00% -0.29% -2.32% 3.60%
26000 0.13% -0.12% 1.13% 0.71%
27000 0.23% 4.73% 1.28% -4.57%
28000 0.24% 8.79% 1.29% -10.49%
29000 0.10% 6.75% 1.18% -9.83%
30000 -0.26% -11.74% 0.94% 8.81%
The average deviation from measured values was between 0 and 1% across each variable.
The regression coefficients are nearly unity. With the exception of a significant pressure
deviation at 13000 meters, the regression fit is nearly exact with known data.
Given the favorable outcome of the statistical analysis, these polynomial equations can be
considered useful when performing computational analysis according to altitude above sea level.
35
APPENDIX B – Specific Heat Capacity of Dry Air vs. Temperature
The specific heat capacity of dry air at altitude (hence, directly related to temperature via
the calculations in APPENDIX A – Calculation of Atmospheric Conditions by Altitude Above
Sea Level) is of concern as it will relate some thermodynamic potential by altitude. This may
play an important part in the design of the scramjet engine.
The specific heat capacity at constant pressure has been tabulated in Table 10 below. The
gas constant, R, is taken to be 286.9 J/kgK, and the specific heat capacity at constant volume is
calculated using the following relationship:
ccR p (72)
where the ratio of specific heats is then defined as:
Rc
c
c
c
p
pp
(73)
Using these relationships and the data in Table 10 the following coefficients can be
matched to a sixth order polynomial:
Table 9. Specific heat capacity vs. temperature up to T = 2500 K
ϕ c1 c2 c3 c4 c5 c6 c7 R2
cp -2.4895E-17 1.6464E-13 -3.4218E-10 1.1875E-7 3.3E-4 -1.1565E-1 1.0085E+3 0.999489
This equation will assist in analytical solution-finding of atmospheric conditions when
programmed into script files in MATLAB.
36
Table 10. Specific heat at constant pressure vs. temperature.
Temperature
(K)
Specific
Heat
(J/kgK) Temperature
(K)
Specific
Heat
(J/kgK) Temperature
(K)
Specific
Heat
(J/kgK)
10 1004.4082 430 1016.9744 1050 1149.6083
20 1002.4573 440 1018.4663 1100 1158.2440
30 1002.0269 450 1020.0730 1150 1166.3346
40 1001.7974 460 1021.7370 1200 1173.9087
50 1001.7114 470 1023.4584 1250 1181.0525
60 1001.6827 480 1025.2372 1300 1187.7086
70 1001.6827 490 1027.0733 1350 1193.9344
80 1001.6540 500 1028.9669 1400 1199.8158
90 1001.6540 510 1030.9178 1450 1205.3243
100 1001.6540 520 1032.9261 1500 1210.5172
110 1001.6827 530 1034.9918 1550 1215.4232
120 1001.6827 540 1037.1148 1600 1220.0423
130 1001.6827 550 1039.2666 1650 1224.4318
140 1001.6827 560 1041.4470 1700 1228.5919
150 1001.7114 570 1043.6561 1750 1232.5798
160 1001.7400 580 1045.9226 1800 1236.3382
170 1001.7400 590 1048.1892 1850 1239.9244
180 1001.7687 600 1050.4844 1900 1243.3385
190 1001.8261 610 1052.8082 1950 1246.6379
200 1001.9122 620 1055.1608 2000 1249.7651
210 1001.9696 630 1057.5134 2050 1252.7775
220 1002.0556 640 1059.8947 2100 1255.6752
230 1002.1991 650 1062.3046 2150 1258.4582
240 1002.3425 660 1064.7146 2200 1261.1550
250 1002.5721 670 1067.1246 2250 1263.7371
260 1002.8016 680 1069.5345 2300 1266.2332
270 1003.0885 690 1071.9445 2350 1268.6431
280 1003.4328 700 1074.3544 2400 1270.9957
290 1003.8344 710 1076.7644 2450 1273.2622
300 1004.2935 720 1079.1457 2500 1275.4426
310 1004.8386 730 1081.5556 2550 1277.5657
320 1005.4124 740 1083.9656 2600 1279.6314
330 1006.1009 750 1086.3469 2650 1281.6397
340 1006.8182 760 1088.6994 2700 1283.5906
350 1007.6502 770 1091.0807 2750 1285.5128
360 1008.5396 780 1093.4333 2800 1287.3490
370 1009.4863 790 1095.7859 2850 1289.1278
380 1010.5766 800 1098.1098 2900 1290.8779
390 1011.6955 850 1109.4423 2950 1292.5706
400 1012.9005 900 1120.3158 3000 1294.1772
410 1014.1628 950 1130.6442 1050 1149.6083
420 1015.5399 1000 1140.4275 1100 1158.2440
37
APPENDIX C – SCRAMJET.m Code/MATLAB
*** All codes aren’t given here – just the script that is used to calculate engine characteristics
throughout the system; please see attached data CD for full list of programs used. All programs
were designed by the author Adam J. Resler to solve the problems in consideration.
%% scramjet.m % This script takes user input and applies mechanical and thermal % principles primarily geared towards design of a Supersonic Combustion % RAMJET (SCRAMJET) engine. clear clc format shortg
% Open DESIGN PARAMETERS param
% Calculate INLET BOUNDARY CONDITIONS shockcalc
%% INLET DIFFUSER PARAMETERS % Flow Geometry y0 = 0.3333; % 0.3333 DEFAULT VALUE z0 = 1; % 1.0 DEFAULT VALUE L_d = 0.5; b1 = -0.18; b2 = 0; c1 = 0; c2 = 0; A(nsh+1) = y0*z0; Pw(nsh+1) = 2*y0 + 2*z0; Dh(nsh+1) = A(nsh+1)/Pw(nsh+1); dx_d = 0.001; x_d = [0:dx_d:L_d]'; lsteps = length(x_d)-1;
% Capture INITIAL TOTAL PRESSURE [cp hspec hmix smix wdot dYidx MWmix dMWmix sumhidYdx Rmix... cvmix gammamix sss Kpr] = gasinfo(Tst(nsh+1), Pst(nsh+1),... rhost(nsh+1), ux(nsh+1), A(nsh+1)); t0i = T0T(nsh+1)*Tst(nsh+1); p0i = P0P(nsh+1)*Pst(nsh+1); uin = M(nsh+1)*sqrt(1.4*Rair*Tst(nsh+1));
% Material Data surfaceroughness = 0.001;
% Stagnation Temperature Data d1 = 0; d2 = 0;
% Initialize variables y(1,1) = A(nsh+1); % Area, m^2 y(1,2) = t0i; % Stagnation temperature, K
38
y(1,3) = M(nsh+1)^2; % Mach number y(1,4) = p0i; % Stagnation pressure, Pa y(1,5) = 0; % Entropy, J/kg-K y(1,6) = Tst(nsh+1); % Speed of sound, m/s y(1,7) = Pst(nsh+1); % Fluid velocity, m/s y(1,8) = sos(nsh+1); % Static pressure, Pa y(1,9) = ux(nsh+1); % Static temperature, K y(1,10) = rhost(nsh+1); % Fluid density, kg/m^3 y(1,11) = Pw(nsh+1); % Wetted perimeter, m y(1,12) = Dh(nsh+1); % Hydraulic diameter, m ex(1) = cp*(y(1,6)-298.15)+0.5*y(1,9)^2-298.15*(smix-6739.9);
% Predictor-Corrector (PE(CE)) Loop for i = 1:lsteps [cp(i) hspec hmix smix wdot dYidx MWmix dMWmix sumhidYdx Rmix cv... gam(i) sos Kpr] = gasinfo(y(i,6),y(i,7),y(i,10),y(i,9),y(i,1)); mu = muair(y(i,6)); Re = Reynolds(y(i,10),y(i,9),y(i,12),mu); relrough = surfaceroughness/y(i,12); cf = colebrook(Re, relrough); dy(i,1) = (b1+2.*b2.*x_d(i,1))*(z0+c1.*x_d(i,1)+... c2.*x_d(i,1)^2)+(c1+2.*c2.*x_d(i,1))*(y0+... b1.*x_d(i,1)+b2.*x_d(i,1)^2); dy(i,2) = d1+2.*d2.*x_d(i,1); dy(i,3) = y(i,3)*(1+0.5*(gam(i)-1))*y(i,3)*(1/(1-y(i,3)))*... ((-2/y(i,1))*dy(i,1)+(1+gam(i)*y(i,3))*(1/y(i,2))*dy(i,2)+... 4*gam(i)*y(i,3)*cf/y(i,12)); dy(i,4) = -y(i,4)*(0.5*gam(i)*y(i,3))*(dy(i,2)/y(i,2)+4*cf/y(i,12)); dy(i,5:12) = 0; yi(i,:) = y(i,:)+dx_d*dy(i,:); eps = 1; while max(eps) >= epsg dyi(i,1) = (b1 + 2.*b2.*x_d(i+1,1))*(z0+c1.*x_d(i+1,1)+... c2.*x_d(i+1,1)^2)+(c1+2.*c2.*x_d(i+1,1))*(y0+... b1.*x_d(i+1,1)+b2.*x_d(i+1,1)^2); dyi(i,2) = d1+2.*d2.*x_d(i+1,1); dyi(i,3) = yi(i,3)*(1+0.5*(gam(i)-1))*yi(i,3)*(1/(1-yi(i,3)))*... ((-2/yi(i,1))*dyi(i,1)+(1+gam(i)*yi(i,3))*(1/yi(i,2))*... dyi(i,2)+4*gam(i)*yi(i,3)*cf/yi(i,12)); dyi(i,4) = -yi(i,4)*(0.5*gam(i)*yi(i,3))*(dyi(i,2)/yi(i,2)+... 4*cf/yi(i,12)); dyi(i,5:12) = 0; y(i+1,:) = y(i,:)+0.5*dx_d*(dy(i,:)+dyi(i,:)); eps = abs(y(i+1,:)-yi(i,:)); if max(eps) >= epsg yi(i,:) = y(i+1,:); end end y(i+1,5) = y(i,5)+cp(i)*log(y(i+1,2)/y(i,2))-Rair*log(y(i+1,4)/y(i,4)); y(i+1,6) = y(1,6)*(y(i+1,2)/y(1,2))*((1+0.5*(gam(i)-1)*y(1,3))/... (1+0.5*(gam(i)-1)*y(i+1,3))); y(i+1,7) = y(1,7)*(y(1,1)/y(i+1,1))*sqrt(y(1,3)/y(i+1,3))*... sqrt(y(i+1,6)/y(1,6)); y(i+1,8) = sqrt(gam(i)*Rair*y(i+1,6)); y(i+1,9) = sqrt(y(i+1,3))*y(i+1,8); y(i+1,10) = y(i,10)*(y(i,9)/y(i+1,9))*(y(i,1)/y(i+1,1)); y(i+1,11) = 2*(z0+c1.*x_d(i+1,1)+c2.*x_d(i+1,1)^2)+2*(y0+...
39
b1.*x_d(i+1,1)+b2.*x_d(i+1,1)^2); y(i+1,12) = y(i+1,1)/y(i+1,11); ex(i+1) = ex(i)+cp(i)*(y(i+1,6)-y(i,6))+0.5*(y(i+1,9)^2-... y(i,9)^2)-298.15*(y(i+1,5)-y(i,5)); shi(i+1) = sumhidYdx; if y(i+1,3) <= 1.1025; break; end end % Post-processing i = i+1; x_d = x_d(1:i,1); y_d = y(1:i,:); L_d = length(x_d)/1000; xnet = x_d; ynet = y_d; ex1 = ex; shi1 = shi; ni1 = i;
r_d = y_d(i,4)/y_d(1,4); cp(i) = cp(i-1); cpcap1 = cp(1:i); cp_d = mean(cp); gam_d = mean(gam); clear y dy yi dyi ex cp shi
%% COMBUSTOR SECTION 1 % Flow Geometry L_c1 = 0.175; L_c2 = 0.5; L_com = L_c1+L_c2;
b1 = tand(45); b2 = 0; c1 = 0; c2 = 0; dx_c1 = 0.001; x_c1 = [0:dx_c1:L_c1]'; lsteps = length(x_c1)-1;
% Material Data surfaceroughness = 0.001;
% Stagnation Temperature Data d1 = 2*(t0m-t0i)/L_com; d2 = -d1/(2*L_com);
y(1,:) = ynet(i,:); ex(1) = ex1(length(x_d)); shi(1) = shi1(length(x_d));
for i = 1:lsteps [cp(i) hspec hmix smix wdot dYidx MWmix dMWmix sumhidYdx Rmix cv... gam(i) sos Kpr] = gasinfo(y(i,6),y(i,7),y(i,10),y(i,9),y(i,1)); mu = muair(y(i,6)); Re = Reynolds(y(i,10),y(i,9),y(i,12),mu);
40
relrough = surfaceroughness/y(i,12); cf = colebrook(Re, relrough); dy(i,1) = (b1+2.*b2.*x_c1(i,1))*(z0+c1.*x_c1(i,1)+... c2.*x_c1(i,1)^2)+(c1+2.*c2.*x_c1(i,1))*(y0+... b1.*x_c1(i,1)+b2.*x_c1(i,1)^2); dy(i,2) = d1+2.*d2.*x_c1(i,1); if y(i,3) >= 0.97 && y(i,3) <= 1.03 num = 8*((2/y(i,1))*(2*c2*(y0+b1.*x_c1(i,1)+b2.*x_c1(i,1).^2)+... 2*b2*(z0+c1.*x_c1(i,1)+c2.*x_c1(i,1).^2)+2*(b1+... 2.*b2.*x_c1(i,1)).*(c1+2.*c2.*x_c1(i,1)))-((2/(y(i,1).^2))*... dy(i,1).^2)-((1+gam(i)).*(2.*d2/y(i,2))-(1/(y(i,2)^2))*... dy(i,2).^2)-(4.*gam(i).*((-cf/(y(i,1).^2)).*(y(i,11).*... dy(i,1)-2.*(b1+c1+2.*(b2+c2).*x_c1(i,1)))))); den = gam(i).^2*(gam(i)+1)*((1/y(i,2)).*dy(i,2)+4*cf/y(i,12)).^2; scriptc = num./den; if scriptc <= -1 dy(i,3) = y(i,3)*((1+0.5*(gam(i)-1))*y(i,3))*(1/(1-y(i,3)))*... ((-2/y(i,1))*dy(i,1)+(1+gam(i)*y(i,3))*(dy(i,2)/y(i,2))+... 4*gam(i)*cf*y(i,3)/y(i,12)); else dy(i,3) = 0.25.*gam(i).*(gam(i)+1).*((1/y(i,2)).*dy(i,2)+... 4.*cf/y(i,12)).*(sqrt(1+scriptc)-1); end else dy(i,3) = y(i,3)*((1+0.5*(gam(i)-1))*y(i,3))*(1/(1-y(i,3)))*... ((-2/y(i,1))*dy(i,1)+(1+gam(i)*y(i,3))*(dy(i,2)/y(i,2))+... 4*gam(i)*cf*y(i,3)/y(i,12)); end dy(i,4) = -y(i,4)*(0.5*gam(i)*y(i,3))*((dy(i,2)/y(i,2))+... (4*cf/y(i,12))); dy(i,5:12) = 0; yi(i,:) = y(i,:)+dx_c1*dy(i,:); eps = 1; while max(eps) >= epsg dyi(i,1) = (b1 + 2.*b2.*x_c1(i+1,1))*(z0+c1.*x_c1(i+1,1)+... c2.*x_c1(i+1,1)^2)+(c1+2.*c2.*x_c1(i+1,1))*(y0+... b1.*x_c1(i+1,1)+b2.*x_c1(i+1,1)^2); dyi(i,2) = d1+2.*d2.*x_c1(i+1,1); if yi(i,3) >= 0.97 && yi(i,3) <= 1.03 num = 8*((2/yi(i,1))*(2*c2*(y0+b1.*x_c1(i+1,1)+... b2.*x_c1(i+1,1).^2)+2*b2*(z0+c1.*x_c1(i+1,1)+... c2.*x_c1(i+1,1).^2)+2*(b1+2.*b2.*x_c1(i+1,1)).*... (c1+2.*c2.*x_c1(i+1,1)))-((2/(yi(i,1).^2))*... dyi(i,1).^2)-((1+gam(i)).*(2.*d2/yi(i,2))-... (1/(yi(i,2)^2))*dyi(i,2).^2)-(4.*gam(i).*... ((-cf/(yi(i,1).^2)).*(yi(i,11).*dyi(i,1)-2.*... (b1+c1+2.*(b2+c2).*x_c1(i+1,1)))))); den = gam(i).^2*(gam(i)+1)*((1/yi(i,2)).*dyi(i,2)+... 4*cf/yi(i,12)).^2; scriptc = num./den; if scriptc <= -1 dyi(i,3) = yi(i,3)*((1+0.5*(gam(i)-1))*yi(i,3))... *(1/(1-yi(i,3)))*((-2/yi(i,1))*dyi(i,1)+... (1+gam(i)*yi(i,3))*(dyi(i,2)/yi(i,2))+... 4*gam(i)*cf*yi(i,3)/yi(i,12)); else dyi(i,3) = 0.25.*gam(i).*(gam(i)+1).*((1/yi(i,2)).*...
41
dyi(i,2)+4.*cf/yi(i,12)).*(sqrt(1+scriptc)-1); end else dyi(i,3) = yi(i,3)*((1+0.5*(gam(i)-1))*yi(i,3))*... (1/(1-yi(i,3)))*((-2/yi(i,1))*dyi(i,1)+(1+gam(i)*... yi(i,3))*(dyi(i,2)/yi(i,2))+4*gam(i)*cf*yi(i,3)/yi(i,12)); end dyi(i,4) = -yi(i,4)*(0.5*gam(i)*yi(i,3))*((dyi(i,2)/yi(i,2))+... (4*cf/yi(i,12))); dyi(i,5:12) = 0; y(i+1,:) = y(i,:)+0.5*dx_c1*(dy(i,:)+dyi(i,:)); eps = abs(y(i+1,:)-yi(i,:)); if max(eps) >= epsg yi(i,:) = y(i+1,:); end end y(i+1,5) = y(i,5)+cp(i)*log(y(i+1,2)/y(i,2))-Rair*log(y(i+1,4)/y(i,4)); y(i+1,6) = y(1,6)*(y(i+1,2)/y(1,2))*((1+0.5*(gam(i)-1)*y(1,3))/... (1+0.5*(gam(i)-1)*y(i+1,3))); y(i+1,7) = y(1,7)*(y(1,1)/y(i+1,1))*sqrt(y(1,3)/y(i+1,3))*... sqrt(y(i+1,6)/y(1,6)); y(i+1,8) = sqrt(gam(i)*Rair*y(i+1,6)); y(i+1,9) = sqrt(y(i+1,3))*y(i+1,8); y(i+1,10) = y(i,10)*(y(i,9)/y(i+1,9))*(y(i,1)/y(i+1,1)); y(i+1,11) = 2*(z0+c1.*x_c1(i+1,1)+c2.*x_c1(i+1,1)^2)+2*(y0+... b1.*x_c1(i+1,1)+b2.*x_c1(i+1,1)^2); y(i+1,12) = y(i+1,1)/y(i+1,11); ex(i+1) = ex(i)+cp(i)*(y(i+1,6)-y(i,6))+0.5*(y(i+1,9)^2-... y(i,9)^2)-298.15*(y(i+1,5)-y(i,5)); shi(i+1) = sumhidYdx; % if y(i+1,3) <= 1.1025 && dyi(i,3) < 0; break; end end % Post-processing i = i+1; x_c1 = x_c1(1:i,1); y_c1 = y(1:i,:); xnet(ni1+1:ni1+i) = x_c1+xnet(ni1,:); ynet(ni1+1:ni1+i,:) = y(1:i,:); ex2 = ex; shi2 = shi; ni2 = i;
r_c1 = y_c1(i,4)/y_c1(1,4); cp(i) = cp(i-1); cpcap2 = cp(1:i); cp_c1 = mean(cp); gam_c1 = mean(gam); clear y dy yi dyi ex cp shi
%% COMBUSTOR SECTION 2 % Flow Geometry b1 = 0.5; b2 = 0; c1 = 0; c2 = 0; dx_c2 = 0.001;
42
x_c2 = [L_c1+dx_c2:dx_c2:L_com]'; lsteps = length(x_c2)-1;
% Material Data surfaceroughness = 0.001;
% Stagnation Temperature Data d1 = 2*(t0m-t0i)/L_com; d2 = -d1/(2*L_com);
y(1,:) = ynet(ni2+ni1,:); ex(1) = ex2(length(ex2)); shi(1) = shi2(length(shi2));
for i = 1:lsteps [cp(i) hspec hmix smix wdot dYidx MWmix dMWmix sumhidYdx Rmix cv... gam(i) sos Kpr] = gasinfo(y(i,6),y(i,7),y(i,10),y(i,9),y(i,1)); mu = muair(y(i,6)); Re = Reynolds(y(i,10),y(i,9),y(i,12),mu); relrough = surfaceroughness/y(i,12); cf = colebrook(Re, relrough); dy(i,1) = (b1+2.*b2.*x_c2(i,1))*(z0+c1.*x_c2(i,1)+... c2.*x_c2(i,1)^2)+(c1+2.*c2.*x_c2(i,1))*(y0+... b1.*x_c2(i,1)+b2.*x_c2(i,1)^2); dy(i,2) = d1+2.*d2.*x_c2(i,1); if y(i,3) >= 0.97 && y(i,3) <= 1.03 num = 8*((2/y(i,1))*(2*c2*(y0+b1.*x_c2(i,1)+b2.*x_c2(i,1).^2)+... 2*b2*(z0+c1.*x_c2(i,1)+c2.*x_c2(i,1).^2)+2*(b1+... 2.*b2.*x_c2(i,1)).*(c1+2.*c2.*x_c2(i,1)))-((2/(y(i,1).^2))*... dy(i,1).^2)-((1+gam(i)).*(2.*d2/y(i,2))-(1/(y(i,2)^2))*... dy(i,2).^2)-(4.*gam(i).*((-cf/(y(i,1).^2)).*(y(i,11).*... dy(i,1)-2.*(b1+c1+2.*(b2+c2).*x_c2(i,1)))))); den = gam(i).^2*(gam(i)+1)*((1/y(i,2)).*dy(i,2)+4*cf/y(i,12)).^2; scriptc = num./den; if scriptc <= -1 dy(i,3) = y(i,3)*((1+0.5*(gam(i)-1))*y(i,3))*(1/(1-y(i,3)))*... ((-2/y(i,1))*dy(i,1)+(1+gam(i)*y(i,3))*(dy(i,2)/y(i,2))+... 4*gam(i)*cf*y(i,3)/y(i,12)); else dy(i,3) = 0.25.*gam(i).*(gam(i)+1).*((1/y(i,2)).*dy(i,2)+... 4.*cf/y(i,12)).*(sqrt(1+scriptc)-1); end else dy(i,3) = y(i,3)*((1+0.5*(gam(i)-1))*y(i,3))*(1/(1-y(i,3)))*... ((-2/y(i,1))*dy(i,1)+(1+gam(i)*y(i,3))*(dy(i,2)/y(i,2))+... 4*gam(i)*cf*y(i,3)/y(i,12)); end dy(i,4) = -y(i,4)*(0.5*gam(i)*y(i,3))*((dy(i,2)/y(i,2))+... (4*cf/y(i,12))); dy(i,5:12) = 0; yi(i,:) = y(i,:)+dx_c1*dy(i,:); eps = 1; while max(eps) >= epsg dyi(i,1) = (b1 + 2.*b2.*x_c2(i+1,1))*(z0+c1.*x_c2(i+1,1)+... c2.*x_c2(i+1,1)^2)+(c1+2.*c2.*x_c2(i+1,1))*(y0+... b1.*x_c2(i+1,1)+b2.*x_c2(i+1,1)^2);
43
dyi(i,2) = d1+2.*d2.*x_c2(i+1,1); if yi(i,3) >= 0.97 && yi(i,3) <= 1.03 num = 8*((2/yi(i,1))*(2*c2*(y0+b1.*x_c2(i+1,1)+... b2.*x_c2(i+1,1).^2)+2*b2*(z0+c1.*x_c2(i+1,1)+... c2.*x_c2(i+1,1).^2)+2*(b1+2.*b2.*x_c2(i+1,1)).*... (c1+2.*c2.*x_c2(i+1,1)))-((2/(yi(i,1).^2))*... dyi(i,1).^2)-((1+gam(i)).*(2.*d2/yi(i,2))-... (1/(yi(i,2)^2))*dyi(i,2).^2)-(4.*gam(i).*... ((-cf/(yi(i,1).^2)).*(yi(i,11).*dyi(i,1)-2.*... (b1+c1+2.*(b2+c2).*x_c2(i+1,1)))))); den = gam(i).^2*(gam(i)+1)*((1/yi(i,2)).*dyi(i,2)+... 4*cf/yi(i,12)).^2; scriptc = num./den; if scriptc <= -1 dyi(i,3) = yi(i,3)*((1+0.5*(gam(i)-1))*yi(i,3))*... (1/(1-yi(i,3)))*((-2/yi(i,1))*dyi(i,1)+... (1+gam(i)*yi(i,3))*(dyi(i,2)/yi(i,2))+... 4*gam(i)*cf*yi(i,3)/yi(i,12)); else dyi(i,3) = 0.25.*gam(i).*(gam(i)+1).*((1/yi(i,2)).*... dyi(i,2)+4.*cf/yi(i,12)).*(sqrt(1+scriptc)-1); end else dyi(i,3) = yi(i,3)*((1+0.5*(gam(i)-1))*yi(i,3))*... (1/(1-yi(i,3)))*((-2/yi(i,1))*dyi(i,1)+(1+gam(i)*... yi(i,3))*(dyi(i,2)/yi(i,2))+4*gam(i)*cf*yi(i,3)/yi(i,12)); end dyi(i,4) = -yi(i,4)*(0.5*gam(i)*yi(i,3))*((dyi(i,2)/yi(i,2))+... (4*cf/yi(i,12))); dyi(i,5:12) = 0; y(i+1,:) = y(i,:)+0.5*dx_c1*(dy(i,:)+dyi(i,:)); eps = abs(y(i+1,:)-yi(i,:)); if max(eps) >= epsg yi(i,:) = y(i+1,:); end end y(i+1,5) = y(i,5)+cp(i)*log(y(i+1,2)/y(i,2))-Rair*log(y(i+1,4)/y(i,4)); y(i+1,6) = y(1,6)*(y(i+1,2)/y(1,2))*((1+0.5*(gam(i)-1)*y(1,3))/... (1+0.5*(gam(i)-1)*y(i+1,3))); y(i+1,7) = y(1,7)*(y(1,1)/y(i+1,1))*sqrt(y(1,3)/y(i+1,3))*... sqrt(y(i+1,6)/y(1,6)); y(i+1,8) = sqrt(gam(i)*Rair*y(i+1,6)); y(i+1,9) = sqrt(y(i+1,3))*y(i+1,8); y(i+1,10) = y(i,10)*(y(i,9)/y(i+1,9))*(y(i,1)/y(i+1,1)); y(i+1,11) = 2*(z0+c1.*x_c2(i+1,1)+c2.*x_c2(i+1,1)^2)+2*(y0+... b1.*x_c2(i+1,1)+b2.*x_c2(i+1,1)^2); y(i+1,12) = y(i+1,1)/y(i+1,11); ex(i+1) = ex(i)+cp(i)*(y(i+1,6)-y(i,6))+0.5*(y(i+1,9)^2-... y(i,9)^2)-298.15*(y(i+1,5)-y(i,5)); shi(i+1) = sumhidYdx; % if y(i+1,3) <= 1.1025 && dyi(i,3) < 0; break; end end i = i+1; x_c2 = x_c2(1:i,1); y_c2 = y(1:i,:); xnet(ni1+ni2+1:ni1+ni2+i) = x_c2+xnet(ni1,:); ynet(ni1+ni2+1:ni1+ni2+i,:) = y(1:i,:);
44
ex3 = ex; shi3 = shi; ni3 = i;
r_c2 = y_c2(i,4)/y_c2(1,4); cp(i) = cp(i-1); cpcap3 = cp(1:i); cp_c2 = mean(cp); gam_c2 = mean(gam); clear y dy yi dyi ex cp shi
%% NOZZLE STAGE 1 % Flow Geometry L_n1 = 0.3333; b1 = tand(-25); b2 = -b1/(2*L_n1); c1 = 0; c2 = 0; dx_n1 = 0.001; x_n1 = [0:dx_n1:L_n1]'; lsteps = length(x_n1)-1;
% Material Data surfaceroughness = 0.001;
% Stagnation Temperature Data d1 = 0; d2 = 0;
y(1,:) = ynet(ni1+ni2+ni3,:); ex(1) = ex3(length(ex3)); shi(1) = shi3(length(shi3));
for i = 1:lsteps [cp(i) hspec hmix smix wdot dYidx MWmix dMWmix sumhidYdx Rmix cv... gam(i) sos Kpr] = gasinfo(y(i,6),y(i,7),y(i,10),y(i,9),y(i,1)); mu = muair(y(i,6)); Re = Reynolds(y(i,10),y(i,9),y(i,12),mu); relrough = surfaceroughness/y(i,12); cf = colebrook(Re, relrough); dy(i,1) = (b1+2.*b2.*x_n1(i,1))*(z0+c1.*x_n1(i,1)+... c2.*x_n1(i,1)^2)+(c1+2.*c2.*x_n1(i,1))*(y0+... b1.*x_n1(i,1)+b2.*x_n1(i,1)^2); dy(i,2) = d1+2.*d2.*x_n1(i,1); if y(i,3) >= 0.97 && y(i,3) <= 1.03 num = 8*((2/y(i,1))*(2*c2*(y0+b1.*x_n1(i,1)+b2.*x_n1(i,1).^2)+... 2*b2*(z0+c1.*x_n1(i,1)+c2.*x_n1(i,1).^2)+2*(b1+... 2.*b2.*x_n1(i,1)).*(c1+2.*c2.*x_n1(i,1)))-((2/(y(i,1).^2))*... dy(i,1).^2)-((1+gam(i)).*(2.*d2/y(i,2))-(1/(y(i,2)^2))*... dy(i,2).^2)-(4.*gam(i).*((-cf/(y(i,1).^2)).*(y(i,11).*... dy(i,1)-2.*(b1+c1+2.*(b2+c2).*x_n1(i,1)))))); den = gam(i).^2*(gam(i)+1)*((1/y(i,2)).*dy(i,2)+4*cf/y(i,12)).^2; scriptc = num./den; if scriptc <= -1 dy(i,3) = y(i,3)*((1+0.5*(gam(i)-1))*y(i,3))*(1/(1-y(i,3)))*... ((-2/y(i,1))*dy(i,1)+(1+gam(i)*y(i,3))*(dy(i,2)/y(i,2))+...
45
4*gam(i)*cf*y(i,3)/y(i,12)); else dy(i,3) = 0.25.*gam(i).*(gam(i)+1).*((1/y(i,2)).*dy(i,2)+... 4.*cf/y(i,12)).*(sqrt(1+scriptc)-1); end else dy(i,3) = y(i,3)*((1+0.5*(gam(i)-1))*y(i,3))*(1/(1-y(i,3)))*... ((-2/y(i,1))*dy(i,1)+(1+gam(i)*y(i,3))*(dy(i,2)/y(i,2))+... 4*gam(i)*cf*y(i,3)/y(i,12)); end dy(i,4) = -y(i,4)*(0.5*gam(i)*y(i,3))*((dy(i,2)/y(i,2))+... (4*cf/y(i,12))); dy(i,5:12) = 0; yi(i,:) = y(i,:)+dx_c1*dy(i,:); eps = 1; while max(eps) >= epsg dyi(i,1) = (b1 + 2.*b2.*x_c2(i+1,1))*(z0+c1.*x_c2(i+1,1)+... c2.*x_c2(i+1,1)^2)+(c1+2.*c2.*x_c2(i+1,1))*(y0+... b1.*x_c2(i+1,1)+b2.*x_c2(i+1,1)^2); dyi(i,2) = d1+2.*d2.*x_c2(i+1,1); if yi(i,3) >= 0.97 && yi(i,3) <= 1.03 num = 8*((2/yi(i,1))*(2*c2*(y0+b1.*x_c2(i+1,1)+... b2.*x_c2(i+1,1).^2)+2*b2*(z0+c1.*x_c2(i+1,1)+... c2.*x_c2(i+1,1).^2)+2*(b1+2.*b2.*x_c2(i+1,1)).*... (c1+2.*c2.*x_c2(i+1,1)))-((2/(yi(i,1).^2))*... dyi(i,1).^2)-((1+gam(i)).*(2.*d2/yi(i,2))-... (1/(yi(i,2)^2))*dyi(i,2).^2)-(4.*gam(i).*... ((-cf/(yi(i,1).^2)).*(yi(i,11).*dyi(i,1)-2.*... (b1+c1+2.*(b2+c2).*x_c2(i+1,1)))))); den = gam(i).^2*(gam(i)+1)*((1/yi(i,2)).*dyi(i,2)+... 4*cf/yi(i,12)).^2; scriptc = num./den; if scriptc <= -1 dyi(i,3) = yi(i,3)*((1+0.5*(gam(i)-1))*yi(i,3))*... (1/(1-yi(i,3)))*((-2/yi(i,1))*dyi(i,1)+... (1+gam(i)*yi(i,3))*(dyi(i,2)/yi(i,2))+... 4*gam(i)*cf*yi(i,3)/yi(i,12)); else dyi(i,3) = 0.25.*gam(i).*(gam(i)+1).*((1/yi(i,2)).*... dyi(i,2)+4.*cf/yi(i,12)).*(sqrt(1+scriptc)-1); end else dyi(i,3) = yi(i,3)*((1+0.5*(gam(i)-1))*yi(i,3))*... (1/(1-yi(i,3)))*((-2/yi(i,1))*dyi(i,1)+... (1+gam(i)*yi(i,3))*(dyi(i,2)/yi(i,2))+... 4*gam(i)*cf*yi(i,3)/yi(i,12)); end dyi(i,4) = -yi(i,4)*(0.5*gam(i)*yi(i,3))*((dyi(i,2)/yi(i,2))+... (4*cf/yi(i,12))); dyi(i,5:12) = 0; y(i+1,:) = y(i,:)+0.5*dx_c1*(dy(i,:)+dyi(i,:)); eps = abs(y(i+1,:)-yi(i,:)); if max(eps) >= epsg yi(i,:) = y(i+1,:); end end y(i+1,5) = y(i,5)+cp(i)*log(y(i+1,2)/y(i,2))-Rair*log(y(i+1,4)/y(i,4));
46
y(i+1,6) = y(1,6)*(y(i+1,2)/y(1,2))*((1+0.5*(gam(i)-1)*y(1,3))/... (1+0.5*(gam(i)-1)*y(i+1,3))); y(i+1,7) = y(1,7)*(y(1,1)/y(i+1,1))*sqrt(y(1,3)/y(i+1,3))*... sqrt(y(i+1,6)/y(1,6)); y(i+1,8) = sqrt(gam(i)*Rair*y(i+1,6)); y(i+1,9) = sqrt(y(i+1,3))*y(i+1,8); y(i+1,10) = y(i,10)*(y(i,9)/y(i+1,9))*(y(i,1)/y(i+1,1)); y(i+1,11) = 2*(z0+c1.*x_n1(i+1,1)+c2.*x_n1(i+1,1)^2)+2*(y0+... b1.*x_n1(i+1,1)+b2.*x_n1(i+1,1)^2); y(i+1,12) = y(i+1,1)/y(i+1,11); ex(i+1) = ex(i)+cp(i)*(y(i+1,6)-y(i,6))+0.5*(y(i+1,9)^2-... y(i,9)^2)-298.15*(y(i+1,5)-y(i,5)); shi(i+1) = sumhidYdx; % if y(i+1,3) <= 1.1025 && dyi(i,3) < 0; break; end end i = i+1; x_n1 = x_n1(1:i,1); y_n1 = y(1:i,:); xnet(ni1+ni2+ni3+1:ni1+ni2+ni3+i) = x_n1+L_c2+L_c1+xnet(ni1,:); ynet(ni1+ni2+ni3+1:ni1+ni2+ni3+i,:) = y(1:i,:); ex4 = ex; shi4 = shi; ni4 = i;
r_n1 = y_n1(i,4)/y_n1(1,4); cp(i) = cp(i-1); cpcap4 = cp(1:i); cp_n1 = mean(cp); gam_n1 = mean(gam); clear y dy yi dyi ex cp shi
%% NOZZLE STAGE 2 % Flow Geometry L_n2 = 0.842; b1 = tand(60); b2 = -0.43301;%-b1/(2*L_n2); c1 = 0; c2 = 0; dx_n2 = 0.001; x_n2 = [0:dx_n2:L_n2]'; lsteps = length(x_n2)-1;
% Material Data surfaceroughness = 0.001;
% Stagnation Temperature Data d1 = 0; d2 = 0;
y(1,:) = ynet(ni1+ni2+ni3+ni4,:); ex(1) = ex4(length(ex4)); shi(1) = shi4(length(shi4));
for i = 1:lsteps [cp(i) hspec hmix smix wdot dYidx MWmix dMWmix sumhidYdx Rmix cv... gam(i) sos Kpr] = gasinfo(y(i,6),y(i,7),y(i,10),y(i,9),y(i,1));
47
mu = muair(y(i,6)); Re = Reynolds(y(i,10),y(i,9),y(i,12),mu); relrough = surfaceroughness/y(i,12); cf = colebrook(Re, relrough); dy(i,1) = (b1+2.*b2.*x_n2(i,1))*(z0+c1.*x_n2(i,1)+... c2.*x_n2(i,1)^2)+(c1+2.*c2.*x_n2(i,1))*(y0+... b1.*x_n2(i,1)+b2.*x_n2(i,1)^2); dy(i,2) = d1+2.*d2.*x_n2(i,1); if y(i,3) >= 0.97 && y(i,3) <= 1.03 num = 8*((2/y(i,1))*(2*c2*(y0+b1.*x_n2(i,1)+b2.*x_n2(i,1).^2)+... 2*b2*(z0+c1.*x_n2(i,1)+c2.*x_n2(i,1).^2)+2*(b1+... 2.*b2.*x_n2(i,1)).*(c1+2.*c2.*x_n2(i,1)))-((2/(y(i,1).^2))*... dy(i,1).^2)-((1+gam(i)).*(2.*d2/y(i,2))-(1/(y(i,2)^2))*... dy(i,2).^2)-(4.*gam(i).*((-cf/(y(i,1).^2)).*(y(i,11).*... dy(i,1)-2.*(b1+c1+2.*(b2+c2).*x_n2(i,1)))))); den = gam(i).^2*(gam(i)+1)*((1/y(i,2)).*dy(i,2)+4*cf/y(i,12)).^2; scriptc = num./den; if scriptc <= -1 dy(i,3) = y(i,3)*((1+0.5*(gam(i)-1))*y(i,3))*(1/(1-y(i,3)))*... ((-2/y(i,1))*dy(i,1)+(1+gam(i)*y(i,3))*(dy(i,2)/y(i,2))+... 4*gam(i)*cf*y(i,3)/y(i,12)); else dy(i,3) = 0.25.*gam(i).*(gam(i)+1).*((1/y(i,2)).*dy(i,2)+... 4.*cf/y(i,12)).*(sqrt(1+scriptc)-1); end else dy(i,3) = y(i,3)*((1+0.5*(gam(i)-1))*y(i,3))*(1/(1-y(i,3)))*... ((-2/y(i,1))*dy(i,1)+(1+gam(i)*y(i,3))*(dy(i,2)/y(i,2))+... 4*gam(i)*cf*y(i,3)/y(i,12)); end dy(i,4) = -y(i,4)*(0.5*gam(i)*y(i,3))*((dy(i,2)/y(i,2))+... (4*cf/y(i,12))); dy(i,5:12) = 0; yi(i,:) = y(i,:)+dx_c1*dy(i,:); eps = 1; while max(eps) >= epsg dyi(i,1) = (b1 + 2.*b2.*x_n2(i+1,1))*(z0+c1.*x_n2(i+1,1)+... c2.*x_n2(i+1,1)^2)+(c1+2.*c2.*x_n2(i+1,1))*(y0+... b1.*x_n2(i+1,1)+b2.*x_n2(i+1,1)^2); dyi(i,2) = d1+2.*d2.*x_n2(i+1,1); if yi(i,3) >= 0.97 && yi(i,3) <= 1.03 num = 8*((2/yi(i,1))*(2*c2*(y0+b1.*x_n2(i+1,1)+... b2.*x_n2(i+1,1).^2)+2*b2*(z0+c1.*x_n2(i+1,1)+... c2.*x_n2(i+1,1).^2)+2*(b1+2.*b2.*x_n2(i+1,1)).*... (c1+2.*c2.*x_n2(i+1,1)))-((2/(yi(i,1).^2))*... dyi(i,1).^2)-((1+gam(i)).*(2.*d2/yi(i,2))-... (1/(yi(i,2)^2))*dyi(i,2).^2)-(4.*gam(i).*... ((-cf/(yi(i,1).^2)).*(yi(i,11).*dyi(i,1)-... 2.*(b1+c1+2.*(b2+c2).*x_n2(i+1,1)))))); den = gam(i).^2*(gam(i)+1)*((1/yi(i,2)).*dyi(i,2)+... 4*cf/yi(i,12)).^2; scriptc = num./den; if scriptc <= -1 dyi(i,3) = yi(i,3)*((1+0.5*(gam(i)-1))*yi(i,3))*... (1/(1-yi(i,3)))*((-2/yi(i,1))*dyi(i,1)+... (1+gam(i)*yi(i,3))*(dyi(i,2)/yi(i,2))+... 4*gam(i)*cf*yi(i,3)/yi(i,12));
48
else dyi(i,3) = 0.25.*gam(i).*(gam(i)+1).*((1/yi(i,2)).*... dyi(i,2)+4.*cf/yi(i,12)).*(sqrt(1+scriptc)-1); end else dyi(i,3) = yi(i,3)*((1+0.5*(gam(i)-1))*yi(i,3))*... (1/(1-yi(i,3)))*((-2/yi(i,1))*dyi(i,1)+(1+gam(i)*... yi(i,3))*(dyi(i,2)/yi(i,2))+4*gam(i)*cf*yi(i,3)/yi(i,12)); end dyi(i,4) = -yi(i,4)*(0.5*gam(i)*yi(i,3))*((dyi(i,2)/yi(i,2))+... (4*cf/yi(i,12))); dyi(i,5:12) = 0; y(i+1,:) = y(i,:)+0.5*dx_c1*(dy(i,:)+dyi(i,:)); eps = abs(y(i+1,:)-yi(i,:)); if max(eps) >= epsg yi(i,:) = y(i+1,:); end end y(i+1,5) = y(i,5)+cp(i)*log(y(i+1,2)/y(i,2))-Rair*log(y(i+1,4)/y(i,4)); y(i+1,6) = y(1,6)*(y(i+1,2)/y(1,2))*((1+0.5*(gam(i)-1)*y(1,3))/... (1+0.5*(gam(i)-1)*y(i+1,3))); y(i+1,7) = y(1,7)*(y(1,1)/y(i+1,1))*sqrt(y(1,3)/y(i+1,3))*... sqrt(y(i+1,6)/y(1,6)); y(i+1,8) = sqrt(gam(i)*Rair*y(i+1,6)); y(i+1,9) = sqrt(y(i+1,3))*y(i+1,8); y(i+1,10) = y(i,10)*(y(i,9)/y(i+1,9))*(y(i,1)/y(i+1,1)); y(i+1,11) = 2*(z0+c1.*x_n2(i+1,1)+c2.*x_n2(i+1,1)^2)+2*(y0+... b1.*x_n2(i+1,1)+b2.*x_n2(i+1,1)^2); y(i+1,12) = y(i+1,1)/y(i+1,11); ex(i+1) = ex(i)+cp(i)*(y(i+1,6)-y(i,6))+0.5*(y(i+1,9)^2-... y(i,9)^2)-298.15*(y(i+1,5)-y(i,5)); shi(i+1) = sumhidYdx; % if y(i+1,3) <= 1.1025 && dyi(i,3) < 0; break; end end i = i+1; x_n2 = x_n2(1:i,1); y_n2 = y(1:i,:); xnet(ni1+ni2+ni3+ni4+1:ni1+ni2+ni3+ni4+i) = x_n2+L_n1+L_c2+L_c1+... xnet(ni1,:); ynet(ni1+ni2+ni3+ni4+1:ni1+ni2+ni3+ni4+i,:) = y(1:i,:); ex5 = ex; shi5 = shi; ni5 = i;
r_n2 = y_n2(i,4)/y_n2(1,4); cp(i) = cp(i-1); cpcap5 = cp(1:i); cp_n2 = mean(cp); gam_n2 = mean(gam); clear y dy yi dyi ex cp shi
%% COMPREHENSIVE POST-PROCESSING bndry_d_c1 = 0.001*ni1; bndry_c1_c2 = 0.001*(ni1+ni2-1); bndry_c2_n1 = 0.001*(ni1+ni2+ni3-2); bndry_n1_n2 = 0.001*(ni1+ni2+ni3+ni4-3);
49
ynet(:,3) = ynet(:,3).^0.5; enginelength = L_d+L_c1+L_c2+L_n1+L_n2; cp = [cpcap1 cpcap2 cpcap3 cpcap4 cpcap5]; ex = [ex1 ex2 ex3 ex4 ex5]; shi = [shi1 shi2 shi3 shi4 shi5]; stavgcp = [cp_d;cp_c1;cp_c2;cp_n1;cp_n2]; comavgcp = ((cp_c1*L_c1+cp_c2*L_c2)/(L_c1+L_c2)); nozavgcp = ((cp_n1*L_n1+cp_n2*L_n2)/(L_n1+L_n2)); stavggam = [gam_d;gam_c1;gam_c2;gam_n1;gam_n2]; comavggam = ((gam_c1*L_c1+gam_c2*L_c2)/(L_c1+L_c2)); nozavggam = ((gam_n1*L_n1+gam_n2*L_n2)/(L_n1+L_n2));
% Pressure recovery calculations recovery = [r_d;r_c1;r_c2;r_n1;r_n2]; r_net = prod(recovery);
% Adiabatic efficiency calculations eta_d = ex1(length(ex1))/ex1(1); eta_c1 = 1; eta_c2 = 1; eta_n1 = ex4(length(ex4))/ex4(1); eta_n2 = ex5(length(ex5))/ex5(1); adeff = [eta_d;eta_c1;eta_c2;eta_n1;eta_n2];
% Flow calculations and fuel mass fraction ffinit = ((t0m/y_c1(1,6))-1)/((Qr/(comavgcp*y_c1(1,6)))-(t0m/y_c1(1,6))); ff = ffinit; airflow = ynet(:,10).*ynet(:,9).*ynet(:,1); airflow = airflow(1,1); fuelflow = ff*airflow; netflow = airflow+fuelflow; flowmat = ones(length(ynet),1); flowmat(1:length(x_d)) = airflow; flowmat(length(x_d)+1:length(ynet)) = netflow; fstoich = 0.029154519; fphi = ff/fstoich;
if fphi < 0.98 ffcond = 'Lean'; end if fphi >= 0.98 && fphi <= 1.02 ffcond = 'Stoi'; end if fphi > 1.02 ffcond = 'Rich'; end
% Engine efficiency support calculations ucraft = MD*sqrt(1.4*Rair*Ta); uin = ynet(1,9); uout = ynet(length(ynet),9); uinuout = uin/uout; Pe = ynet(length(ynet),7); Ae = ynet(length(ynet),1); ueff = uout+(Ae/netflow)*(Pe-Pa); Isp = ueff/ge;
50
% Nozzle Expansion Condition if Pe < 0.98*Pa econd = 'OExpand'; end if Pe >= 0.98*Pa && Pe <= 1.02*Pa econd = 'Correct'; end if Pe > 1.02*Pa econd = 'UExpand'; end econdprat = Pe/Pa;
%% ENGINE CHARACTERISTICS thrust = airflow*((1+ff)*uout-uin)+(Pe-Pa)*Ae; thrust = thrust/1000; propulsioneff = 2*((uinuout)/(1+uinuout)); thermaleff = (((1+ff)*0.5*uout^2-0.5*uin^2))/(ff*Qr); overalleff = propulsioneff*thermaleff; TSFC = fuelflow/thrust; % Thrust specific fuel consumption tpmf = thrust/airflow; % Thrust per unit airflow NYtoLA = 2448/(ucraft*2.23693629)*60; % Time from NY to LA ATW = 24901.55/(ucraft*2.23693629); % Time around the world dt = 0.001./ynet(:,9); timeinengine = sum(dt); flowpower = ex'.*flowmat; avgflowpwr = mean(flowpower); plost(1) = 0; for i = 2:length(ynet) plost(i) = plost(i-1)+ynet(i,6)*(ynet(i,5)-ynet(i-1,5)); end powerlost = plost(length(ynet));
% Range Estimations (General representation) m1m2 = linspace(1.25, 5, 20); LDrat = linspace(0.1, 10, 20); for i = 1:20 for j = 1:20 Range(i,j) = overalleff*LDrat(i)*log(m1m2(j))*(Qr/ge); end end Range = Range./1000; Range = round(Range);
% Range calculation for high-drag application m1m22 = linspace(1.25, 5, 20); LDrat2 = linspace(0.01, 1, 20); for i = 1:20 for j = 1:20 Range2(i,j) = overalleff*LDrat2(i)*log(m1m22(j))*(Qr/ge); end end Range2 = Range2./1000; Range2 = round(Range2);
%% WRITE TO FILE
51
fileID = fopen('SCRAMJET Results.txt','w'); fprintf(fileID,'--------------- SCRAMJET.m Program Results ---------------
\r\n'); fprintf(fileID,'DESIGN PARAMETERS:\r\n'); fprintf(fileID,' Flight Mach #: %12.4g
\r\n',MD); fprintf(fileID,' # Initial Shocks: %12.4g
\r\n',nsh); fprintf(fileID,' Altitude: %12.4g m
\r\n',hd); fprintf(fileID,' Max. Temp: %12.4g K
\r\n',t0m); fprintf(fileID,'----------------------------------------------------------
\r\n'); fprintf(fileID,'ENGINE CHARACTERISTICS:\r\n'); fprintf(fileID,' Diffuser Intake Area: %12.4g m^2
\r\n',ynet(1,1)); fprintf(fileID,' Engine Length: %12.4g m
\r\n',enginelength); fprintf(fileID,' Exhaust Area: %12.4g m^2
\r\n',ynet(length(ynet),1)); fprintf(fileID,' Thrust:...............SI: %12.4g kN
\r\n',thrust); fprintf(fileID,' ...................SAE: %12.4g lbf
\r\n',thrust*224.80894244); fprintf(fileID,' F-15 PW F100-220 Ratio: %12.4g
\r\n',thrust/105.7); fprintf(fileID,' Specific Impulse: %12.4g s
\r\n',Isp); fprintf(fileID,' Propulsion Eff.: %12.4g
\r\n',propulsioneff); fprintf(fileID,' Thermal Eff.: %12.4g
\r\n',thermaleff); fprintf(fileID,' Overall Eff.: %12.4g
\r\n',overalleff); fprintf(fileID,' TSFC: %12.4g kg/kN-
s\r\n',TSFC); fprintf(fileID,' Thrust per Unit Airflow: %12.4g kN-
s/kg\r\n',tpmf); fprintf(fileID,' Diffuser To Nozzle Transit Time: %12.4g s
\r\n',timeinengine); fprintf(fileID,' Fuel Fraction: %12.4g
\r\n',ff); fprintf(fileID,' Fuel-Air Equivalence Ratio: %12.4g %4s
\r\n',fphi,ffcond); fprintf(fileID,' Burn Time per Unit Fuel Tank Vol.: %12.4g s/m^3
\r\n',70/fuelflow); fprintf(fileID,' Air Flow: %12.4g kg/s
\r\n',airflow); fprintf(fileID,' Fuel Flow: %12.4g kg/s
\r\n',fuelflow); fprintf(fileID,' Total Mass Flow: %12.4g kg/s
\r\n',netflow); fprintf(fileID,'----------------------------------------------------------
\r\n'); fprintf(fileID,'MECHANICAL COEFFICIENTS:\r\n');
52
fprintf(fileID,' Diffuser Recovery: %12.4g
\r\n',r_d); fprintf(fileID,' Combustor Recovery: %12.4g
\r\n',r_c1*r_c2); fprintf(fileID,' Nozzle Recovery: %12.4g
\r\n',r_n1*r_n2); fprintf(fileID,' Total Recovery: %12.4g
\r\n',r_net); fprintf(fileID,' Exh. Condition @ Design Altitude: %12s
\r\n',econd); fprintf(fileID,' Pe/Pa: %12.4g
\r\n',econdprat); fprintf(fileID,'----------------------------------------------------------
\r\n'); fprintf(fileID,'THERMAL/THERMODYNAMIC COEFFICIENTS:\r\n'); fprintf(fileID,' Diffuser Adiabatic Eff.: %12.4g
\r\n',eta_d); fprintf(fileID,' Combustor Adiabatic Eff.: %12.4g
\r\n',eta_c1*eta_c2); fprintf(fileID,' Nozzle Adiabatic Eff.: %12.4g
\r\n',eta_n1*eta_n2); fprintf(fileID,' Diffuser Avg. cp: %12.4g J/kg-K
\r\n',cp_d); fprintf(fileID,' gam: %12.4g
\r\n',gam_d); fprintf(fileID,' Combustor Avg. cp: %12.4g J/kg-K
\r\n',comavgcp); fprintf(fileID,' gam: %12.4g
\r\n',comavggam); fprintf(fileID,' Nozzle Avg. cp: %12.4g J/kg-K
\r\n',nozavgcp); fprintf(fileID,' gam: %12.4g
\r\n',nozavggam); fprintf(fileID,' Entropic Power Lost.: %12.4g kW
\r\n',(powerlost*netflow)/1000); fprintf(fileID,' Avg. Available Power.: %12.4g kW
\r\n',avgflowpwr/1000); fprintf(fileID,'----------------------------------------------------------
\r\n'); fprintf(fileID,'PERSPECTIVE:\r\n'); fprintf(fileID,' Actual speed-over-land: %12.4g mi/s
\r\n',ucraft/1609.344); fprintf(fileID,' Transit Time - New York to LA: %12.4g
minutes\r\n',NYtoLA); fprintf(fileID,' Circumnavigate Earth about Equator: %12.4g hours
\r\n',ATW); fclose(fileID);
%% PLOT FIGURES ff1 = figure(1); subplot(3,1,1); [uu, uu1, uu2] = plotyy(xnet,ynet(:,3),xnet,ynet(:,9)); set(uu1,'LineStyle','-','Color','black','LineWidth',1); set(uu2,'LineStyle','--','Color','black','LineWidth',1.25); title('Velocity Profile'); xlabel('Length Along Engine (m)'); ylabel(uu(1),'Mach Number'); ylabel(uu(2),'Fluid Velocity (m/s)');
53
axis(uu(1),[0 enginelength 1 1.1*max(ynet(:,3))]); axis(uu(2),[0 enginelength 1 1.1*max(ynet(:,9))]); legend('Mach #','Velocity','Location','Best'); line([bndry_d_c1,bndry_d_c1],[0,max(ynet(:,9))],'Color','k'); line([bndry_c1_c2,bndry_c1_c2],[0,max(ynet(:,9))],'Color','k'); line([bndry_c2_n1,bndry_c2_n1],[0,max(ynet(:,9))],'Color','k'); line([bndry_n1_n2,bndry_n1_n2],[0,max(ynet(:,9))],'Color','k');
subplot(3,1,2); plot(xnet,ynet(:,2),'k-',xnet,ynet(:,6),'k--'); title('Temperature Profile'); xlabel('Length Along Engine (m)'); ylabel('Temperature (K)'); axis([0 enginelength 0 1.1*max(ynet(:,2))]); legend('Total Temp.','Static Temp.','Location','NorthEast'); line([bndry_d_c1,bndry_d_c1],[0,max(ynet(:,2))],'Color','k'); line([bndry_c1_c2,bndry_c1_c2],[0,max(ynet(:,2))],'Color','k'); line([bndry_c2_n1,bndry_c2_n1],[0,max(ynet(:,2))],'Color','k'); line([bndry_n1_n2,bndry_n1_n2],[0,max(ynet(:,2))],'Color','k');
subplot(3,1,3); plot(xnet,ynet(:,4),'k-',xnet,ynet(:,7),'k--'); title('Pressure Profile'); xlabel('Length Along Engine (m)'); ylabel('Pressure (Pa)'); axis([0 enginelength 0 1.1*max(ynet(:,4))]); legend('Total Pressure','Static Pressure','Location','NorthEast'); line([bndry_d_c1,bndry_d_c1],[1,max(ynet(:,4))],'Color','k'); line([bndry_c1_c2,bndry_c1_c2],[0,max(ynet(:,4))],'Color','k'); line([bndry_c2_n1,bndry_c2_n1],[0,max(ynet(:,4))],'Color','k'); line([bndry_n1_n2,bndry_n1_n2],[0,max(ynet(:,4))],'Color','k');
print('engprof','-dpng','-r600');
ff2 = figure(2); [thermoprof,l1,l2] = plotyy(xnet,ex,xnet,ynet(:,5)); set(l1,'LineStyle','-','Color','black'); set(l2,'LineStyle','--','Color','black'); title('Thermodynamic Profile'); xlabel('Length Along Engine (m)'); axes(thermoprof(1)); ylabel('Flow Exergy (J/kg)'); axes(thermoprof(2)); ylabel('Flow Entropy (J/kg-K)'); legend('Entropy','Exergy','Location','South');
print('thermprof','-dpng','-r600');
ff3 = figure(3); [Rng, hRng] = contour(m1m2,LDrat,Range,20,'Color','k'); clabel(Rng,hRng,'LabelSpacing',288); title('Estimated Range - General Conditions (km)'); xlabel('Mass Ratio (mi/mf)'); ylabel('Lift/Drag Ratio');
print('genrng','-dpng','-r600');
ff4 = figure(4); [Rng2, hRng2] = contour(m1m22,LDrat2,Range2,20,'Color','k');
54
clabel(Rng2,hRng2,'LabelSpacing',288); title('Estimated Range at High Drag (km)'); xlabel('Mass Ratio (mi/mf)'); ylabel('Lift/Drag Ratio');
print('hdrng','-dpng','-r600');
55
APPENDIX D – GASINFO.m Code/MATLAB
function [cpmix hspec hmix smix wdot dYidx MWmix dMWmix sumhidYdx Rmix... cvmix gammamix sos Kpr] = gasinfo(T, P, rhost, ux, Area) % Calculates non-equilibrium reaction rates for analysis of dissociation % of hydrogen in a supersonic combustion scenario.
Ru = 8314; % J/kmol-K n_avo = 6.02214129e23; % molecules/mol, Avogadro's number
MW_H = 1.00794; % g/mol [kg/kmol] MW_H2 = 2.01588; % g/mol [kg/kmol] MW_H2O = 18.01530; % g/mol [kg/kmol] MW_H2O2 = 34.01470; % g/mol [kg/kmol] MW_HNO = 31.01400; % g/mol [kg/kmol] MW_HNO2 = 47.01340; % g/mol [kg/kmol] MW_HO2 = 33.00670; % g/mol [kg/kmol] MW_N = 14.00670; % g/mol [kg/kmol] MW_N2 = 28.01340; % g/mol [kg/kmol] MW_N2O = 44.01280; % g/mol [kg/kmol] MW_NO = 30.00610; % g/mol [kg/kmol] MW_NO2 = 46.00550; % g/mol [kg/kmol] MW_O = 15.99940; % g/mol [kg/kmol] MW_O2 = 31.99880; % g/mol [kg/kmol] MW_OH = 17.00730; % g/mol [kg/kmol] MWmat = [MW_H;MW_H2;MW_H2O;MW_H2O2;MW_HNO;MW_HNO2;MW_HO2;MW_N;MW_N2;... MW_N2O;MW_NO;MW_NO2;MW_O;MW_O2;MW_OH];
% Heats of formation for various chemicals fH_H = 217.999; % kJ/mol fH_H2 = 0.000; % kJ/mol fH_H2O = -241.826; % kJ/mol fH_H2O2 = -136.110; % kJ/mol fH_HNO = 99.580; % kJ/mol fH_HNO2 = -76.730; % kJ/mol fH_HO2 = 2.090; % kJ/mol fH_N = 472.680; % kJ/mol fH_N2 = 0.000; % kJ/mol fH_N2O = 82.050; % kJ/mol fH_NO = 90.290; % kJ/mol fH_NO2 = 33.100; % kJ/mol fH_O = 249.180; % kJ/mol fH_O2 = 0.000; % kJ/mol fH_OH = 38.990; % kJ/mol fHmat = [fH_H;fH_H2;fH_H2O;fH_H2O2;fH_HNO;fH_HNO2;fH_HO2;fH_N;fH_N2;... fH_N2O;fH_NO;fH_NO2;fH_O;fH_O2;fH_OH];
% Specific entropy at STP for various chemicals s0_H = 114.717; % J/mol-K s0_H2 = 130.680; % J/mol-K s0_H2O = 188.835; % J/mol-K s0_H2O2 = 232.950; % J/mol-K s0_HNO = 220.720; % J/mol-K s0_HNO2 = 249.410; % J/mol-K s0_HO2 = 229.090; % J/mol-K
56
s0_N = 153.301; % J/mol-K s0_N2 = 191.609; % J/mol-K s0_N2O = 219.960; % J/mol-K s0_NO = 210.760; % J/mol-K s0_NO2 = 240.040; % J/mol-K s0_O = 161.059; % J/mol-K s0_O2 = 205.152; % J/mol-K s0_OH = 183.710; % J/mol-K s0mat = [s0_H;s0_H2;s0_H2O;s0_H2O2;s0_HNO;s0_HNO2;s0_HO2;s0_N;s0_N2;... s0_N2O;s0_NO;s0_NO2;s0_O;s0_O2;s0_OH];
% Shomate equation constants per gas, for calculation of HEAT CAPACITY, % ENTROPY DIFFERENCE FROM ZERO STATE, and ENTHALPY DIFFERENCE FROM ZERO % STATE. shocon_H = [20.78603;4.850638e-10;-1.582916e-10;1.525102e-11;3.196347e-
11;211.802;139.8711;217.9994]; shocon_H2 = [33.066178,18.563083,43.41356;-11.363417,12.257357,-
4.293079;11.432816,-2.859786,1.272428;-2.772874,0.268238,-0.096876;-
0.158558,1.97799,-20.533862;-9.980797,-1.147438,-
38.515158;172.707974,156.288133,162.081354;0,0,0]; shocon_H2O = [30.0920,41.9643;6.8325,8.6221;6.7934,-1.4998;-
2.5345,0.0981;0.0821,-11.1576;-250.8810,-272.1797;223.3967,219.7809;-
241.8264,-241.8264]; shocon_H2O2 = [34.25667;55.18445;-35.15443;9.087440;-0.422157;-
149.9098;257.0604;-136.1064]; shocon_HNO = [19.85936,52.25649;48.00847,3.105872;-25.41065,-
0.598149;5.234644,0.039904;0.230115,-
7.452039;92.51033,67.95904;232.8199,263.2531;99.57920,99.57920]; shocon_HNO2 = [37.79020,79.10390;54.22820,1.667420;-27.2514,-
0.263444;5.10099,0.014898;-0.510291,-15.048;-93.9916,-
130.378;277.096,311.358;-78.8266,-78.8266]; shocon_HO2 = [26.0096,45.8751;34.8581,8.81435;-16.30060,-
1.636031;3.110441,0.098053;-0.018611,-10.17380;-7.140991,-
26.90210;250.766,266.526;2.092001,2.092001]; shocon_N = [21.13581;-0.388842;0.043545;0.024685;-
0.025678;466.311;178.8263;472.6832]; shocon_N2 = [28.98641,19.50583,35.51872;1.853978,19.88705,1.128728;-
9.647459,-8.598535,-0.196103;16.63537,1.369784,0.014662;0.000117,0.527601,-
4.55376;-8.671914,-4.935202,-18.97091;226.4168,212.39,224.981;0,0,0]; shocon_N2O = [27.67988,60.30274;51.14898,1.034566;-30.64454,-
0.192997;6.847911,0.01254;-0.157906,-
6.860254;71.24934,48.61390;238.6164,272.5002;82.04824,82.04824]; shocon_NO = [23.83491,35.99169;12.58878,0.95717;-1.139011,-0.148032;-
1.497459,0.009974;0.214194,-
3.004088;83.35783,73.10787;237.1219,246.1619;90.29114,90.29114]; shocon_NO2 = [16.10857,56.82541;75.89525,0.738053;-54.38740,-
0.144721;14.30777,0.009777;0.239423,-
5.459911;26.17464,2.846456;240.5386,290.5056;33.09502,33.09502]; shocon_O = zeros(8,1); shocon_O2 = [31.32234,30.03235,20.91111;-
20.23531,8.772972,10.72071;57.86644,-3.988133,-2.020498;-
36.50624,0.788313,0.146449;-0.007374,-0.741599,9.245722;-8.903471,-
11.32468,5.337651;246.7945,236.1663,237.6185;0,0,0]; shocon_OH = [32.27768,28.74701;-11.36291,4.714489;13.60545,-0.814725;-
3.846486,0.054748;-0.001335,-
2.747829;29.75113,26.41439;225.5783,214.1166;38.98706,38.98706];
57
% Initial mole fractions (molefracsum should always equal 1 for continuity) molefracH = 0.000; molefracH2 = 0.000; molefracH2O = 0.000; molefracH2O2 = 0.000; molefracHNO = 0.000; molefracHNO2 = 0.000; molefracHO2 = 0.000; molefracN = 0.000; molefracN2 = 0.791; molefracN2O = 0.000; molefracNO = 0.000; molefracNO2 = 0.000; molefracO = 0.000; molefracO2 = 0.209; molefracOH = 0.000; molefracmat = [molefracH;molefracH2;molefracH2O;molefracH2O2;... molefracHNO;molefracHNO2;molefracHO2;molefracN;molefracN2;... molefracN2O;molefracNO;molefracNO2;molefracO;molefracO2;molefracOH]; molefracsum = sum(molefracmat); molefracmat = molefracmat./molefracsum;
% Calculate partial pressures; << RESERVED FOR FUTURE USE >> % piH = (molefracH/molefracsum) * P; % piH2 = (molefracH2/molefracsum) * P; % piH2O = (molefracH2O/molefracsum) * P; % piH2O2 = (molefracH2O2/molefracsum) * P; % piHNO = (molefracHNO/molefracsum) * P; % piHNO2 = (molefracHNO2/molefracsum) * P; % piHO2 = (molefracHO2/molefracsum) * P; % piN = (molefracN/molefracsum) * P; % piN2 = (molefracN2/molefracsum) * P; % piN2O = (molefracN2O/molefracsum) * P; % piNO = (molefracNO/molefracsum) * P; % piNO2 = (molefracNO2/molefracsum) * P; % piO = (molefracO/molefracsum) * P; % piO2 = (molefracO2/molefracsum) * P; % piOH = (molefracOH/molefracsum) * P; % pimat =
[piH;piH2;piH2O;piH2O2;piHNO;piHNO2;piHO2;piN;piN2;piN2O;piNO;piNO2;piO;piO2;
piOH]; % 52 Forward Reaction Coefficients, kf = A * T ^ n * exp (- E / (R * T)); % Units: cm^3 / (mol - s)
% Set up constant arrays Ar =
[3.72e6;1.99e14;1.02e8;1.5e9;2.2e14;6e16;2.2e22;1e17;6.17e15;7.98e19;6.42e18;
1.3e22;1.69e14;6.62e13;1.18e14;1.7e13;1.4e13;2.89e13;2e12;4.8e13;2.41e13;2.8e
13;1e13;9.1e24;1.82e14;3.8e9;3.72e21;4e20;6.92e23;1.1e16;1e14;6.92e13;1e13;4e
12;5e12;1e13;1e14;2e12;2.63e14;1e13;5.01e11;6.31e11;1.26e12;1.99e11;2.09e12;3
.16e11;3.47e14;7.59e13;1.26e13;2.4e13;2.92e15;5e17]; nr = [2.17;0;1.6;1.14;0;-0.6;-2;-1;-0.5;-1.5;-1;-2;0;0;0;0;0;0;0;0;0;0;0;-
2.5;0;1;-1.6;-1.5;-2.5;0;0;0;0;0;0;0;0;0;0;0;0.5;0;0.5;0;0;0.5;0;0;0;0;0;-1]; Er = [4080;8460;1660;50;48312;0;0;0;0;0;0;0;440;1070;1373;24046;540;-
250;0;4005;2000;3220;905;64667;38370;20834;113231;75487;32711;33013;14091;133
58
86;302;0;0;10015;25011;13487;25364;1001;1001;4997;1001;1001;-
240;1001;740;7599;1998;14500;-300;25000];
% Calculate forward reaction coefficients array kf = (Ar.*(T.^nr)).*exp(-Er./T);
% Calculate equilibrium coefficients for each reaction % Kp = exp(deltas0/R - deltaH0/RT); Kpr(1) = exp(((s0_OH+s0_H-s0_O-s0_H2)/(Ru/1000))-(((fH_OH+fH_H-fH_O-
fH_H2)*1000)/((Ru/1000)*T))); % (piOH * piH) / (piO * piH2); Kpr(2) = exp(((s0_OH+s0_O-s0_H-s0_O2)/(Ru/1000))-(((fH_OH+fH_O-fH_H-
fH_O2)*1000)/((Ru/1000)*T))); Kpr(3) = exp(((s0_H2O+s0_H-s0_H2-s0_OH)/(Ru/1000))-(((fH_H2O+fH_H-fH_H2-
fH_OH)*1000)/((Ru/1000)*T))); Kpr(4) = exp(((s0_H2O+s0_O-s0_OH-s0_OH)/(Ru/1000))-(((fH_H2O+fH_O-fH_OH-
fH_OH)*1000)/((Ru/1000)*T))); Kpr(5) = exp(((s0_H+s0_H-s0_H2)/(Ru/1000))-(((fH_H+fH_H-
fH_H2)*1000)/((Ru/1000)*T))); Kpr(6) = exp(((s0_OH-s0_O-s0_H)/(Ru/1000))-(((fH_OH-fH_O-
fH_H)*1000)/((Ru/1000)*T))); Kpr(7) = exp(((s0_H2O-s0_H-s0_OH)/(Ru/1000))-(((fH_H2O-fH_H-
fH_OH)*1000)/((Ru/1000)*T))); Kpr(8) = exp(((s0_O2-s0_O-s0_O)/(Ru/1000))-(((fH_O2-fH_O-
fH_O)*1000)/((Ru/1000)*T))); Kpr(9) = exp(((s0_O2+s0_N2-s0_O-s0_O-s0_N2)/(Ru/1000))-(((fH_O2+fH_N2-fH_O-
fH_O-fH_N2)*1000)/((Ru/1000)*T))); Kpr(10) = exp(((s0_O2+s0_O2-s0_O-s0_O-s0_O2)/(Ru/1000))-(((fH_O2+fH_O2-fH_O-
fH_O-fH_O2)*1000)/((Ru/1000)*T))); Kpr(11) = exp(((s0_HO2-s0_H-s0_O2)/(Ru/1000))-(((fH_HO2-fH_H-
fH_O2)*1000)/((Ru/1000)*T))); Kpr(12) = exp(((s0_H2O2-s0_OH-s0_OH)/(Ru/1000))-(((fH_H2O2-fH_OH-
fH_OH)*1000)/((Ru/1000)*T))); Kpr(13) = exp(((s0_OH+s0_OH-s0_H-s0_HO2)/(Ru/1000))-(((fH_OH+fH_OH-fH_H-
fH_HO2)*1000)/((Ru/1000)*T))); Kpr(14) = exp(((s0_H2+s0_O2-s0_H-s0_HO2)/(Ru/1000))-(((fH_H2+fH_O2-fH_H-
fH_HO2)*1000)/((Ru/1000)*T))); Kpr(15) = exp(((s0_H2O+s0_O-s0_H-s0_HO2)/(Ru/1000))-(((fH_H2O+fH_O-fH_H-
fH_HO2)*1000)/((Ru/1000)*T))); Kpr(16) = exp(((s0_OH+s0_OH-s0_H2-s0_O2)/(Ru/1000))-(((fH_OH+fH_OH-fH_H2-
fH_O2)*1000)/((Ru/1000)*T))); Kpr(17) = exp(((s0_O2+s0_OH-s0_HO2-s0_O)/(Ru/1000))-(((fH_O2+fH_OH-fH_HO2-
fH_O)*1000)/((Ru/1000)*T))); Kpr(18) = exp(((s0_H2O+s0_O2-s0_HO2-s0_OH)/(Ru/1000))-(((fH_H2O+fH_O2-fH_HO2-
fH_OH)*1000)/((Ru/1000)*T))); Kpr(19) = exp(((s0_H2O2+s0_O2-s0_HO2-s0_HO2)/(Ru/1000))-(((fH_H2O2+fH_O2-
fH_HO2-fH_HO2)*1000)/((Ru/1000)*T))); Kpr(20) = exp(((s0_HO2+s0_H2-s0_H2O2-s0_H)/(Ru/1000))-(((fH_HO2+fH_H2-
fH_H2O2-fH_H)*1000)/((Ru/1000)*T))); Kpr(21) = exp(((s0_H2O+s0_OH-s0_H2O2-s0_H)/(Ru/1000))-(((fH_H2O+fH_OH-
fH_H2O2-fH_H)*1000)/((Ru/1000)*T))); Kpr(22) = exp(((s0_HO2+s0_OH-s0_H2O2-s0_O)/(Ru/1000))-(((fH_HO2+fH_OH-
fH_H2O2-fH_O)*1000)/((Ru/1000)*T))); Kpr(23) = exp(((s0_HO2+s0_H2O-s0_H2O2-s0_OH)/(Ru/1000))-(((fH_HO2+fH_H2O-
fH_H2O2-fH_OH)*1000)/((Ru/1000)*T))); Kpr(24) = exp(((s0_NO+s0_NO-s0_N2-s0_O2)/(Ru/1000))-(((fH_NO+fH_NO-fH_N2-
fH_O2)*1000)/((Ru/1000)*T)));
59
Kpr(25) = exp(((s0_N+s0_NO-s0_O-s0_N2)/(Ru/1000))-(((fH_N+fH_NO-fH_O-
fH_N2)*1000)/((Ru/1000)*T))); Kpr(26) = exp(((s0_N+s0_O2-s0_NO-s0_O)/(Ru/1000))-(((fH_N+fH_O2-fH_NO-
fH_O)*1000)/((Ru/1000)*T))); Kpr(27) = exp(((s0_N+s0_N-s0_N2)/(Ru/1000))-(((fH_N+fH_N-
fH_N2)*1000)/((Ru/1000)*T))); Kpr(28) = exp(((s0_N+s0_O-s0_NO)/(Ru/1000))-(((fH_N+fH_O-
fH_NO)*1000)/((Ru/1000)*T))); Kpr(29) = exp(((s0_N2+s0_O-s0_N2O)/(Ru/1000))-(((fH_N2+fH_O-
fH_N2O)*1000)/((Ru/1000)*T))); Kpr(30) = exp(((s0_NO+s0_O-s0_NO2)/(Ru/1000))-(((fH_NO+fH_O-
fH_NO2)*1000)/((Ru/1000)*T))); Kpr(31) = exp(((s0_N2+s0_O2-s0_N2O-s0_O)/(Ru/1000))-(((fH_N2+fH_O2-fH_N2O-
fH_O)*1000)/((Ru/1000)*T))); Kpr(32) = exp(((s0_NO+s0_NO-s0_N2O-s0_O)/(Ru/1000))-(((fH_NO+fH_NO-fH_N2O-
fH_O)*1000)/((Ru/1000)*T))); Kpr(33) = exp(((s0_NO+s0_O2-s0_NO2-s0_O)/(Ru/1000))-(((fH_NO+fH_O2-fH_NO2-
fH_O)*1000)/((Ru/1000)*T))); Kpr(34) = exp(((s0_NO+s0_NO-s0_NO2-s0_N)/(Ru/1000))-(((fH_NO+fH_NO-fH_NO2-
fH_N)*1000)/((Ru/1000)*T))); Kpr(35) = exp(((s0_N2O+s0_O-s0_NO2-s0_N)/(Ru/1000))-(((fH_N2O+fH_O-fH_NO2-
fH_N)*1000)/((Ru/1000)*T))); Kpr(36) = exp(((s0_N2+s0_NO-s0_N2O-s0_N)/(Ru/1000))-(((fH_N2+fH_NO-fH_N2O-
fH_N)*1000)/((Ru/1000)*T))); Kpr(37) = exp(((s0_N2+s0_NO2-s0_N2O-s0_NO)/(Ru/1000))-(((fH_N2+fH_NO2-fH_N2O-
fH_NO)*1000)/((Ru/1000)*T))); Kpr(38) = exp(((s0_NO+s0_NO+s0_O2-s0_NO2-s0_NO2)/(Ru/1000))-
(((fH_NO+fH_NO+fH_O2-fH_NO2-fH_NO2)*1000)/((Ru/1000)*T))); Kpr(39) = exp(((s0_N+s0_OH-s0_NO-s0_H)/(Ru/1000))-(((fH_N+fH_OH-fH_NO-
fH_H)*1000)/((Ru/1000)*T))); Kpr(40) = exp(((s0_NO+s0_OH-s0_N-s0_HO2)/(Ru/1000))-(((fH_NO+fH_OH-fH_N-
fH_HO2)*1000)/((Ru/1000)*T))); Kpr(41) = exp(((s0_NO+s0_OH-s0_HNO-s0_O)/(Ru/1000))-(((fH_NO+fH_OH-fH_HNO-
fH_O)*1000)/((Ru/1000)*T))); Kpr(42) = exp(((s0_N2+s0_HO2-s0_N2O-s0_OH)/(Ru/1000))-(((fH_N2+fH_HO2-fH_N2O-
fH_OH)*1000)/((Ru/1000)*T))); Kpr(43) = exp(((s0_H2O+s0_NO-s0_OH-s0_HNO)/(Ru/1000))-(((fH_H2O+fH_NO-fH_OH-
fH_HNO)*1000)/((Ru/1000)*T))); Kpr(44) = exp(((s0_HNO+s0_O2-s0_HO2-s0_NO)/(Ru/1000))-(((fH_HNO+fH_O2-fH_HO2-
fH_NO)*1000)/((Ru/1000)*T))); Kpr(45) = exp(((s0_NO2+s0_OH-s0_NO-s0_HO2)/(Ru/1000))-(((fH_NO2+fH_OH-fH_NO-
fH_HO2)*1000)/((Ru/1000)*T))); Kpr(46) = exp(((s0_NO+s0_H2O2-s0_HNO-s0_HO2)/(Ru/1000))-(((fH_NO+fH_H2O2-
fH_HNO-fH_HO2)*1000)/((Ru/1000)*T))); Kpr(47) = exp(((s0_NO+s0_OH-s0_NO2-s0_H)/(Ru/1000))-(((fH_NO+fH_OH-fH_NO2-
fH_H)*1000)/((Ru/1000)*T))); Kpr(48) = exp(((s0_N2+s0_OH-s0_N2O-s0_H)/(Ru/1000))-(((fH_N2+fH_OH-fH_N2O-
fH_H)*1000)/((Ru/1000)*T))); Kpr(49) = exp(((s0_H2+s0_NO-s0_HNO-s0_H)/(Ru/1000))-(((fH_H2+fH_NO-fH_HNO-
fH_H)*1000)/((Ru/1000)*T))); Kpr(50) = exp(((s0_H+s0_HNO2-s0_NO2-s0_H2)/(Ru/1000))-(((fH_H+fH_HNO2-fH_NO2-
fH_H2)*1000)/((Ru/1000)*T))); Kpr(51) = exp(((s0_HNO-s0_H-s0_NO)/(Ru/1000))-(((fH_HNO-fH_H-
fH_NO)*1000)/((Ru/1000)*T))); Kpr(52) = exp(((s0_NO+s0_OH-s0_HNO2)/(Ru/1000))-(((fH_NO+fH_OH-
fH_HNO2)*1000)/((Ru/1000)*T)));
60
% Molal rate (forward, backward, net) matrices % Units: mol vp = [0 1 0 0 0 0 0 0 0 0 0 0 1 0 0; 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2; 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0; 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0; 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1; 0 0 0 0 0
0 0 0 0 0 0 0 2 0 0; 0 0 0 0 0 0 0 0 1 0 0 0 2 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 2
1 0; 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2; 1 0 0 0 0
0 1 0 0 0 0 0 0 0 0; 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0; 1 0 0 0 0 0 1 0 0 0 0 0 0
0 0; 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0; 0 0 0 0 0
0 1 0 0 0 0 0 0 0 1; 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0; 1 0 0 1 0 0 0 0 0 0 0 0 0
0 0; 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0; 0 0 0 1 0
0 0 0 0 0 0 0 0 0 1; 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 1 0 0 0 1
0 0; 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0; 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0; 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0; 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0; 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0; 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0; 0 0 0 0 0
0 0 0 0 0 0 1 1 0 0; 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0; 0 0 0 0 0 0 0 1 0 0 0 1 0
0 0; 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0; 0 0 0 0 0
0 0 0 0 0 0 2 0 0 0; 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0; 0 0 0 0 0 0 1 1 0 0 0 0 0
0 0; 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0; 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1; 0 0 0 0 1
0 0 0 0 0 0 0 0 0 1; 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0; 0 0 0 0 0 0 1 0 0 0 1 0 0
0 0; 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0; 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0; 1 0 0 0 0
0 0 0 0 1 0 0 0 0 0; 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0; 0 1 0 0 0 0 0 0 0 0 0 1 0
0 0; 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0; 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0]; vpp = [1 0 0 0 0 0 0 0 0 0 0 0 0 0 1; 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1; 1 0 1 0
0 0 0 0 0 0 0 0 0 0 0; 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0; 2 0 0 0 0 0 0 0 0 0 0 0
0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1; 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 0 0 0 0
0 2 0; 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0; 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0
0 0 0 0 0 0 0 0 0 0 2; 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 1 0 0 0 0 0 0 0 0 0
1 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2; 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1; 0 0 1 0
0 0 0 0 0 0 0 0 0 1 0; 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0; 0 1 0 0 0 0 1 0 0 0 0 0
0 0 0; 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1; 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1; 0 0 1 0
0 0 1 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0; 0 0 0 0 0 0 0 1 0 0 1 0
0 0 0; 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0; 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0; 0 0 0 0
0 0 0 1 0 0 0 0 1 0 0; 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0; 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0; 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0; 0 0 0 0
0 0 0 0 0 0 1 0 0 1 0; 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0; 0 0 0 0 0 0 0 0 0 1 0 0
1 0 0; 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0; 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0; 0 0 0 0
0 0 0 0 0 0 2 0 0 1 0; 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1; 0 0 0 0 0 0 0 0 0 0 1 0
0 0 1; 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1; 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0; 0 0 1 0
0 0 0 0 0 0 1 0 0 0 0; 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 0 0 0 1
0 0 1; 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1; 0 0 0 0
0 0 0 0 1 0 0 0 0 0 1; 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0; 1 0 0 0 0 1 0 0 0 0 0 0
0 0 0; 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1]; diffvppvp = vpp - vp;
svp = (sum(vp))'; svpp = (sum(vpp))'; sdiffvppvp = (sum(vpp-vp))'; s2diffvppvp = sum(diffvppvp,2);
% Third-body efficiency matrix nr3b = [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 6.0000 4.0000 15.0000 1
1 1 1 1 1.2000 1 1 1 1 1 1; 1 1 5.0000 1 1 1 1 1 1 1 1 1 1 1 1; 2.0000 1
6.3000 1 1 1 1 1 1 1 1 1 1 1 1; 1 3.6700 1 1 1 1 1 1 1 4.3800 1 1 1 1 1; 1 1
61
1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 2.5000 16.0000 1
1 1 1 1 1 1 1 1 1 1 1; 1 1 6.0000 6.0000 1 1 1 1 1 1 1 1 1 0.8000 1; 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 2.0000 1.4000 1 1 1 1 6.0000 1 1 1 1
1 1 1; 1 1 1 1 1 1 1 20.0000 1 1 20.0000 1 20.0000 1 1; 1 1 1 1 1 1 1 1
1.2200 5.5600 1 1 1 1.2200 1; 1 1 6.1000 1 1 1 1 1 1.4000 2.1000 2.9000 1 1 1
1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1; 1 1.8600 6.1500 1 1 1 1 1 1 2.2100 1 1 1 1 1; 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1]; if size(molefracmat) == [1 15] molefracmat = molefracmat'; end tbem = nr3b * molefracmat;
% Assemble concentration matrix, Kc % Kcr = (patm/(Ru * T))^diffvppvp * Kpr; Pressure in 'atm' (not Pascals) Kcr = Kpr' .* ((P*(9.869232667160128e-6))/((Ru/1000)*T)) .^ s2diffvppvp;
% Relate backward rate constant, kb kb = kf./Kcr;
% Calculate rate of progress, qr qr(52) = 0; for j = 1:52 qr(j) = tbem(j).*(kf(j).*prod((vp(j,:)'.*molefracmat).^(vp(j,:)')) -
kb(j).*prod((vpp(j,:)'.*molefracmat).^(vpp(j,:)'))); end clear j
% Calculate molar production rate, wdot wdot = (qr * diffvppvp)'.*(100^3); % mol / (m^3 - s) % wdot = MWmat .* wdot ./ 1000; % Converts to kg / (m^3 - s)
% Calculate specific heat, entropy, and enthalpy of mixture: % Heat Capacity in J/mol*K, Enthalpy in kJ/mol, Entropy J/mol*K [cp_H, delH_H, dels0_H] = shoH(T); [cp_H2, delH_H2, dels0_H2] = shoH2(T); [cp_H2O, delH_H2O, dels0_H2O] = shoH2O(T); [cp_H2O2, delH_H2O2, dels0_H2O2] = shoH2O2(T); [cp_HNO, delH_HNO, dels0_HNO] = shoHNO(T); [cp_HNO2, delH_HNO2, dels0_HNO2] = shoHNO2(T); [cp_HO2, delH_HO2, dels0_HO2] = shoHO2(T); [cp_N, delH_N, dels0_N] = shoN(T); [cp_N2, delH_N2, dels0_N2] = shoN2(T); [cp_N2O, delH_N2O, dels0_N2O] = shoN2O(T);
62
[cp_NO, delH_NO, dels0_NO] = shoNO(T); [cp_NO2, delH_NO2, dels0_NO2] = shoNO2(T); [cp_O, delH_O, dels0_O] = shoO(T); [cp_O2, delH_O2, dels0_O2] = shoO2(T); [cp_OH, delH_OH, dels0_OH] = shoOH(T);
% Store specific heat capacity, specific enthalpy, and specific entropy % information in matrix cp(1:15) = 0; cp(1) = cp_H; cp(2) = cp_H2; cp(3) = cp_H2O; cp(4) = cp_H2O2; cp(5) = cp_HNO; cp(6) = cp_HNO2; cp(7) = cp_HO2; cp(8) = cp_N; cp(9) = cp_N2; cp(10) = cp_N2O; cp(11) = cp_NO; cp(12) = cp_NO2; cp(13) = cp_O; cp(14) = cp_O2; cp(15) = cp_OH;
delH(1:15) = 0; delH(1) = delH_H; delH(2) = delH_H2; delH(3) = delH_H2O; delH(4) = delH_H2O2; delH(5) = delH_HNO; delH(6) = delH_HNO2; delH(7) = delH_HO2; delH(8) = delH_N; delH(9) = delH_N2; delH(10) = delH_N2O; delH(11) = delH_NO; delH(12) = delH_NO2; delH(13) = delH_O; delH(14) = delH_O2; delH(15) = delH_OH;
dels0(1:15) = 0; dels0(1) = dels0_H; dels0(2) = dels0_H2; dels0(3) = dels0_H2O; dels0(4) = dels0_H2O2; dels0(5) = dels0_HNO; dels0(6) = dels0_HNO2; dels0(7) = dels0_HO2; dels0(8) = dels0_N; dels0(9) = dels0_N2; dels0(10) = dels0_N2O; dels0(11) = dels0_NO; dels0(12) = dels0_NO2; dels0(13) = dels0_O;
63
dels0(14) = dels0_O2; dels0(15) = dels0_OH;
% Calculate the molecular weight of the mix; MWmix = sum(molefracmat.*MWmat);
% Calculate heat capacity of mixture, J/kg-K cpmix = cp * molefracmat * (1000/MWmix);
% Calculate specific enthalpy of mixture, kJ/kg hspec = (delH' + fHmat) .* (1000./MWmat); hmix = hspec' * molefracmat * (1000/MWmix);
% Calculate the specific entropy of the mixture, J/kg-K smix = dels0 * molefracmat * (1000/MWmix);
dYidx = (0.001.*wdot.*MWmat.*Area)./(rhost*ux); dMWmix = -(MWmix^2) * ((MWmat.^-1)'*dYidx); sumhidYdx = hspec' * dYidx; Rmix = Ru/MWmix; %J/kg-K cvmix = cpmix - Rmix; gammamix = cpmix/cvmix; sos = sqrt(gammamix * Rmix * T); end
64
APPENDIX E – Rate Constants for 15 Species, 52 Reactions, Hydrogen Combustion Model
65
LIST OF SYMBOLS, ABBREVIATIONS, AND ACRONYMS
ENGLISH ALPHABET
Variable Units Description
a ambient designator
a m/s local speed of sound
B kJ flow availability
b kJ/kg specific flow availability
B0 kJ reference flow availability
b0 kJ/kg reference specific flow availability
bi N/kg body force; force density
ci scalar coefficient
cf fuel fraction, alternative
cp kJ/kg·K specific heat capacity at constant pressure
Cp kJ/K heat capacity at constant pressure
cν kJ/kg·K specific heat capacity at constant volume
Cν kJ/K heat capacity at constant volume
Dh m hydraulic diameter (area/wetted perimeter)
D/Dt material derivative
Dij 1/s rate of deformation tensor
ijD 1/s deviatoric rate of deformation tensor; no hydrodynamic component
Ex kJ flow exergy
ex kJ/kg specific flow exergy
f fuel fraction
h m altitude above sea level
h kJ/kg specific enthalpy
H kJ enthalpy
Isp s specific impulse
K concentration constant, equilibrium constant
M g/mol molecular weight
p Pa pressure, thermodynamic; static pressure
66
ENGLISH ALPHABET
Variable Units Description
p Pa mean pressure, mechanical
p0 Pa total pressure
Pw m wetted perimeter
q kJ/kg specific heat flux
Q kJ heat flux
qint kJ/kg specific internal heat source
qr 1/s rate of progress variable
Qint kJ internal heat source
r pressure recovery
Re Reynolds number
s kJ/kg·K specific entropy
s km range
S kJ/K entropy
t s time
T kN thrust
T K temperature; static temperature
T0 K total temperature
Tij Pa Cauchy stress tensor
TSFC kg/kN-s thrust-specific fuel consumption
u kJ/kg specific total energy
ui m/s velocity vector
ue m/s exhaust velocity
ueq m/s equivalent exhaust velocity
v forward, rearward stoichiometric coefficient
w kJ/kg specific work, mechanical
W kJ work, mechanical
kW/kg specific power, mechanical
kW power, mechanical
67
ENGLISH ALPHABET
Variable Units Description
xi m spatial reference, Eulerian
Yi mass fraction
GREEK ALPHABET
Variable Units Description
α Arrhenius equation constant 1
β rad shock angle; flow angle made at wedge vertex wrt original flow vector
β Arrhenius equation constant 2
γ specific heat capacity ratio (cp/cv)
δ shock type designator; δ = 0 for weak shock; δ = 1 for strong shock
δ Kronecker delta
η efficiency, adiabatic efficiency
θ rad deflection angle; wedge angle
κ Pa·s bulk viscosity
λ Pa·s Lame viscosity; second viscosity
μ Pa·s dynamic viscosity
ν m2/s kinematic viscosity
ρ kg/m3
mass density
ϕ arbitrary function; function placeholder
mol/s species production rate