SlideShare a Scribd company logo
1 of 16
Download to read offline
A C++ algorithm for computing
equilibrium chemical composition of air at
temperatures 200-9000 K
A REPORT
by
G R Krishna Chand Avatar
BE (Aerospace Engineering)
Punjab Engineering College, Chandigarh
July 5, 2016
Contents
1 Introduction 2
1.1 Air . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Equilibrium fundamentals . . . . . . . . . . . . . . . . . . . . 2
2 Governing Equations 4
2.1 Equilibrium equations . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Conservation equations . . . . . . . . . . . . . . . . . . . . . . 4
3 Computational models 6
3.1 Model 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 Model 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 Model 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Results 9
5 Algorithm Description 10
1
Abstract
The chemical composition of air drastically changes at high tempera-
tures, which is triggered mainly due to molecular dissociation of diatomic
nitrogen (N2) and diatomic oxygen (O2). The algorithm presented here at-
tempts to compute the composition of air for the temperature range 200 –
9000 K. The constituents of air are assumed to be primarily N2, O2, O, N
and NO as they are present in substantial amounts for the selected range of
study.
Nomenclature
i, j : Indices
ai,j : Interpolating polynomials
bn : Polynomial coefficients
R : Ideal gas constant (8.314 J/mol/K)
ρ : Density of air (kg/m3)
∆G : Gibbs energy function (J/mol)
P0 : Reference pressure (101325 Pa)
T0 : Reference temperature (0 K)
T : Temperature (K)
Go
i : Molar Gibbs energy for ith species (J/mol)
Ho
i : Molar enthalpy for ith species (J/mol)
So
i : Molar entropy for ith species (J/mol/K)
σN : Mole number of nitrogen atoms
σO : Mole number of oxygen atoms
σi : Mole number of ith species
σ : Sum of mole numbers of all species
ν : Stoichiometric coefficients of any species in a chemical reaction
Ki : Equilibrium constant based on mole numbers
Kpi : Equilibrium constant based on partial pressures
tol : Tolerance value
1
Chapter 1
Introduction
1.1 Air
Air is a mixture of gases, which at low temperatures are primarily
Nitrogen, Oxygen and small amounts of argon, carbon dioxide and other
gases. Since nitrogen and oxygen form almost all of the air, it is considered
that the former has a presence with 79% and the latter with 21% by moles
at low temperatures. Five chemically reacting species are assumed to be
present in air, viz., N2, N, O, O2 and NO and designed respectively as :
σ1, σ2, σ3, σ4 and σ5.
Three independent chemical reactions are considered involving all the
5 reacting species which are enumerated as :
O2 → 2O (1.1)
N2 + O2 → 2NO (1.2)
N2 → 2N (1.3)
1.2 Equilibrium fundamentals
To determine whether a reaction has reached its state of equilibrium or
not, a parameter known as equilibrium coefficient is defined. This equilib-
rium coefficient, when expressed in terms of partial pressures of the partici-
pating gaseous entities, Kp is more easily computed once the Gibbs standard
energy change for the particular reaction (∆G) is calculated. Both these
terms are related via the expression :
Kpj = e−∆Go
j /RT
for any jth
reaction.
∆Go for any reaction is calculated using the following expression:
∆Go
=
products
νiGi −
reactants
νiGi
2
For the reactions in the previous section, ∆Go
j (j = 1,2,3) is given as under;
∆Go
1 = 2Go
3 − Go
4
∆Go
2 = 2Go
5 − Go
1 − Go
4
∆Go
3 = 2Go
2 − Go
1
In order to detemine ∆G, Gibbs free energy with reference to a temperature
0 K has to be computed for each of the five species that have been considered
using a Gibbs energy function, Go(T). Many research organisations, notably
NASA, have curve-fitted the data, using least-squares method, obtained af-
ter performing rigorous experiments using a set of interpolating polynomials
valid for continual temperature ranges. These values for the interpolating
coefficients could be obtained from any reliable source. For our purpose, we
have used the data from "A Rapid Method for the Computation of Equilib-
rium Chemical Composition of Air to 15000 K" - Ramadas K. Prabhu and
Wayne D. Erickson, NASA Technical Paper 2792 published in March 1988.
Gibbs energy function is expressed as:
Go
i
RT
=
Ho
i
RT
−
So
i
R
Ho
i
RT
=
5
j=1
ai,jTj−1
j
+
ai,6
T
So
i
R
= ai,1 log T +
5
j=2
ai,jTj−1
j − 1
+ ai,7
The coefficients ai,6 and ai,7 are the itegration constants. The
values of ai,6 were determined from the enthalpy of formation (taken from
the JANAF Thermochemical Tables published by The Dow Chemical Co.)
for all the species at the reference temperature (T0 = 0 K). The values of
ai,7 were determined from the values of entropy at T = 298.15 K.
3
Chapter 2
Governing Equations
2.1 Equilibrium equations
There are three reactions which govern the equilibrium chemical compo-
sition of air at various temperatures. At these temperatures, corresponding
equilibrium constants in terms of the mole numbers, Ki (i=1,2,3) of the
participating species for the three reactions are obtained.
The reactions with their Ki’s are enumerated as:
O2 → 2O; K1 =
σ3
2
σ4
(2.1)
N2 + O2 → 2NO; K2 =
σ5
2
σ1 · σ4
(2.2)
N2 → 2N; K3 =
σ2
2
σ1
(2.3)
As the equilibrium constants are based on mole numbers Ki of the
species, they have to be expressed in terms of equilibrium constants based on
partial pressures of the participating species, Kpi (i=1,2,3). This is because
the latter can be easily expressed as a function of the Gibbs’ free energy
change for each of the reactions as discussed in the introduction.
The two types of equibrium constants are related through an expression as:
Ki = Kpi · (P0/ρRT)∆N
∆N = Nmole numbers of products − Nmole numbers of reactants
2.2 Conservation equations
All the species that are considered here are made of two fundamental
elements, Oxygen and Nitrogen which allows for the formulation of two con-
4
servation equations, one each for Oxygen and Nitrogen, as:
2σ4 + σ3 + σ5 = σO (2.4)
2σ1 + σ2 + σ5 = σN (2.5)
One mole of diatomic species, N2 (σ1) and O2 (σ4) contributes two
moles of atoms of their constituent element species. Similarly one mole of
species NO (σ5) contributes one mole of Oxygen atoms and another mole of
Nitrogen atoms.
5
Chapter 3
Computational models
For computation of equilibrium chemical composition of air for the tem-
perature range 200–9000 K, three models are adopted for three overlapping
temperature ranges. Every model includes two sets of constituent species,
viz,
1. Major species : Comprises of those species which are predominant
for the temperature range under study
2. Minor species : Enumerates those species whose presence is rela-
tively very low
The regions of applicability of the models,as presented above, strictly
depends upon the value of log ρ alongwith temperature, T. The graph show-
ing the same is presented on the last page of this report. The applicability
(in terms of temperature ranges) of each of the models, as mentioned in its
description, is particularly for the case when ρ = 0.01kg/m3.
3.1 Model 1
This model computes the composition of air in the low temperature range :
200-1600 K (or based on the value of log ρ)
Here the major species are N2 (σ1) and O2 (σ4) and the minor
ones are O (σ3), NO (σ5) and N (σ2).
Procedure:
1. Assume initial values for mole numbers for O2 and N2 as:
σ4 = σO
2 and σ1 = σN
2
2. Compute minor species as:
σ3 = K1σ4 σ2 = K3σ1 σ5 = Keσ2σ3; Ke = K2
K1K3
3. Update the major species as:
σ4 = (σO−σ3−σ5)
2 σ1 = (σN −σ2−σ5)
2
6
4. Iterate the preceding steps until convergence is achieved,i.e.,until
|σ4 − σ4| ≤ tol and |σ1 − σ1| ≤ tol
3.2 Model 2
This model computes the composition of air in the median temperature
range : 1600-6000 K (or based on the value of log ρ)
The major species are N2 (σ1), N (σ2), O (σ3), O2 (σ4) and NO
(σ5).
Procedure:
1. Calculate the initial guess for σ3 using the equations as under:
2σ4 + σ3 + σ5 = σO σ4 =
σ2
3
K1
σ5 = σ3
σN K2
2K1
taking σ1 = σN /2
such that : σ3 =
−
K1
2
(1+
σN K2
2K1
)+
K2
1
4
(1+
σN K2
2K1
)2+2σOK1
2
2. Determine values of bn : n=0,1,2,3,4 as:
b0 = 2K1σ2
O
b1 = (−4 + K3Ke)K1σO
b2 = −8σO + 2K1 + (σO − σN )K2 − K1K3Ke
b3 = 8 − K2 − 2K3Ke
b4 = (8−2K2)
K1
3. Compute ∆σ3 = − F
F
as: F = 4
n=0 bnσn
3 F = 4
n=1 nbnσn−1
3
4. Update σ3 and compute the major species as :
σ3 = σ3 + ∆σ3 σ2 =
σO−2
σ2
3
K1
−σ3
Keσ3
σ5 = Keσ2σ3
σ1 = (σN −σ2−σ5)
2
σ4 = (σO−σ3−σ5)
2
5. Iterate steps 3-4 till convergence for σ3 is achieved,i.e.,
|∆σ3| ≤ tol
3.3 Model 3
This model computes the composition of air in the relatively high tempera-
ture range : 3500-9000 K (or based on the value of log ρ)
The major species are N2 (σ1), N (σ2) and O (σ3); the minor ones
are O2 (σ4) and NO (σ5).
Procedure:
1. Assume σ4 = σ5 = 0. Take σ3 = σO.
7
2. σN = σN − σ5 and solving quadratically for σ2 as :
σ2 =
−K3
2 + (K3
2 )2 + 2K3σN
2
3. Compute major and minor species:
σ1 =
(σN −σ2)
2 σ4 =
σ3
2
K1
σ5 = Keσ3σ2
σ3 = σO − 2σ4 − σ5
4. Take σ3 = σ3
5. Keep on iterating steps 2-4 till the following criterion is met:
|σ3 − σ3| ≤ tol
8
Chapter 4
Results
The results are discussed when ρ = 1 ∗ 10−2kg/m3. The level of molec-
ular dissociation for the two species N2 and O2 remains substantially very
low at temperatures in the range of 200–2900 K. Thereafter the molecular
dissociation of O2 gets accelerated with increase in temperature beyond 2900
K. And for the range of 2900–6300 K, N2 and O are predominant. Beyond
6300 K, N2 also starts getting dissociated rapidly and so the predominant
species are N and O. A graph for the same is provided on the the next page.
References
"A Rapid Method for the Computation of Equilibrium Chemical Composition
of Air to 15000 K" - Ramadas K. Prabhu and Wayne D. Erickson, NASA
Technical Paper 2792 published in March 1988.
9
Chapter 5
Algorithm Description
The algorithm for the entire computation process is listed as:
1. Input temperature (T) and density of air ρ.
2. Gather curve-fitting coefficients, aij corresponding to the input T.
3. Using the values of aij and T, compute values for Ho
i and So
i and
thereby Go
i for i = 1, 2, 3, 4, 5 or simply all the species.
4. Calculate ∆Go
j ∀ j = 1, 2, 3
5. Compute Kpj using the exponential relation and then Kj ∀ j = 1, 2, 3.
6. Invoke the requisite models as per the value of input temperature, (T).
7. Obtain the values of mole fractions of all the species.
10
Appendix
11
Figure 5.1: Sample Results ρ = 1 ∗ 10−2kg/m3
12
Figure 5.2: Regions of Applicability of Various models
Reproduced with modification from "A Rapid Method for the Computation
of Equilibrium Chemical Composition of Air to 15000 K" - Ramadas K.
Prabhu and Wayne D. Erickson, NASA Technical Paper 2792
13

