24
1 ESRL Module 5. Combustion Emissions Equilibrium Considerations (CE-EQ) Prepared by F. Carl Knopf, Chemical Engineering Department, Louisiana State University Documentation Module Use Expected Learning Outcomes/Objectives Upon completion of the module, students will be able to: Combustion Emissions Equilibrium.pdf 9 Examples files 3 Student Assignments Laboratory Course - Numerical Methods -Thermodynamics Course -Kinetics Course (both undergraduate and graduate) (1) Explain how equilibrium interacts with mass and energy balances in the modeling and design of chemical reactors. (2) Apply an equilibrium model to predict emissions (product flows). (3) Identify key parameters in minimizing emissions. Introduction Emissions are broadly classified as either primary, including carbon dioxide, carbon monoxide, sulfur dioxide, particulates, and unburned hydrocarbons; or secondary, including nitrogen dioxide, and sulfur trioxide. There are environmental concerns associated with each compound: CO2 emissions with global warming; SOx with acid rain; unburned hydrocarbons with smog; particulate emissions with health effects. NOx (representing both NO2 and NO) is a precursor to ground-level smog and NOx is often a targeted emission. In this module we provide quantitative NO x emissions data via a continuous emissions monitoring system connected to a 20MW cogeneration system. There are several approaches to understanding emissions from combustion processes ranging from simple stoichiometric calculations to detailed simulations. Emission predictions can involve varying levels of sophistication and a list of prediction techniques (with increasing sophistication) includes calculations based on: a.) stoichiometry alone; b.) emission predictions based on manufacturer performance curves or manufacturer provided calculation templates; c.) thermodynamic equilibria; d.) mass and energy balances using global (empirical) reaction kinetics; e.) the same, but with thermodynamically consistent elementary kinetics rate expressions; f.) the same, but solved on the microscale using computational fluid dynamics (CFD) combined with reduced set kinetics rate expressions. The main goals of modules ESRL5 and ESRL6 are to predict and explain NO x and other emissions from the cogeneration system using c.) thermodynamic equilibria (ESRL5) and e.) thermodynamically consistent elementary kinetics rate expressions (ESRL6). The developed methodology can be applied to any combustion system.

Combustion Emissions Equilibrium2015)/Cogeneration Modules/ESRL 5. Combusti… · Combustion Emissions Equilibrium.pdf ... We provide KINSOL as an Excel callable routine which can

Embed Size (px)

Citation preview

1

ESRL Module 5.

Combustion Emissions Equilibrium Considerations (CE-EQ)

Prepared by F. Carl Knopf, Chemical Engineering Department, Louisiana State University

Documentation Module Use Expected Learning Outcomes/Objectives Upon completion of the module, students will be

able to: Combustion Emissions Equilibrium.pdf 9 Examples files 3 Student Assignments

Laboratory Course - Numerical Methods -Thermodynamics Course -Kinetics Course (both undergraduate and graduate)

(1) Explain how equilibrium interacts with mass and energy balances in the modeling and design of chemical reactors. (2) Apply an equilibrium model to predict emissions (product flows). (3) Identify key parameters in minimizing emissions.

Introduction

Emissions are broadly classified as either primary, including carbon dioxide, carbon monoxide, sulfur dioxide, particulates, and unburned hydrocarbons; or secondary, including nitrogen dioxide, and sulfur trioxide. There are environmental concerns associated with each compound: CO2

emissions with global warming; SOx with acid rain; unburned hydrocarbons with smog; particulate emissions with health effects. NOx (representing both NO2 and NO) is a precursor to ground-level smog and NOx is often a targeted emission. In this module we provide quantitative NOx emissions data via a continuous emissions monitoring system connected to a 20MW cogeneration system. There are several approaches to understanding emissions from combustion processes ranging from simple stoichiometric calculations to detailed simulations. Emission predictions can involve varying levels of sophistication and a list of prediction techniques (with increasing sophistication) includes calculations based on:

a.) stoichiometry alone; b.) emission predictions based on manufacturer performance curves or manufacturer provided

calculation templates; c.) thermodynamic equilibria; d.) mass and energy balances using global (empirical) reaction kinetics; e.) the same, but with thermodynamically consistent elementary kinetics rate expressions; f.) the same, but solved on the microscale using computational fluid dynamics (CFD)

combined with reduced set kinetics rate expressions. The main goals of modules ESRL5 and ESRL6 are to predict and explain NOx and other emissions from the cogeneration system using c.) thermodynamic equilibria (ESRL5) and e.) thermodynamically consistent elementary kinetics rate expressions (ESRL6). The developed methodology can be applied to any combustion system.

2

Depending on your background these modules may contain several new concepts. But the concepts and provided tools will be very useful your entire engineering career. Learning Objectives - upon completion of ESRL 5 and ESRL 6 you will be able to: 1.) Use KINSOL from Lawrence Livermore National Laboratory (Collier et al., 2008) to solve Nonlinear Equation sets (NLEs). We provide KINSOL as an Excel callable routine which can be easily and permanently added to your computer software suite for future use. 2.) Perform thermodynamic equilibrium calculations to predict emissions from methane combustion in a cogeneration system or products from any combustion system. The thermodynamic equilibrium calculations will follow the commercial code approach for both physical property estimation and solution methodology (including the use of KINSOL). 3.) Use of CVODE from Lawrence Livermore National Laboratory (Collier et al., 2008) to allow solution of stiff Ordinary Differential Equations (ODEs). We provide CVODE as an Excel callable routine which can be easily and permanently added to your computer software suite for future use. 4.) Construct thermodynamically consistent elementary kinetics rate expressions to predict emissions from gas turbine systems or any combustion system. Solution of these rate expressions will follow the commercial code approach for both physical property estimation and solution methodology (including the use of CVODE). 5.) Explain the limitations of thermodynamic equilibrium calculations and thermodynamically consistent elementary kinetics rate expressions for predicting emissions from combustion systems. 6.) Understand and use GRI-Mech 3.0 (Smith et al, web site) to model natural gas combustion, including NO formation and reburn chemistry. We provide a complete GRI-Mech 3.0 kinetics program along with calls to both Perfectly Stirred Reactors (PSRs) and Plug Flow Reactors (PFRs). We provide GRI-Mech 3.0 as an Excel callable routine which can be easily and permanently added to your computer software suite for future use.