More Related Content

What's hot

chemical equilibrium for iit jee
chemical equilibrium for iit jeechemical equilibrium for iit jee
chemical equilibrium for iit jeeAbhishek Choudhary
 
Thermodynamics Hw#3
Thermodynamics Hw#3Thermodynamics Hw#3
Thermodynamics Hw#3littlepine13
 
Equilibrium student 2014 2
Equilibrium student 2014 2Equilibrium student 2014 2
Equilibrium student 2014 2Abraham Ramirez
 
F.Sc. Part 1 Chemistry.Ch.03.Test (Malik Xufyan)
F.Sc. Part 1 Chemistry.Ch.03.Test (Malik Xufyan)F.Sc. Part 1 Chemistry.Ch.03.Test (Malik Xufyan)
F.Sc. Part 1 Chemistry.Ch.03.Test (Malik Xufyan)Malik Xufyan
 
Equilbrium -exercise with solutions
Equilbrium -exercise with solutionsEquilbrium -exercise with solutions
Equilbrium -exercise with solutionssuresh gdvm
 
state of matter gases and liquids
state of matter  gases and liquidsstate of matter  gases and liquids
state of matter gases and liquidssuresh gdvm
 
Heat transfer ies gate ias 20 years question and answers by s k mondal
Heat transfer ies gate ias 20 years question and answers by s k mondalHeat transfer ies gate ias 20 years question and answers by s k mondal
Heat transfer ies gate ias 20 years question and answers by s k mondalbinny 004
 
Cmc chapter 15
Cmc chapter 15Cmc chapter 15
Cmc chapter 15Jane Hamze
 
12 Gas Laws
12 Gas Laws12 Gas Laws
12 Gas Lawsjanetra
 
Cmc chapter 16
Cmc chapter 16Cmc chapter 16
Cmc chapter 16Jane Hamze
 
Chapter 5 gases reduced1
Chapter 5  gases reduced1Chapter 5  gases reduced1
Chapter 5 gases reduced1mtsaeed03
 

What's hot (17)

Hugps138
Hugps138Hugps138
Hugps138
 
Chapter 13
Chapter 13Chapter 13
Chapter 13
 
chemical equilibrium for iit jee
chemical equilibrium for iit jeechemical equilibrium for iit jee
chemical equilibrium for iit jee
 
Thermodynamics Hw#3
Thermodynamics Hw#3Thermodynamics Hw#3
Thermodynamics Hw#3
 
Equilibrium student 2014 2
Equilibrium student 2014 2Equilibrium student 2014 2
Equilibrium student 2014 2
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Tang 06 reaction rate
Tang 06  reaction rateTang 06  reaction rate
Tang 06 reaction rate
 
F.Sc. Part 1 Chemistry.Ch.03.Test (Malik Xufyan)
F.Sc. Part 1 Chemistry.Ch.03.Test (Malik Xufyan)F.Sc. Part 1 Chemistry.Ch.03.Test (Malik Xufyan)
F.Sc. Part 1 Chemistry.Ch.03.Test (Malik Xufyan)
 