Emissions Prediction - Combustion Equilibrium Calculations It would seem reasonable for us to predict that combustion reactions are “fast” so equilibrium at the given/measured temperature should be quickly reached. If the combustion process reaches equilibrium we can calculate the equilibrium composition of the products at system temperature and pressure. Here we will need physical properties of the reactants, products and key radical species. Physical properties for species of interest in combustion processes are often obtained from the JANAF Tables (thermochemical database of the National Institute of Standards Technology).

3

When we combust any hydrocarbon, or hydrocarbon mixture, the major reaction will be hydrocarbon + oxygen Ø carbon dioxide + water. As the combustion temperature increases above 1000 C dissociation reactions of the gases become important. For natural gas combustion, and as a final part of module ESRL6, we will explore results when working with 53 species and 325 reactions (GRI-Mech 3.0). But for now, let us use the simplified elementary reaction set in Table 1 for methane combustion at high temperature. Trends using Table 1 reactions will be similar to trends from GRI-Mech 3.0. In Table 1 the first 3 reactions are the Zeldovich mechanism and the last four reactions are adapted from Tsuji et al., 2003. Table 1 Simplified methane combustion elementary reaction set, forward reaction rate constants / Reactions A (g-

mol,cm3,s) (T in K) (cal/g-mol)

⇔ 2.70 E+13 0 355 ⇔ 9.00 E+09 1.0 6500 2 ⇔ 1.20 E+17 -1.0 0 ⇔ 3 0.30 E+9 2.0 30,000 2 ⇔ 2 4 0.44 E+12 3.0 30,000 2 ⇔ 2 0.68 E+16 1.0 20,000 ⇔ 0.275 E+10 0.5 20,000

Equilibrium Composition Calculation as Often Found in Textbooks: Often in textbooks, the discussion of equilibrium composition calculations with a given reaction set (as in Table 1) will include defining as variables: the moles of each species in the product stream (the equilibrium composition) and an extent of reaction for each reaction. The feed stream composition is always known. The species material balances (out – in = 0) will have more variables than equations. The missing needed equations are obtained from the equilibrium constant for each reaction which can be calculated using the Gibbs free energy for each species in each reaction. Variations of this approach can include using atomic balances to replace the extent of reactions, but the equilibrium constants will still be needed. It may be difficult for us to see right now, but this “textbook approach” is actually straightforward to implement and it will work for carefully chosen simple reaction sets. But as the reaction set complexity grows, this textbook approach will not work. A different approach is used in the commercial equilibrium programs. It is actually no more difficult to implement the commercial approach compared to the textbook approach – we will develop the commercial approach. Before we leave this discussion let us quickly see some of the problems trying to use the “textbook approach” to find the equilibrium composition for the reaction set in Table 1. First recall that the number of independent reactions is generally found (see Reklaitis, 1983) as the number of species minus the rank of the atomic matrix (which is generally the number of elements). Here there are 10 species ( , , , , , , , , , ), and 4 elements ( , , , ), giving 10 – 4 = 6 reactions, but 7 reactions are supplied. You can see that 2r4 – r6 = r5. Even if we “clean-up”

4

the reaction set and try the textbook approach with extents of reaction, our formulation may show little movement from any starting guess we supply – we may not get the correct answer for the equilibrium composition! So how do we best find the composition leaving a combustion system? There are actually two different commercial approaches to finding the composition leaving a combustion system:

Approach I (ESRL5.) – finds the equilibrium composition based on thermodynamic equilibrium calculations which minimize Gibbs free energy for the system (Module Learning Outcomes 2). Approach II (ERSL6.) - uses thermodynamically consistent elementary kinetics rate expressions (Module Learning Outcomes 4) to find the time evolution of our emissions species from our selected reactor type. With long reactor residence time we can obtain the equilibrium composition. Approach II will be especially important if we do not actually reach equilibrium in our combustion process.

Approach I - Equilibrium Calculations Minimizing Gibbs Free Energy: Development of Needed Equations

For a reacting system, Gibbs fundamental form for the change in the total free energy of the system, (in Btu, Cal, or J), can be expressed as, (1)

where is the total number of moles in the system, is the molar entropy, the molar volume,

is the chemical potential of species ( is defined below) and is the change in moles of species due to reaction. At equilibrium, with constant temperature and pressure one can write, (2)

Direct calculation of numerical values for the chemical potential is impossible. But the chemical potential, , can be written in terms of fugacity (Lewis) as,

(3)

where in Equation (3), as well as subsequent equations, the superscript 0 indicates evaluation at the standard state reference pressure, which here is 1 standard atmosphere (or 1 bar); is the fugacity of species ( is defined below); is the standard state fugacity; and, is the standard

5

molar free energy of pure species . is a function only of temperature and the standard state fugacity = 1 atm (or 1 bar). The species standard state reference pressure (1 atm or 1 bar), will not affect enthalpy values, but the choice can affect entropy and Gibbs energy calculations for some reactions involving gases (Wagman, 1992). For our combustion work we just need to make sure we use the same units for both and to ensure the ln ( ) is dimensionless. The fugacity is related to the partial pressure, ( ), by (4)

where is the fugacity coefficient for species . For ideal gas mixtures = 1 and for non-ideal systems can be calculated from an equation of state for the mixture. For many combustion processes of industrial interest (gas turbines, furnaces, etc.), the pressure is usually low enough to allow ≅ 1. For high-pressure systems, for example ammonia production, ≠ 1 and an equation of state for the gas mixture should be used to determine . Combining Equation (2) and Equation (3) we can write the total Gibbs free energy for the system, as,

,

ln (5)

where , is the pure species molar free energy at the system and reference pressure ( = 1

atm or 1 bar) and using Equation (4) we can write,

ln ln ln (6)

The units on should match the reference pressure and if the pressure is low we can neglect the species fugacity coefficients as ~ 1.0,

ln ln (7)

By thermodynamic definition the Gibbs free energy (or Gibbs energy) equation for each species is, ≡ (8)