Kinetic THEORY OF GASES
Kinetic THEORY OF GASES Kinetic THEORY OF GASES
Kinetic THEORY OF GASES
 
Equilbrium -exercise with solutions
Equilbrium -exercise with solutionsEquilbrium -exercise with solutions
Equilbrium -exercise with solutions
 
state of matter gases and liquids
state of matter  gases and liquidsstate of matter  gases and liquids
state of matter gases and liquids
 
gaseous state
gaseous stategaseous state
gaseous state
 
Heat transfer ies gate ias 20 years question and answers by s k mondal
Heat transfer ies gate ias 20 years question and answers by s k mondalHeat transfer ies gate ias 20 years question and answers by s k mondal
Heat transfer ies gate ias 20 years question and answers by s k mondal
 
Cmc chapter 15
Cmc chapter 15Cmc chapter 15
Cmc chapter 15
 
12 Gas Laws
12 Gas Laws12 Gas Laws
12 Gas Laws
 
Cmc chapter 16
Cmc chapter 16Cmc chapter 16
Cmc chapter 16
 
Chapter 5 gases reduced1
Chapter 5  gases reduced1Chapter 5  gases reduced1
Chapter 5 gases reduced1
 

Similar to C++ Algorithm Computes Air Composition from 200-9000K

11.a new mechanism of sodium zirconate formation
11.a new mechanism of sodium zirconate formation11.a new mechanism of sodium zirconate formation
11.a new mechanism of sodium zirconate formationAlexander Decker
 
5-Determining Equilibrium Constant General Chemistry 2
5-Determining Equilibrium Constant General Chemistry 25-Determining Equilibrium Constant General Chemistry 2
5-Determining Equilibrium Constant General Chemistry 2OliricFabiolas
 
Regression Modelling of Thermal Degradation Kinetics, of Concentrated, Aqueou...
Regression Modelling of Thermal Degradation Kinetics, of Concentrated, Aqueou...Regression Modelling of Thermal Degradation Kinetics, of Concentrated, Aqueou...
Regression Modelling of Thermal Degradation Kinetics, of Concentrated, Aqueou...Shaukat Mazari
 
Aieee 2004 chemistry
Aieee 2004 chemistryAieee 2004 chemistry
Aieee 2004 chemistryprasad1086
 
Thermodynamics numericl 2016
Thermodynamics numericl 2016Thermodynamics numericl 2016
Thermodynamics numericl 2016nysa tutorial
 
ch13_part1 (Reacting mixtures and combustion, Heating values, Gibbs function)...
ch13_part1 (Reacting mixtures and combustion, Heating values, Gibbs function)...ch13_part1 (Reacting mixtures and combustion, Heating values, Gibbs function)...
ch13_part1 (Reacting mixtures and combustion, Heating values, Gibbs function)...Mehran Bashir
 
thermodynamics numericals TSH .pptx
thermodynamics numericals TSH       .pptxthermodynamics numericals TSH       .pptx
thermodynamics numericals TSH .pptxthesciencehubprg
 
sqp313e.pdfsjsjsbsishsisjeheiejejeiejwiwjej
sqp313e.pdfsjsjsbsishsisjeheiejejeiejwiwjejsqp313e.pdfsjsjsbsishsisjeheiejejeiejwiwjej
sqp313e.pdfsjsjsbsishsisjeheiejejeiejwiwjejhumaninnocent30
 
Sample paper 3 Class xi chem
Sample paper 3 Class xi chem Sample paper 3 Class xi chem
Sample paper 3 Class xi chem Ashima Aggarwal
 