where is the molar free energy of species at the temperature T and at the standard state reference pressure; is the molar enthalpy of species , and is the molar entropy of species , both at T (and 1 atm or 1 bar). It is often useful to keep track of temperature which when needed can be added as a subscript,

6

, ≡ , , (9) We can write,

, , , (10)

and,

, ,, ln

here with the requirement = = 1 atm (or 1 bar),

, ,, (11)

where , and , are respectively the species standard molar enthalpy of formation from its elemental species and standard molar entropy of formation from its elemental species at the reference temperature ( 298.15 ); , is the molar heat capacity of each species , and the integration limits are to . We can use Equation (10) and Equation (11) to calculate . Equations (10) and (11) show that is only a function of temperature at the standard state reference pressure. A convenient approach for computer implementation of Equations (10) and (11) is provided by Prothero (1969) – here a polynomial expression for a species molar heat capacity, , is fit to data from the JANAF tables. This heat capacity, when combined with the species standard heat of formation from its elements, , . , and standard entropy of formation from its elements,

, . , allow determination of needed thermodynamic properties. A fit (Prothero (1969)) of the JANAF Thermodynamic Table for species molar heat capacity at constant pressure, , , is provided in Equation (12) with values in Table 2,

, . . . 0.3 2 (12) In Equation (12) 10 . And for the coefficients , the temperature range is 300 to 2000 K which is appropriate for gas turbine other industrial combustion applications. The coefficients for selected species of importance in combustion processes and their standard enthalpy of formation and absolute entropy of formation are provided in Table 2. In Table 2, , . is not the standard molar entropy of formation but rather the absolute molar entropy of formation for each species based on these values = 0 at = 0 K. In Example #4 we show that either the absolute, or standard, molar entropy of formation for each species can be used with the Gibbs free energy formulation and identical results will be obtained for the equilibrium composition.

7

Table 2 Species coefficients (for Eq. (12)), , . , and absolute , . values, Prothero (1969)

CH4 7.918404 -11.41722 63.73457 -75.25691 C2H6 2.387968408 34.57751611 2.497260449 -18.36373457 C3H8 6.8008 28.71 62.349 -107.19

n-C4H10 -39.772 412.9 -991.74 1325 NH3 7.0405 1.2091 18.33 -23.991 N2 7.709928 -5.503897 13.12136 -11.67955 O2 7.361141 -5.369589 20.54179 -25.86526

CO2 4.324933 20.80895 -22.9459 16.84483 H2O 7.98886 -1.506271 6.661376 -4.65597 CO 7.812249 -6.668293 17.28296 -17.28709 NO 8.462334 -10.40669 27.54876 -30.28119 H2 6.183042 4.710657 -10.92135 12.54086 OH 7.6151 -1.936 0.877 2.6153 H 4.968 0 0 0 O 5.974134 -4.241883 7.931254 -7.94423 Ar 4.9681 0 0 0

N2O 4.826714 20.13927 -22.13612 15.85518

, .

(cal/mol) , .

(cal/mol-K) CH4 43.29269 -12.56732 1.469695 -17895 44.49

C2H6 10.38081242 -2.320482071 0.171401034 -20033.4608 54.9713 C3H8 69.802 -21.101 2.4476 -24891 64.355

n-C4H10 -926.75 317.38 -42.031 -30183 74.045 NH3 15.183 -4.9496 0.65337 -10970 46.033 N2 5.233997 -1.173185 0.103883 0 45.77 O2 15.94566 -4.85889 0.5861501 0 49.004

CO2 -7.935665 2.121672 -0.2408713 -94054 51.072 H2O 1.696464 -0.3706212 0.03992444 -57798 45.106 CO 8.860125 -2.314819 0.2447785 -26417 47.214 NO 17.18511 -4.95726 0.5755281 21580 50.347 H2 -7.016263 1.923395 -0.2084091 0 31.208 OH -2.6909 0.97789 -0.12695 9432 43.88 H 0 0 0 52100 27.392 O 4.403357 -1.271341 0.1491408 59559 38.468 Ar 0 0 0 0 36.983

N2O -7.265313 1.897833 -0.2117446 19610 52.546

(1) Enthalpy reference temperature = 298.15K; standard state pressure = 1 atm; , . = absolute entropy for each species

based on these values = 0 at T = 0K.

The first commercial approach Approach I (ESRL5) (from page 4) to determine equilibrium composition is minimization of the total Gibbs free energy for the system. Directly using an optimization code would be attractive here! But in practice, optimization codes often fail to produce good results especially as the number of species/trace species in the problem grows. For the Gibbs minimization problem, optimization codes can also be sensitive to the initial guess supplied by the user – it is often difficult to converge to the correct equilibrium composition. Gautam and Seider (1979) and Zhang (2011) provide reviews of optimization methods that can be used in the computation of phase and composition equilibrium. The commercial approach generally solves the minimization problem using Lagrange multipliers and Non-Linear Equation (NLE) solvers. Convergence to the correct equilibrium composition is more robust using NLE

8

solvers than using optimization codes provided some experience/guidance. We provide that experience in this module.

Approach I - Equilibrium Calculations Minimizing Gibbs Free Energy Minimization via Lagrange Multipliers

We have shown that the total Gibbs free energy for the system, , with the ideal assumption,

= 1.0, (Equation (7)) is,

ln ln (13)

The minimization of Equation (13) is constrained by the elemental balances on the species,

, 1, . . . . . . . .,

(14)

where , represents the number of atoms of element in species and represents the total number of atoms of element in the reaction feed. Simply stated, Equation (14) conserves atoms. Lagrange Multipliers The method of Lagrange multipliers converts the objective function in Equation (13) and the constraints provided in Equation (14) to the following unconstrained optimization problem, , ln ln

, (15)

This unconstrained function, , , is termed the Lagrangian function (Equation (15)) and the

’s are unspecified parameters called Lagrange multipliers. The standard solution procedure is to take the partial derivative of (Equation 15) with respect to each variable, here the ’s, and set each equation = 0. This equation set is then augmented with the original constraint equations ∑ , 0; 1, . . . . . . . ., to give N non-linear equations with N unknowns which we can simultaneously solve using a NLE solver – here we provide the NLE solver KINSOL (Collier et al., 2008). KINSOL may be the best available program to solve NLEs; it has been decades in development at LLNL and it is open source. We provide KINSOL as a dll callable from Excel with both 32 bit and 64 bit versions.

9

KINSOL Installation (both 32- and 64-bit versions are provided) In all likelihood your computer has a 64 bit operating system, but there are two possible versions of Microsoft Office that may be installed on your computer. You must determine if your version of Office and consequently Excel is 32 bit or 64 bit. NOTE: most of the computers in the department are 32 bit. The Downloads Folder on our web site www.esrl.lsu.edu provides both 32 bit and 64 bit versions of KINSOL as Kinsol_Excel.dll (as well as the source code); you just need to copy the appropriate dll from the appropriate subfolder (32 bit or 64 bit) and paste it along-side the provided Excel files for this module. The module currently contains the 64 bit version of Kinsol_Excel.dll. Example 1 Equilibrium Composition from Minimization of Gibbs Free Energy – Equation Development for the Ammonia Reaction The classic example demonstrating Gibbs Free Energy minimization is ammonia production from nitrogen and hydrogen. The overall reaction is, 3 2

The reaction is industrially very significant and industrially the reaction is run at high pressures. To be accurate we should use Equation (6) and include , but for Example 1 we use the ideal assumption, = 1.0. The reaction has a change in moles which can be used to demonstrate Le Chatelier's principle. Following Equation (15) we can write,

, , , ,

ln ln

2 3 2 3

2 1 2 1

(16)

unless indicated with the superscript feed, all the terms in Equation (16) are taken at the equilibrium composition, and outlet and . Here the term in parentheses following is simply

the hydrogen (H) elemental balance, given as H products – H feed = 0, 2 3

2 3 0.

Taking the partial derivatives,

10

, ln ln 2 0

or ,

ln 2 0 (17)

and from

,

, and the constraint equations we obtain,

,

2 0 (18)

,

3 0 (19)

3 2 3 2 0 (20)

2 3 2 0 (21)

The Lagrange function has 5 unknowns, , , , and and solution for these five unknowns can be determined from simultaneous solution of Equations (17) – (21). Example 2 Equilibrium Composition from Minimization of Gibbs Free Energy – Solution for the Ammonia Reaction using KINSOL In Example 1 we developed the Lagrange multiplier solution for the Gibbs Free Energy minimization for ammonia production from nitrogen and hydrogen under the ideal gas assumption. Here we want to detail how KINSOL can be used to obtain solution. The Lagrange multiplier solution of the Gibbs free energy minimization problem is conceptually easy. All the individual terms in Equation (16) are available and the partial derivatives are straightforward to obtain (see Example 1). A difficulty with this approach is that as falls to trace species levels KINSOL (and other NLE solvers) may have difficulty obtaining solution. For KINSOL the lower limit on is ~10 before numerical difficulties set in. Open the provided Excel file GFE – Ammonia.xlsm. You can change anything in BLUE on the sheet. In the feed (Column B) O2 is just a placeholder in this example. Go to the VBA code (Alt F11 and Module 1).

11

KINSOL will keep track of the 5 variables in this problem as x(0)- x(4). KINSOL will also keep track of the five equations (Equations (21) – (25)) as eq(0)- eq(4). In the code we assign: N_H2_out = x(0) N_N2_out = x(1) N_NH3_out = x(2) Lamda_H = x(3) Lamda_N = x(4) The partial derivative of the Lagrangian function with respect to (Equation (17)) is ' GFE for H2 If N_H2_out > 10 ^ -22 Then eq(0) = G_out(11) / (R_gas * T_out) + Log(N_H2_out * P_out / N_Total_out) - 2*

Lamda_H / (R_gas * T_out) Else: N_H2_out = 0 End If The index (e.g., for G_out) refers to the components in the order of Table 2 (which is also the order of the components in the Table of the Excel file), starting with index “0”. In other words, G_out(11) is the Gibbs free energy at “out” (equilibrium) for H2. Here in the VBA code if > 10 we use Equation (17) and if 10 we set = 0. The elemental balance for H (Equation (20)) is written, ' Elemental Balance H: eq(3) = (3 * N_NH3_out + 2 * N_H2_out) - 2 * N_H2_in On the Excel sheet, we provide an initial guess for each variable in cells F23:F27. In cells C23:C27 and E23:E27 we supply upper and lower bounds for each variable. Some experience may be needed to determine bounds on the Lagrangian multipliers and and we will help with this in the Examples and Student Assignments. In order to solve the equilibrium problem we must supply feed stream information (Cells B4:B11). Here we do NOT have NH3 in the feed, but we have placeholder for NH3 in the feed which will be explored in the next example. We must supply 2 system specifications. These specifications are typically and which are specified in cells F4 and B11, respectively. When providing a known/fixed be sure the Flag in cell F16 = 0. Thermodynamic data are provided in cells A51:U112. In cells A53:U70, species properties are calculated at . In cells A74:U91, species properties are calculated at . And in cells A95:U112, species properties are calculated at . The species properties actually used in this example are highlighted in grey. To run KINSOL invoke the Macro GFE. You will notice that cell B12 provides the enthalpy in for the selected (here only depends on not because of the ideal gas assumption) and cell F8 provides the outlet enthalpy for the

12

selected and . depends only on but we need in Equations (17) – (19). The enthalpy difference ( – ) is the energy needed/ removed from the system. An alternative specification is and an adiabatic system where – = 0. Here the user can simply set the Flag in cell F16 = 1. The adiabatic outlet temperature will be determined, but be sure a reasonable trial is provided in cell F4. Setting the Flag in cell F16 = 1 may not work – depending on the trial chosen and the feed composition. Before you move to Example 3 see if you can reproduce Figure 1. Be sure you convert the temperature units in the Figure. Here you will be specifying so be sure the Flag in cell F16 = 0.