Combustion 1st question Erdi Karaçal Mechanical Engineer
Combustion 1st question  Erdi Karaçal Mechanical EngineerCombustion 1st question  Erdi Karaçal Mechanical Engineer
Combustion 1st question Erdi Karaçal Mechanical EngineerErdi Karaçal
 
Thermal Simulation of Biogas Plants Using Mat Lab
Thermal Simulation of Biogas Plants Using Mat LabThermal Simulation of Biogas Plants Using Mat Lab
Thermal Simulation of Biogas Plants Using Mat LabIJERA Editor
 
Notes for Unit 17 of AP Chemistry (Thermodynamics)
Notes for Unit 17 of AP Chemistry (Thermodynamics)Notes for Unit 17 of AP Chemistry (Thermodynamics)
Notes for Unit 17 of AP Chemistry (Thermodynamics)noahawad
 
Thermoelectric Power Studies Cu-Cd Nano Ferrites
Thermoelectric Power Studies Cu-Cd Nano FerritesThermoelectric Power Studies Cu-Cd Nano Ferrites
Thermoelectric Power Studies Cu-Cd Nano FerritesIJERA Editor
 
Thermoelectric Power Studies Cu-Cd Nano Ferrites
Thermoelectric Power Studies Cu-Cd Nano FerritesThermoelectric Power Studies Cu-Cd Nano Ferrites
Thermoelectric Power Studies Cu-Cd Nano FerritesIJERA Editor
 
General Equilibrium.ppt chemistry first year
General Equilibrium.ppt chemistry first yearGeneral Equilibrium.ppt chemistry first year
General Equilibrium.ppt chemistry first yearSarahMohammed357854
 
Introductory physical chemistry lecture note
Introductory physical chemistry lecture noteIntroductory physical chemistry lecture note
Introductory physical chemistry lecture noteBelete Asefa Aragaw
 
T16 IB Chemistry Chemical Kinetics
T16 IB Chemistry Chemical KineticsT16 IB Chemistry Chemical Kinetics
T16 IB Chemistry Chemical KineticsRobert Hughes
 

Similar to C++ Algorithm Computes Air Composition from 200-9000K (20)

11.a new mechanism of sodium zirconate formation
11.a new mechanism of sodium zirconate formation11.a new mechanism of sodium zirconate formation
11.a new mechanism of sodium zirconate formation
 
5-Determining Equilibrium Constant General Chemistry 2
5-Determining Equilibrium Constant General Chemistry 25-Determining Equilibrium Constant General Chemistry 2
5-Determining Equilibrium Constant General Chemistry 2
 
Regression Modelling of Thermal Degradation Kinetics, of Concentrated, Aqueou...
Regression Modelling of Thermal Degradation Kinetics, of Concentrated, Aqueou...Regression Modelling of Thermal Degradation Kinetics, of Concentrated, Aqueou...
Regression Modelling of Thermal Degradation Kinetics, of Concentrated, Aqueou...
 
Aieee 2004 chemistry
Aieee 2004 chemistryAieee 2004 chemistry
Aieee 2004 chemistry
 
Thermodynamics numericl 2016
Thermodynamics numericl 2016Thermodynamics numericl 2016
Thermodynamics numericl 2016
 
ch13_part1 (Reacting mixtures and combustion, Heating values, Gibbs function)...
ch13_part1 (Reacting mixtures and combustion, Heating values, Gibbs function)...ch13_part1 (Reacting mixtures and combustion, Heating values, Gibbs function)...
ch13_part1 (Reacting mixtures and combustion, Heating values, Gibbs function)...
 
thermodynamics numericals TSH .pptx
thermodynamics numericals TSH       .pptxthermodynamics numericals TSH       .pptx
thermodynamics numericals TSH .pptx
 
sqp313e.pdfsjsjsbsishsisjeheiejejeiejwiwjej
sqp313e.pdfsjsjsbsishsisjeheiejejeiejwiwjejsqp313e.pdfsjsjsbsishsisjeheiejejeiejwiwjej
sqp313e.pdfsjsjsbsishsisjeheiejejeiejwiwjej
 
Ideal gas law firs tthis one
Ideal gas law firs tthis oneIdeal gas law firs tthis one
Ideal gas law firs tthis one
 
Sample paper 3 Class xi chem
Sample paper 3 Class xi chem Sample paper 3 Class xi chem
Sample paper 3 Class xi chem
 
Combustion 1st question Erdi Karaçal Mechanical Engineer
Combustion 1st question  Erdi Karaçal Mechanical EngineerCombustion 1st question  Erdi Karaçal Mechanical Engineer
Combustion 1st question Erdi Karaçal Mechanical Engineer
 