Figure 1 Plot of the effects of temperature and total pressure on the percentage of ammonia present in an equilibrium mixture of N2, H2, and NH3. Each mixture was produced by starting with a 3:1 molar mixture of H2 and N2. Source of Fig.1 web site: wps.prenhall.com/wps/media/objects/3312/3391885/blb1506.html Example 3 Equilibrium Composition from Minimization of Gibbs Free Energy – Solution for the Ammonia Reaction using KINSOL An interesting question – in Example 2 we used a feed of 3 to 1 hydrogen to nitrogen which was guided by the overall reaction kinetics. What if we tried to solve the equilibrium problem with only ammonia in the feed? The solution can be found using the Excel file GFE – NH3.xlsm Can you reproduce Figure 1 from a pure ammonia feed? Again you will be specifying so be sure the Flag in cell F16 = 0. Do you think the feed composition is always independent of final equilibrium composition? We will explore this in Example 5. Hint: What is the difference between an adiabatic operation and a fixed/known in the GFE minimization process?

13

Do look at the VBA code. You will see GFE – NH3.xlsm is a little more general than the code in Example 1 as we are now accounting for the possibility of N2, H2, and NH3 in the feed. Example 4 Equilibrium Composition from Minimization of Gibbs Free Energy – Solution for the Ammonia Reaction using KINSOL and the Standard Entropy of Formation In Examples 2 and 3 we developed the Lagrange multiplier solution for the Gibbs Free Energy minimization of ammonia production from nitrogen and hydrogen. We used thermodynamic data from Table 2 which included the absolute entropy of formation for each species. These data were found in cells A51:U112. Recall that by thermodynamic definition, the Gibbs free energy (or Gibbs energy) equation (Equation (8)) for each species is, ≡ . The Gibbs equations leads natural to the specification of standard entropy of formation values. Table 3 provides values for and and using the Gibbs energy equation we can calculate values for each species. Table 3 Species , . , , . from NIST-JANAF and TRC Tables, with calculated

standard , . values , and with standard state pressure = 1 bar.

, .

(J/mol) , .

(J/mol) , .

(cal/mol) , .

(cal/mol) , .

(cal/mol-K) CH4 -74873 -50768 -17883.1 -12125.7 -19.3103

C2H6 -83820 -31855 -20020.1 -7608.4 -41.6288 C3H8 -104680 -24290 -25002.4 -5801.6 -64.3999

n-C4H10 -125790 -16570 -30044.4 -3957.7 -87.4954 NH3 -46110 -16450 -11013.2 -3929.0 -23.7605 N2 0 0 0.0 0.0 0.0000 O2 0 0 0.0 0.0 0.0000

CO2 -393522 -394389 -93991.1 -94198.2 0.6945 H2O -241826 -228582 -57759.1 -54595.9 -10.6097 CO -110527 -137163 -26398.9 -32760.8 21.3379 NO 90291 86600 21565.6 20684.1 2.9568 H2 0 0 0.0 0.0 0.0000 OH 38987 34277 9311.9 8186.9 3.7731 H 217999 203278 52068.2 48552.1 11.7929 O 249173 231736 59513.9 55349.2 13.9687 Ar 0 0 0.0 0.0 0.0000

N2O 82048 104179 19596.8 24882.7 -17.7290

(1) , . and , . values in black are from NIST-JANAF Thermodynamic Tables and values in green are from

TRC Thermodynamic Tables.

In Table 3, values for the standard heats of formation from elemental species, , . , are in agreement with those values reported in Table 2. The slight numerical differences can be attributed to newer data being available in Table 3. In Table 3 we have calculated , . =

, . , . ⁄ . The values for , . in Table 3 do not agree with those found in Table 2. Table 3 provides , . values which are the species standard molar entropy of formation from its elemental species at the reference temperature of 298.15K. Notice that

, . = 0 (as well as , . and , . ) for elemental species N2, O2, H2 and Ar.

14

Show yourself that you can replace the absolute molar entropy of formation with the species standard molar entropy of formation in the Excel file GFE – NH3.xls and you will obtain identical results. Just replace the , . values for N2, H2, and NH3 in the Excel sheet with the values highlighted in red in Table 3. In case there are any problems the solution can be found in the Excel file GFE – NH3 StdS.xlsm Engineers who work with often prefer the use of standard entropy of formation values (Telotte, 2012). However Chemkin, which is the current industry standard for combustion calculations, utilizes the Gibbs free energy equation with absolute entropy of formation values. We decided to follow the Chemkin convention for equilibrium calculations throughout this module (except for Example 4). Example 5 Equilibrium Composition from Minimization of Gibbs Free Energy – The Elementary Reaction of 2NO2 = 2NO + O2 An interesting example/problem to try on your own is the reaction of nitrogen dioxide to nitric oxide and oxygen. It is difficult to find an elementary reaction with known rate kinetics (Table 4, Westly (1980)) and one in which a change in moles occurs. The few elementary reactions with a change in moles tend to favor the forward or reverse kinetics making it difficult to observe pressure effects (Le Chatelier's principle). Table 4 Nitrogen Dioxide elementary reaction set, forward reaction rate constants /

Reaction A (g-mol,cm3,s) (T in K) (cal/g-mol) 2 ⇔ 2 2.0 E+12 0 26,824.5

A start solution file is supplied, GFE – NO2 Start.xlsm, which contains all the needed thermodynamic properties and all the VBA code accessing the thermodynamic properties. In the provided Excel file the thermodynamic properties of NH3 have been replaced with the properties of NO2. In this file Argon in the feed is just a placeholder. You will need to supply the Lagrange multiplier equations to the VBA code. The code fixes the

variable definitions and in the code I have supplied the

.

If N_NO2_out > 10 ^ -22 Then eq(0) = G_out(4) / (R_gas * T_out) + Log(N_NO2_out * P_out / N_Total_out) – Lamda_N / (R_gas * T_out) - 2 * Lamda_O / (R_gas * T_out) Else: N_NO2_out = 0 End If

You need to supply the 4 missing equations for

,

,

in the indicated locations

in the code. Once you have completed these code additions you should be able to reproduce Table 5 below which compares results from the GFE minimization to results from the Gibbs Reactor in the commercial flow sheeting program Hysys. Here use the adiabatic GFE process; Flag =1 in cell F16.

15

If needed you can check your solution with the provided file GFE – NO2.xlsm Table 5 Comparison of our Adiabatic GFE Minimization and Hysys Gibbs Reactor for the Reaction2 ⇔ 2 as a Function of System Pressure (1, 10, and 50 atm)

Feed GFE Hysys GFE Hysys GFE Hysys T (K) 366.5 770.47 766.0 867.76 843.9 906.93 904.3

P (atm) 1 1 1 10 10 50 50 NO2 (mol) 0 323.88 325.48 388.74 391.5 476.14 444.75 NO (mol) 1000 676.12 674.52 611.25 608.5 523.85 555.25 O2 (mol) 500 338.06 337.26 305.67 304.25 261.93 277.62

There is good agreement between the results from our adiabatic GFE Minimization and the adiabatic Hysys Gibbs reactor using the Peng-Robinson equation of state (reference). At 50 atm our calculation results are similar to Hysys but the Hysys Gibbs reactor actually indicates the products are liquid phase. Our calculations are based on the assumption of ideal gas vapor phase conditions and we do not account for the possibility of multiple phases. Gibbs calculations with multiple phases are difficult – in fact if you isolate the Hysys determined product stream at 50 atm (as a new stream), the Hysys program will indicate the stream is vapor phase (not liquid). Before you leave Example 5 explore the adiabatic GFE process with the feed steam containing only NO2. Results are shown in Table 6 and the empty columns indicate no solution is obtained with our GFE minimization formulation. Can you explain what is happening? Table 6 Comparison of Adiabatic GFE Minimization and Hysys Gibbs Reactor for the Reaction2 ⇔ 2

Feed GFE Hysys GFE Hysys T (K) 366.5 364.1 381.59

P (atm) 1 1 10 NO2 (mol) 1000 998.35 998.73 NO (mol) 0 1.65 1.27 O2 (mol) 0 0.83 0.64

Answer: NO2 is the favored product at the feed temperature. For further clarification, do show yourself that if we use the Flag = 0 option in cell F16 to fix the outlet temperature at say 867.76 K (cell F4) and P = 10 atm (cell B11) we will obtain compositions identical to those found in Table 5. To address the GFE minimization problem in Table 6, we could explore improving our adiabatic temperature search engine which is currently a simple secant method.

16

Take Home Messages for Gibbs Free Energy Minimization Examples 1 - 5 1.) There is no use of reactions in GFE minimization. We do not need to know the reaction kinetics in order to solve for the equilibrium composition. We do need to know the expected products. 2.) We generally know the moles of each species in the feed but….

a.) We saw in Examples 2 and 3 and Example 5 (see paragraph after Answer) that the species in the feed do not matter provided the outlet temperature is fixed – we just need to account for the atoms in the feed. b.) We saw in Example 5 that for an adiabatic GFE minimization process the species in the feed do matter (compare results in Table 5 to Table 6).

3.) We do not need to know and unless we are solving the adiabatic equilibrium problem. 4.) For GFE minimization calculations we will generally need to make two specifications such as:

i.) specification of and . ii) and = 0 (adiabatic process). Here to close the energy balance we will also need to know . is not used in ideal enthalpy calculations.

5.) We saw in Example 4 that the entropy reference state “subtracted” out of the minimization problem. 6.) The careful reader may be concerned with our entropy term; there is no entropy of mixing used here (in Equation (8) or (11)). In the calculations of the Examples each species is at the standard state reference pressure. The species are not at their partial pressure in a mixture; each species is separate and each is at the reference pressure.

Equilibrium Combustion Calculations Minimizing Gibbs Free Energy Example 6 Equilibrium Composition from Minimization of Gibbs Free Energy - Simplified Methane Combustion Reaction Set in Table 1 Solve for the equilibrium composition for the combustion reaction set provided in Table 1. Account for all species including methane. The solution can be found in the Excel file GFE - Combustion.xls. In all the provided Excel files for combustion equilibrium we use data from Table 1, but with data for n-C5H12 substituted for NH3; pentane is a more appropriate species for our combustion studies. In the Excel sheet the reader can see our feed is methane and air (as nitrogen and oxygen). We also introduce a very small amount of Argon which has no impact on the problem solution. This Argon is a “placeholder” on the Excel sheet and in Student Assignment #2 we will replace Argon with water in the feed. The reader should carefully examine the provided derivatives in the VBA code and problem solution to confirm the mechanics of these Gibbs free energy minimization techniques. Note in

17

the solution that the moles for each species are above 10 . Also try changing the starting guess and the bounds on the variables (in the KINSOL solution) to see the impact on the final solution. ■ Closing Remarks We have explored equilibrium reaction calculations / equilibrium combustion calculations and particularized our solution method to Gibbs free energy minimization. The important feature of GFE equilibrium calculations is that the species leaving any reaction process can be determined (the equilibrium composition) without knowledge of the actual reaction chemistry. The reader interested in additional details of equilibrium calculations is referred to the text by de Nevers (2002). Equilibrium composition determination can be important for many emerging energy systems including biomass combustors, syngas systems (including coal gasification and steam reforming of natural gas to generate hydrogen) and geothermal applications were salt precipitation may be of concern (see References / Additional Readings). Our primary interest is estimating species emissions from combustion systems. In module ESRL5 we are utilizing equilibrium calculations and in module ESRL6 we will combine elementary kinetics rate expressions and equilibrium constants to obtain combustion species concentrations. Acknowledgements This work was completed as part of the National Science Foundation Phase II grants: NSF Award 0716303 “Integrating a Cogeneration Facility into Engineering Education” (September 2007 – 2012); and NSF Award 1323202 “Collaborative Proposal: Energy Sustainability Remote Laboratory” (September 2014 – 2016).

18