AIPMT 2014-paper-solution-chemistry
AIPMT 2014-paper-solution-chemistryAIPMT 2014-paper-solution-chemistry
AIPMT 2014-paper-solution-chemistry
 
Thermal Simulation of Biogas Plants Using Mat Lab
Thermal Simulation of Biogas Plants Using Mat LabThermal Simulation of Biogas Plants Using Mat Lab
Thermal Simulation of Biogas Plants Using Mat Lab
 
Notes for Unit 17 of AP Chemistry (Thermodynamics)
Notes for Unit 17 of AP Chemistry (Thermodynamics)Notes for Unit 17 of AP Chemistry (Thermodynamics)
Notes for Unit 17 of AP Chemistry (Thermodynamics)
 
Thermoelectric Power Studies Cu-Cd Nano Ferrites
Thermoelectric Power Studies Cu-Cd Nano FerritesThermoelectric Power Studies Cu-Cd Nano Ferrites
Thermoelectric Power Studies Cu-Cd Nano Ferrites
 
Thermoelectric Power Studies Cu-Cd Nano Ferrites
Thermoelectric Power Studies Cu-Cd Nano FerritesThermoelectric Power Studies Cu-Cd Nano Ferrites
Thermoelectric Power Studies Cu-Cd Nano Ferrites
 
General Equilibrium.ppt chemistry first year
General Equilibrium.ppt chemistry first yearGeneral Equilibrium.ppt chemistry first year
General Equilibrium.ppt chemistry first year
 
Introductory physical chemistry lecture note
Introductory physical chemistry lecture noteIntroductory physical chemistry lecture note
Introductory physical chemistry lecture note
 
T16 IB Chemistry Chemical Kinetics
T16 IB Chemistry Chemical KineticsT16 IB Chemistry Chemical Kinetics
T16 IB Chemistry Chemical Kinetics
 
Aieee Chemistry 2004
Aieee Chemistry  2004Aieee Chemistry  2004
Aieee Chemistry 2004
 

Recently uploaded

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 

Recently uploaded (20)

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 