References/ Additional Reading Chase, M.W., C.A. Davies, J.R. Davies, D.J. Fulrip, R.A. McDonald, and A.N. Syverud, JANAF Thermochemical Tables, (3rd edition), J. Phys. Chem. Ref. Data 14: Suppl. 1 (1985). Collier, A.M., A.C. Hindmarsh, R. Serban, and C.S. Woodward. “User Documentation for KINSOL v2.6.0,” Technical Report UCRL-SM-208116, LLNL (Lawrence Livermore National Laboratory), (2008). de Nevers, N. Physical and Chemical Equilibrium for Chemical Engineers. John Wiley and Sons, New York, NY (2002). Gordon, S., and B.J. McBride. “Computer Program for Calculation of Complex Chemical Equilibrium Compositions and Applications I. Analysis” NASA Reference Publication 1311 (National Aeronautics and Space Administration), (October, 1994). Gautam R. and W.D. Seider. Computation of Phase and Chemical Equilibrium: Part 1. Local and Constrained Minima in Gibbs Free Energy. AIChE Journal. 25(6): 991-999 (1979). Hindmarsh, A.C., and R. Serban. “Example Programs for CVODE v2.6.0,” Technical Report UCRL-SM-208110, LLNL (Lawrence Livermore National Laboratory), (2009). Kelly, C.T. Solving Nonlinear Equations with Newton’s Method. SIAM, Philadelphia, PA (2003). Knopf, F.C. Modeling, Analysis and Optimization of Process and Energy Systems. Wiley, Hoboken, NJ (2012). Miller, J.A. and C.T. Bowman. Mechanism and Modeling of Nitrogen Chemistry in Combustion. Progress in Energy and Combustion Science. 15: 287-338 (1989). Prothero, A. Computing with Thermochemical Data. Combustion and Flame. 13: 399-408 (1969). Punuru, J., personal communication (2011). Reklaitis, G.V. Introduction to Material and Energy Balances. Wiley, New York (1983). Reynolds, W.C., “The Element Potential Method for Chemical Equilibrium Analysis: Implementations in the Interactive Program STANJAN,” Department of Mechanical Engineering, Stanford University (1986). Rodriguez-Toral, M.A. “Synthesis and Optimization of Large-Scale Utility Systems.” Ph.D. dissertation, The University of Edinburgh (1999). Rodriguez-Toral, M.A., W. Morton, and D.R. Mitchell. Using new packages for modeling, equation oriented simulation and optimization of a cogeneration plant. Computers and Chemical Engineering. 24: 2667-2685 (2000).

19

Smith, G.P., D.M. Golden, M. Frenklach, N.W. Moriarty, B. Eiteneer, M. Goldenberg, C.T. Bowman, R.K. Hanson, S. Song, and W.C. Gardiner, V.V. Lissianski, and Z. Qin. http://www.me.berkeley.edu/gri_mech/. Smith, J.M., H.C. Van Ness, and M.M. Abbott. Chemical Engineering Thermodynamics (6th edition). McGraw Hill, New York, NY (2001). Wagman, D.D. Data Bases: Past, Present and Future. Pure and Applied Chemistry. 64(1): 37-48, (1992). Westly, Francis. Table of Recommended Rate Constants for Chemical Reactions Occuring in Combustion. The National Bureau of Standards NSRDS-NBS 67 (1980). Zeldovich, Y.B. The Oxidation of Nitrogen in Combustion Explosion. Acta Physicochimica USSR 21: 577-628 (1946). Zhang, H., A. Bonilla-Petriciolet, and G.P. Rangaiah. A Review on Global Optimization Methods for Phase Equilibrium Modeling and Calculations. The Open Thermodynamics Journal. 5(Suppl 1-M7): 71-92 (2011).

20

Student Assignments

Figure A1 shows the main components of an aeroderivative-type gas turbine cogeneration system for electricity and steam generation. These components include: an air compressor, combustion chamber, gas turbine for air compression, power turbine for electricity generation and, a heat recovery steam generator for steam production. For this module we are primarily interested in the combustion chamber – that is where the emissions are created.

Figure A1 Gas turbine cogeneration system – air cooler, gas turbine and HRSG The seven key steps in the cogeneration process are:

1. Ambient air (shown as state 0 in Figure A1) is sent through a heat exchanger (the Air Cooler) to adjust its temperature to a nominal 60 F (state 1). Chilled water is used as the cold fluid in the Air Cooler. The incoming air is adjusted to 60 F prior to entering the air compressor in order to help maintain turbine efficiency. Chilled water is often needed and design conditions for the Air Cooler actually assume an average ambient air temperature of 87.5 F (state 0).

2. The cooled air is then sent to the Compressor to increase pressure (state 2).

3. Natural gas, compressed air, and injected steam/water are “burned” in the Combustion

Chamber (state 3). The natural gas is delivered from the pipeline at 77 F.

21

4. The combustion products are sent through the Gas Turbine (state 4). The shaft of this

turbine is coupled to the Compressor. All work done by the Gas Turbine is used to power the Compressor.

5. The combustion products then expand to nearly atmospheric pressure in the Power Turbine

(state 5). The shaft of this turbine is coupled to a generator to produce electricity for the process.

6. The combustion products are sent through the heat recovery steam generator (HRSG),

consisting of two heat exchangers to recover heat before venting to the atmosphere. In the Evaporator the combustion products transfer heat to vaporize heated water into steam.

7. In the Economizer, the combustion products heat the feed water before this water is sent to

the Evaporator.

Assignment 1 - Data Reconciliation (Data for Two Different Combustor Designs Provided) Note to Instructors: You can skip Assignment 1 and simply provide students the reconciled values for Case A or Case B – see ESRL5. Faculty Only Folder. If you are not familiar with data reconciliation, you will need to read pages 1 – 15 of Module ESRL2 – Data Reconciliation in a Cogeneration System and watch the associated video; the video and handout (in Module ESRL2) are coupled to make the process fairly quick. For ESRL5 Assignment 1 complete the data reconciliation process for just the combustor using data for: Case A: Steam Injected Combustor. Table A1 provides data for the steam injected combustor. or Case B: Water Injected Combustor. Table A2 provides data for the water injected combustor. Here the combustor is operating differently from the combustor in Module ESRL2 as we are using steam/water injection to lower the amount of NOx formed. You will need to account for steam/water injection in your material and energy balances. I have provided a solution template Combustor Data Recon Solution Template Case A/Case B.xls which will help with this process. For the objective function, at the data reconciliation solution, you should obtain a value less than 0.3. Table A1 Case A Steam Injected Combustor - Measured Values and Instrument Standard

Deviations with Nomenclature

Name Description Value Units Standard Deviation

Ambient Pressure 14.696 psia 1 Ambient Temperature 547.17 R 2 Air flow rate 143.33 lb/s 20

22

Air P entering Compressor 14.696 psia 1 Air T entering Compressor 519.94 R 5 Air P leaving Compressor 243.7 psia 1 Air T leaving Compressor 1260.48 R 10 Natural Gas flow entering Combustor 2.6208 lb/s 0.07 Natural Gas lower heating value 21501 Btu/lb 200 Natural Gas T entering Combustor 536.67 R 10 Steam injection rate entering Combustor 2.64 lb/s 0.07 Steam injection T entering Combustor 909.67 R 10

Products gas P leaving Combustion Chamber 243.7 psia 1

Products gas T leaving Combustion Chamber 2400 R 150

Combustion products flow rate 150.6208 lb/s 20

, Heat loss in Combustion Chamber 1125 Btu/s 250

, Air enthalpy at state 2 Btu/lb

, Injected Steam enthalpy at state 2 Btu/lb

, Combustion products enthalpy state 3 Btu/lb

leaving in Stack Gas 35 ppm 1 ____________________________________________________________________________ Table A2 Case B Water Injected Combustor - Measured Values and Instrument Standard

Deviations with Nomenclature

Name Description Value Units Standard Deviation

Ambient Pressure 14.696 psia 1 Ambient Temperature 547.17 R 2 Air flow rate 143.33 lb/s 20

Air P entering Compressor 14.696 psia 1 Air T entering Compressor 519.94 R 5 Air P leaving Compressor 243.7 psia 1 Air T leaving Compressor 1260.48 R 10 Natural Gas flow entering Combustor 2.6208 lb/s 0.07 Natural Gas lower heating value 21501 Btu/lb 200 Natural Gas T entering Combustor 599.67 R 10 Water injection rate entering Combustor 2.64 lb/s 0.07 Water injection T entering Combustor 536.67 R Fixed

Products gas P leaving Combustion Chamber 243.7 psia 1 Products gas T leaving Combustion Chamber 2400 R 150

Combustion products flow rate 150.6208 lb/s 20

, Heat loss in Combustion Chamber 1125 Btu/s 250

, Air enthalpy at state 2 Btu/lb

23

, Injected Steam enthalpy at state 2 Btu/lb

, Combustion products enthalpy state 3 Btu/lb

leaving in Stack Gas 35 ppm 1 _____________________________________________________________________________ Table A3 provides needed enthalpy data. Table A3 is explained in Module ESRL2. Here the reference state is 77 F all species vapor phase. The , will be needed for water injection. Table A3. Enthalpy coefficients – linear fit of enthalpy data as

, , ,

, -146.446 0.257997

, -339.7232 0.6116

, / -368.57817 0.5510

, -1050.0

, -199.574 0.295265 For either Case A Steam Injected Combustor or Case B Water Injected Combustor you will need to determine the adiabatic mixing temperature for the feed: water/steam; air; and fuel to the combustor using the reconciled values. Why do we need the adiabatic mixing temperature? Answer: Case A Steam Injected Combustor One temperature (Tin) is utilized in the combustor overall energy balance so we need to assume that the fuel, air and steam all mix at the compressor exit and prior to injection into the combustion chamber. This mixing will slightly lower the temperature of the air temperature from the compressor. Why do we need the adiabatic mixing temperature? Answer: Case B Water Injected Combustor One temperature (Tin) is utilized in the combustor overall energy balance so we need to assume that the fuel, air and water mix at the compressor exit and prior to injection into the combustion chamber. This mixing will lower the temperature of the air temperature from the compressor by vaporizing the water. Note to Instructors: You can skip Assignment 1 and simply provide students the reconciled values for Case A or Case B – see ESRL5 Faculty Only Folder. ■ Assignment 2 Measured NOx versus Equilibrium Calculations from the Combustor (no steam/water injection) Use your data reconciliation solution from ESRL5 Assignment 1 either Case A Steam Injected Combustor or Case B Water Injected Combustor with the determined flow of methane and air

24

to the combustor. There is also a reconciled steam/water flow but for now let us just say that flow = 0. This will allow us to see how important steam/water is in NOx reduction is in Assignment 3. There is no need to determine a new adiabatic feed temperature to the combustor without steam/water – just use the Tin value you determined in Assignment 1. Copy and use the provided file GFE - Combustion.xlsm. Do keep the flow rate of Argon at 0.000001 moles – this has no impact on the problem. Should we consider the combustion process to be adiabatic? … if so we can use the option Flag =1 in cell F16, otherwise we need to fix the outlet temperature. Of course we will have to supply the outlet pressure. What are the values for and and and . Determine the equilibrium NOx from the combustor. Does the measured NOx from the combustor agree with your equilibrium calculations? Where is the NOx being formed? Explain what is happening here. ■ Assignment 3 Measured NOx versus Equilibrium Calculations from the Combustor (with water injection) Use your data reconciliation solution from ESRL5 Assignment 1 either Case A Steam Injected Combustor or Case B Water Injected Combustor with the determined flow of methane, air and steam/water to the combustor. Use the adiabatic Tin value you determined in Assignment 1. We will now need to replace Argon in the feed stream with the steam/water injection rate to the combustor. I have prepared a new Excel file that reflects this change and accounts for N_H2O_in = Sheet1.Cells(10, 2) in the VBA code GFE – Combustion with H2O-Start.xlsm. I have also modified the VBA code to remove the argon atomic balance and all reference to argon. But you will need to: 1.) modify the VBA equations to account for water in the feed. 2.) modify the initial guess/bounds to account for water in the feed. Again - Should we consider the combustion process to be adiabatic? … if so we can use the option Flag =1 in cell F16, otherwise we need to fix the outlet temperature. Of course we will have to supply the outlet pressure. What are the values for and and and . Determine the equilibrium NOx from the combustor. Does the measured NOx from the combustor agree with your equilibrium calculations? Where is the NOx being formed? Explain what is happening here. Is steam/water injection important (compare Assignment 2 solution to Assignment 3 solution)? ■