C++ Algorithm Computes Air Composition from 200-9000K

  • 1. A C++ algorithm for computing equilibrium chemical composition of air at temperatures 200-9000 K A REPORT by G R Krishna Chand Avatar BE (Aerospace Engineering) Punjab Engineering College, Chandigarh July 5, 2016
  • 2. Contents 1 Introduction 2 1.1 Air . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Equilibrium fundamentals . . . . . . . . . . . . . . . . . . . . 2 2 Governing Equations 4 2.1 Equilibrium equations . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Conservation equations . . . . . . . . . . . . . . . . . . . . . . 4 3 Computational models 6 3.1 Model 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.2 Model 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.3 Model 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4 Results 9 5 Algorithm Description 10 1
  • 3. Abstract The chemical composition of air drastically changes at high tempera- tures, which is triggered mainly due to molecular dissociation of diatomic nitrogen (N2) and diatomic oxygen (O2). The algorithm presented here at- tempts to compute the composition of air for the temperature range 200 – 9000 K. The constituents of air are assumed to be primarily N2, O2, O, N and NO as they are present in substantial amounts for the selected range of study.
  • 4. Nomenclature i, j : Indices ai,j : Interpolating polynomials bn : Polynomial coefficients R : Ideal gas constant (8.314 J/mol/K) ρ : Density of air (kg/m3) ∆G : Gibbs energy function (J/mol) P0 : Reference pressure (101325 Pa) T0 : Reference temperature (0 K) T : Temperature (K) Go i : Molar Gibbs energy for ith species (J/mol) Ho i : Molar enthalpy for ith species (J/mol) So i : Molar entropy for ith species (J/mol/K) σN : Mole number of nitrogen atoms σO : Mole number of oxygen atoms σi : Mole number of ith species σ : Sum of mole numbers of all species ν : Stoichiometric coefficients of any species in a chemical reaction Ki : Equilibrium constant based on mole numbers Kpi : Equilibrium constant based on partial pressures tol : Tolerance value 1
  • 5. Chapter 1 Introduction 1.1 Air Air is a mixture of gases, which at low temperatures are primarily Nitrogen, Oxygen and small amounts of argon, carbon dioxide and other gases. Since nitrogen and oxygen form almost all of the air, it is considered that the former has a presence with 79% and the latter with 21% by moles at low temperatures. Five chemically reacting species are assumed to be present in air, viz., N2, N, O, O2 and NO and designed respectively as : σ1, σ2, σ3, σ4 and σ5. Three independent chemical reactions are considered involving all the 5 reacting species which are enumerated as : O2 → 2O (1.1) N2 + O2 → 2NO (1.2) N2 → 2N (1.3) 1.2 Equilibrium fundamentals To determine whether a reaction has reached its state of equilibrium or not, a parameter known as equilibrium coefficient is defined. This equilib- rium coefficient, when expressed in terms of partial pressures of the partici- pating gaseous entities, Kp is more easily computed once the Gibbs standard energy change for the particular reaction (∆G) is calculated. Both these terms are related via the expression : Kpj = e−∆Go j /RT for any jth reaction. ∆Go for any reaction is calculated using the following expression: ∆Go = products νiGi − reactants νiGi 2
  • 6. For the reactions in the previous section, ∆Go j (j = 1,2,3) is given as under; ∆Go 1 = 2Go 3 − Go 4 ∆Go 2 = 2Go 5 − Go 1 − Go 4 ∆Go 3 = 2Go 2 − Go 1 In order to detemine ∆G, Gibbs free energy with reference to a temperature 0 K has to be computed for each of the five species that have been considered using a Gibbs energy function, Go(T). Many research organisations, notably NASA, have curve-fitted the data, using least-squares method, obtained af- ter performing rigorous experiments using a set of interpolating polynomials valid for continual temperature ranges. These values for the interpolating coefficients could be obtained from any reliable source. For our purpose, we have used the data from "A Rapid Method for the Computation of Equilib- rium Chemical Composition of Air to 15000 K" - Ramadas K. Prabhu and Wayne D. Erickson, NASA Technical Paper 2792 published in March 1988. Gibbs energy function is expressed as: Go i RT = Ho i RT − So i R Ho i RT = 5 j=1 ai,jTj−1 j + ai,6 T So i R = ai,1 log T + 5 j=2 ai,jTj−1 j − 1 + ai,7 The coefficients ai,6 and ai,7 are the itegration constants. The values of ai,6 were determined from the enthalpy of formation (taken from the JANAF Thermochemical Tables published by The Dow Chemical Co.) for all the species at the reference temperature (T0 = 0 K). The values of ai,7 were determined from the values of entropy at T = 298.15 K. 3
  • 7. Chapter 2 Governing Equations 2.1 Equilibrium equations There are three reactions which govern the equilibrium chemical compo- sition of air at various temperatures. At these temperatures, corresponding equilibrium constants in terms of the mole numbers, Ki (i=1,2,3) of the participating species for the three reactions are obtained. The reactions with their Ki’s are enumerated as: O2 → 2O; K1 = σ3 2 σ4 (2.1) N2 + O2 → 2NO; K2 = σ5 2 σ1 · σ4 (2.2) N2 → 2N; K3 = σ2 2 σ1 (2.3) As the equilibrium constants are based on mole numbers Ki of the species, they have to be expressed in terms of equilibrium constants based on partial pressures of the participating species, Kpi (i=1,2,3). This is because the latter can be easily expressed as a function of the Gibbs’ free energy change for each of the reactions as discussed in the introduction. The two types of equibrium constants are related through an expression as: Ki = Kpi · (P0/ρRT)∆N ∆N = Nmole numbers of products − Nmole numbers of reactants 2.2 Conservation equations All the species that are considered here are made of two fundamental elements, Oxygen and Nitrogen which allows for the formulation of two con- 4
  • 8. servation equations, one each for Oxygen and Nitrogen, as: 2σ4 + σ3 + σ5 = σO (2.4) 2σ1 + σ2 + σ5 = σN (2.5) One mole of diatomic species, N2 (σ1) and O2 (σ4) contributes two moles of atoms of their constituent element species. Similarly one mole of species NO (σ5) contributes one mole of Oxygen atoms and another mole of Nitrogen atoms. 5
  • 9. Chapter 3 Computational models For computation of equilibrium chemical composition of air for the tem- perature range 200–9000 K, three models are adopted for three overlapping temperature ranges. Every model includes two sets of constituent species, viz, 1. Major species : Comprises of those species which are predominant for the temperature range under study 2. Minor species : Enumerates those species whose presence is rela- tively very low The regions of applicability of the models,as presented above, strictly depends upon the value of log ρ alongwith temperature, T. The graph show- ing the same is presented on the last page of this report. The applicability (in terms of temperature ranges) of each of the models, as mentioned in its description, is particularly for the case when ρ = 0.01kg/m3. 3.1 Model 1 This model computes the composition of air in the low temperature range : 200-1600 K (or based on the value of log ρ) Here the major species are N2 (σ1) and O2 (σ4) and the minor ones are O (σ3), NO (σ5) and N (σ2). Procedure: 1. Assume initial values for mole numbers for O2 and N2 as: σ4 = σO 2 and σ1 = σN 2 2. Compute minor species as: σ3 = K1σ4 σ2 = K3σ1 σ5 = Keσ2σ3; Ke = K2 K1K3 3. Update the major species as: σ4 = (σO−σ3−σ5) 2 σ1 = (σN −σ2−σ5) 2 6
  • 10. 4. Iterate the preceding steps until convergence is achieved,i.e.,until |σ4 − σ4| ≤ tol and |σ1 − σ1| ≤ tol 3.2 Model 2 This model computes the composition of air in the median temperature range : 1600-6000 K (or based on the value of log ρ) The major species are N2 (σ1), N (σ2), O (σ3), O2 (σ4) and NO (σ5). Procedure: 1. Calculate the initial guess for σ3 using the equations as under: 2σ4 + σ3 + σ5 = σO σ4 = σ2 3 K1 σ5 = σ3 σN K2 2K1 taking σ1 = σN /2 such that : σ3 = − K1 2 (1+ σN K2 2K1 )+ K2 1 4 (1+ σN K2 2K1 )2+2σOK1 2 2. Determine values of bn : n=0,1,2,3,4 as: b0 = 2K1σ2 O b1 = (−4 + K3Ke)K1σO b2 = −8σO + 2K1 + (σO − σN )K2 − K1K3Ke b3 = 8 − K2 − 2K3Ke b4 = (8−2K2) K1 3. Compute ∆σ3 = − F F as: F = 4 n=0 bnσn 3 F = 4 n=1 nbnσn−1 3 4. Update σ3 and compute the major species as : σ3 = σ3 + ∆σ3 σ2 = σO−2 σ2 3 K1 −σ3 Keσ3 σ5 = Keσ2σ3 σ1 = (σN −σ2−σ5) 2 σ4 = (σO−σ3−σ5) 2 5. Iterate steps 3-4 till convergence for σ3 is achieved,i.e., |∆σ3| ≤ tol 3.3 Model 3 This model computes the composition of air in the relatively high tempera- ture range : 3500-9000 K (or based on the value of log ρ) The major species are N2 (σ1), N (σ2) and O (σ3); the minor ones are O2 (σ4) and NO (σ5). Procedure: 1. Assume σ4 = σ5 = 0. Take σ3 = σO. 7
  • 11. 2. σN = σN − σ5 and solving quadratically for σ2 as : σ2 = −K3 2 + (K3 2 )2 + 2K3σN 2 3. Compute major and minor species: σ1 = (σN −σ2) 2 σ4 = σ3 2 K1 σ5 = Keσ3σ2 σ3 = σO − 2σ4 − σ5 4. Take σ3 = σ3 5. Keep on iterating steps 2-4 till the following criterion is met: |σ3 − σ3| ≤ tol 8
  • 12. Chapter 4 Results The results are discussed when ρ = 1 ∗ 10−2kg/m3. The level of molec- ular dissociation for the two species N2 and O2 remains substantially very low at temperatures in the range of 200–2900 K. Thereafter the molecular dissociation of O2 gets accelerated with increase in temperature beyond 2900 K. And for the range of 2900–6300 K, N2 and O are predominant. Beyond 6300 K, N2 also starts getting dissociated rapidly and so the predominant species are N and O. A graph for the same is provided on the the next page. References "A Rapid Method for the Computation of Equilibrium Chemical Composition of Air to 15000 K" - Ramadas K. Prabhu and Wayne D. Erickson, NASA Technical Paper 2792 published in March 1988. 9
  • 13. Chapter 5 Algorithm Description The algorithm for the entire computation process is listed as: 1. Input temperature (T) and density of air ρ. 2. Gather curve-fitting coefficients, aij corresponding to the input T. 3. Using the values of aij and T, compute values for Ho i and So i and thereby Go i for i = 1, 2, 3, 4, 5 or simply all the species. 4. Calculate ∆Go j ∀ j = 1, 2, 3 5. Compute Kpj using the exponential relation and then Kj ∀ j = 1, 2, 3. 6. Invoke the requisite models as per the value of input temperature, (T). 7. Obtain the values of mole fractions of all the species. 10
  • 15. Figure 5.1: Sample Results ρ = 1 ∗ 10−2kg/m3 12
  • 16. Figure 5.2: Regions of Applicability of Various models Reproduced with modification from "A Rapid Method for the Computation of Equilibrium Chemical Composition of Air to 15000 K" - Ramadas K. Prabhu and Wayne D. Erickson, NASA Technical Paper 2792 13