Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T...

9
Reaction equilibrium constant from heat data & equilibrium extents of reaction and compositions. Example 13.13 of Smith, Van Ness, Abbott (SVA). Combine 3 formation reactions into two independent reactions by eliminating O 2 (to help with numerical convergence) & start by converting O 2 into CO 2 . Instructor: Nam Sun Wang Step 1. Reactions of formation & Reaction Stoichiometry #1 Reaction of formation of H 2 O: H 2 + 1/2 O 2 ⎯→ H 2 O #2 Reaction of formation of CO: C + 1/2 O 2 ⎯→ CO #3 Reaction of formation of CO 2 : C + O 2 ⎯→ CO 2 Since O 2 is almost absent, combine k 1 , k 2 , & k 3 into k a & k b by eliminating/cacncelling out the O 2 terms. This is equivalent to combining reactions 2xReaction #2 & Reaction #3 ⎯→ Reaction a 2x [ #2 Reaction of formation of CO: C + 1/2 O 2 ⎯→ CO ] -1x [ #3 Reaction of formation of CO 2 : C + O 2 ⎯→ CO 2 ] --------------------------------------------------------------------------------------- Reaction a: C + CO 2 ⎯→ 2 CO Reaction #2 & Reaction #1 ⎯→ Reaction b -1x [ #1 Reaction of formation of H 2 O: H 2 + 1/2 O 2 ⎯→ H 2 O ] +1x [ #2 Reaction of formation of CO: C + 1/2 O 2 ⎯→ CO ] -------------------------------------------------------------------------------------- Reaction b: H 2 O + C ⎯→ H 2 +CO ORIGIN 1 The above reactions involve 7 chemical species (where "Cg" is graphite carbon) i 1 7 .. := H2 CO O2 H2O CO2 N2 Cg ( ) 1 2 3 4 5 6 7 ( ) := Stoichiometry for 2 reactions: Reaction a and Reaction b. j 1 2 .. := a b ( ) 1 2 ( ) := Thus, a simple matrix-vector equation ν T species=0 represents all the reactions. ν work 0 H2 CO O2 H2O CO2 N2 Cg a 0 2 0 0 1 0 1 b 1 1 0 1 0 0 1 := ν submatrix ν work 2 , 8 , 2 , 3 , ( ) := ν 0 2 0 0 1 0 1 1 1 0 1 0 0 1 =

Transcript of Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T...

Page 1: Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T ΔHo298toT()Tj, 298.15 T

Reaction equilibrium constant from heat data & equilibrium extents of reaction and compositions.Example 13.13 of Smith, Van Ness, Abbott (SVA).Combine 3 formation reactions into two independent reactions by eliminating O2 (to help withnumerical convergence) & start by converting O2 into CO2.Instructor: Nam Sun Wang

Step 1. Reactions of formation & Reaction Stoichiometry #1 Reaction of formation of H2O: H2 + 1/2 O2 ⎯→ H2O #2 Reaction of formation of CO: C + 1/2 O2 ⎯→ CO #3 Reaction of formation of CO2: C + O2 ⎯→ CO2 Since O2 is almost absent, combine k1, k2, & k3 into ka & kb by eliminating/cacncelling out the O2

terms. This is equivalent to combining reactions2xReaction #2 & Reaction #3 ⎯→ Reaction a 2x [ #2 Reaction of formation of CO: C + 1/2 O2 ⎯→ CO ] -1x [ #3 Reaction of formation of CO2: C + O2 ⎯→ CO2 ] --------------------------------------------------------------------------------------- Reaction a: C + CO2 ⎯→ 2 CO Reaction #2 & Reaction #1 ⎯→ Reaction b -1x [ #1 Reaction of formation of H2O: H2 + 1/2 O2 ⎯→ H2O ] +1x [ #2 Reaction of formation of CO: C + 1/2 O2 ⎯→ CO ] -------------------------------------------------------------------------------------- Reaction b: H2O + C ⎯→ H2 +CO

ORIGIN 1≡

The above reactions involve 7 chemical species (where "Cg" is graphite carbon)i 1 7..:= H2 CO O2 H2O CO2 N2 Cg( ) 1 2 3 4 5 6 7( ):=

Stoichiometry for 2 reactions: Reaction a and Reaction b.

j 1 2..:= a b( ) 1 2( ):=

Thus, a simple matrix-vector equation νT⋅species=0 represents all the reactions.

νwork

0

H2

CO

O2

H2O

CO2

N2

Cg

a

0

2

0

0

1−

0

1−

b

1

1

0

1−

0

0

1−

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

:=ν submatrix νwork 2, 8, 2, 3, ( ):= ν

0

2

0

0

1−

0

1−

1

1

0

1−

0

0

1−

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

Page 2: Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T ΔHo298toT()Tj, 298.15 T

Step 2. Mass balanceComposition in the inlet (in mole): 1 mole H2O, 2.38 mole air

air 2.38:=

hydrogencarbon monoxideoxygenwatercarbon dioxidenitrogencarbon

nin

0

0

0.21 air⋅

1

0

0.79 air⋅

1

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

:= nin

0

0

0.5

1

0

1.88

1

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

In eliminating the reactions involving O2, we assume we start with the complete burning of O2 due tothe reaction: C + O2 ⎯→ CO2 Thus, O2 in the inlet is replaced by CO2 in the inlet. We can also hypothetically replace O2 by CO inthe inlet instead.

ninCO2ninO2

:= ninO20:=

extents (coordinates) of reaction

nin

0

0

0

1

0.5

1.88

1

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=eea

eb

⎛⎜⎝

⎞⎟⎠

=

mass balance in vector form (very simple).nout e( ) nin ν e⋅+:=

Summing up all outlet species, we have

nout.total e( ) nout e( )∑:=

The above includes everything -- including carbon and inert (nitrogen). Because carbon (graphite)is a solid, it does not contribute much to the reactor volume, gas phase concentration, norequilibrium constant. The following defines total number and equilibrium constants with just thegas portion without carbon.

ntotal e( ) nout e( )∑ nout e( )Cg

−:= Σνj νj⟨ ⟩

∑ νj⟨ ⟩( )

Cg−:=

x e( )nout e( )

nout.total e( ):= y e( )

nout e( )

ntotal e( ):=

Equilibrium constants for each of the two reactions

P 20:= bar Po 1:= bar vector notation

k e j, ( )

1

6

i

y e( )i( )νi j, ∏=

PPo

⎛⎜⎝

⎞⎟⎠

Σνj⋅:= kvect e( )

k e a, ( )

k e b, ( )⎛⎜⎝

⎞⎟⎠

:=

Page 3: Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T ΔHo298toT()Tj, 298.15 T

Step 3. Thermodynamic data (for gaseous state) from Table C.1 & Table C.4 of SVA (ΔH &ΔG in J/mol):

Ai

3.2493.3763.6393.475.4573.281.771

:= Bi

0.4220.5570.5061.451.0450.5930.771

:= Ci

0000000

:= Di

0.0830.031−0.227−0.1211.157−0.040.867−

:= ΔHof298i

0110525−

0241818−393509−

00

:= ΔGof298i

0137169−

0228572−394359−

00

:=

hydrogencarbon monoxideoxygenwatercarbon dioxidenitrogencarbon (solid)

apply scaling factors to Cp coefficients B 10 3− B⋅:= C 10 6− C⋅:= D 105 D⋅:= R 8.314:= J/mole-K

Heat capacity at constant pressure:

Cp T i, ( ) Ai Bi T⋅+ Ci T2⋅+ Di T 2−

⋅+⎛⎝

⎞⎠ R⋅:= where Cp is in R unit (J/mole-K) and T is in K.

vector notation (not useful here because integration of a vector function (even a 1x1) is not supported in v14)

Cp.coeff1⟨ ⟩

A:= Cp.coeff2⟨ ⟩

B:= Cp.coeff3⟨ ⟩

C:= Cp.coeff4⟨ ⟩

D:=

Cp.vect T( ) Cp.coeff

1

T

T2

T 2−

⎛⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎠

⋅ R⋅:=

From, the above thermodynamic data, we can define other thermodynamic variables (ΔH, ΔS, ΔG etc).

ΔG°, Gibbs energy of reaction j at standard Po, T vector notationheat of rxn at 298K ΔHo298j

i

νi j, ΔHof298i⋅( )∑:=

ΔHo298 νT

ΔHof298⋅:=

Gibbs energy of rxn at 298K ΔGo298ji

νi j, ΔGof298i⋅( )∑:=

ΔGo298 νT

ΔGof298⋅:=

entropy of rxn at 298KΔSo298

ΔHo298 ΔGo298−

298.15:=

vector notation

to bring from 298K to TΔHo298toT T j, ( )

298.15

i

νi j, Cp τ i, ( )⋅( )∑⌠⎮⎮⎮⌡

d:= ΔHo298toT.vect T( )ΔHo298toT T a, ( )

ΔHo298toT T b, ( )

⎛⎜⎝

⎞⎟⎠

:=

ΔSo298toT T j, ( )

298.15

T

τ

i

νi j,

Cp τ i, ( )

τ⋅

⎛⎜⎝

⎞⎟⎠∑

⌠⎮⎮⎮⌡

d:= ΔSo298toT.vect T( )ΔSo298toT T a, ( )

ΔSo298toT T b, ( )

⎛⎜⎝

⎞⎟⎠

:=

Page 4: Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T ΔHo298toT()Tj, 298.15 T

heat of rxn at T ΔHo T j, ( ) ΔHo298jΔHo298toT T j, ( )+:= ΔHo.vect T( ) ΔHo298 ΔHo298toT.vect T( )+:=

entropy of rxn at T ΔSo T j, ( ) ΔSo298jΔSo298toT T j, ( )+:= ΔSo.vect T( ) ΔSo298 ΔSo298toT.vect T( )+:=

Gibbs energy of rxn at T ΔGo T j, ( ) ΔHo T j, ( ) T ΔSo T j, ( )⋅−:= ΔGo.vect T( ) ΔHo.vect T( ) T ΔSo.vect T( )⋅−:=

Equilibrium constant ln K( )ΔGo

R T⋅−= K T j, ( ) exp

ΔGo T j, ( )

R T⋅−

⎛⎜⎝

⎞⎟⎠

:= Kvect T( ) expΔGo.vect T( )

R T⋅−

⎛⎜⎝

⎞⎟⎠

:=

Example. ΔH, ΔG, ΔS, K for both reactions

T 1000:=

ΔHo298j

172459131293

= ΔGo298j

12002191403

= ΔSo298j

176134

=ΔHo298toT T j, ( )

-15964934

=ΔSo298toT T j, ( )

-0.52610.078

=ΔHo T j, ( )

170863136227

= ΔGo T j, ( )

-4489-7643

=ΔSo T j, ( )

175.352143.869

= K T j, ( )

1.7162.507

=

vector notationΔHo.vect T( )

j51.709·1051.362·10

= ΔGo.vect T( )j

3-4.489·103-7.643·10

= ΔSo.vect T( )j

175.352143.869

= Kvect T( )j

1.7162.507

=

vector notationT 1000 1100, 1500..:=

T

10001100

1200

1300

1400

1500

= ΔGo T a, ( )

-4489-21984

-39396

-56726

-73975

-91144

= ΔGo T b, ( )

-7643-22037

-36437

-50834

-65220

-79587

=

ΔGo.vect T( )T

4.489− 103× 7.643− 103

×( )2.198− 104

× 2.204− 104×( )

3.94− 104× 3.644− 104

×( )5.673− 104

× 5.083− 104×( )

7.398− 104× 6.522− 104

×( )9.114− 104

× 7.959− 104×( )

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

Page 5: Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T ΔHo298toT()Tj, 298.15 T

Step 4. Numerical Calculation of Extents of Reaction & Equilibrium Composition. One of themost challenging steps in solving algebraic equation is coming up with a good initial guess. Triedthe following initial guesses composed of simple numbers, but they were all bad.

ea 0:= eb 0:=

ea 0:= eb 1:=

ea 1:= eb 0:=

ea 1:= eb 1:=

ea 0:= eb 1−:=

ea 1−:= eb 0:=

ea 1−:= eb 1−:=

The following set of initial guess works from T=1000K, but only up to a certain point.

ea 0:= eb 0.5:=

Finally, by examining the converged solution for ea and eb, we come up with the following intial guessto cover T=[1000 1500].

T 1000:= ←⎯ change this value to make sure Given-Find works for different values of T.

e0

0.9⎛⎜⎝

⎞⎟⎠

:= ... initial guess

Givenk e a, ( )

k e b, ( )⎛⎜⎝

⎞⎟⎠

K T a, ( )

K T b, ( )⎛⎜⎝

⎞⎟⎠

= e Find e( ):= e0.052−

0.531⎛⎜⎝

⎞⎟⎠

=

Another version with vector notation

e0

0.9⎛⎜⎝

⎞⎟⎠

:= ... initial guess

Given

kvect e( ) Kvect T( )= e Find e( ):= e0.052−

0.531⎛⎜⎝

⎞⎟⎠

=

vector notation:

nout e( )

0.531

0.427

0

0.469

0.552

1.88

0.521

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

= x e( )

0.121

0.098

0

0.107

0.126

0.429

0.119

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

= y e( )

0.138

0.111

0

0.122

0.143

0.487

0.135

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

nout.total e( ) 4.38= ntotal e( ) 3.859= check: y e( )∑ y e( )Cg− 1=

Page 6: Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T ΔHo298toT()Tj, 298.15 T

Parameterize T (by turning into a function of T, so that T can be varied.)

e0

0.9⎛⎜⎝

⎞⎟⎠

:= ... initial guess

Given

kvect e( ) Kvect T( )=

e T( ) Find e( ):= e T( )0.052−

0.531⎛⎜⎝

⎞⎟⎠

=

Example

T 1500:= e T( )0.489

0.986⎛⎜⎝

⎞⎟⎠

=

nout e T( )( )

0.986

1.965

0

0.014

0.011

1.88

0.476−

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

= x e T( )( )

0.225

0.449

0

3.084 10 3−×

2.432 10 3−×

0.429

0.109−

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

= y e T( )( )

0.203

0.405

0

2.782 10 3−×

2.194 10 3−×

0.387

0.098−

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

nout.total e T( )( ) 4.38= ntotal e T( )( ) 4.856= ntotal e T( )( ) 4.856=

Table and plot versus T

T 1000 1100, 1500..:=e T( )a

-0.0520.116

0.314

0.429

0.473

0.489

= e T( )b

0.5310.713

0.855

0.936

0.972

0.986

=T

10001100

1200

1300

1400

1500

= K T a, ( )

1.71611.065

51.87

190.27

575.638

1492.845

= K T b, ( )

2.50711.129

38.559

110.311

271.311

590.957

=

y e T( )( )H2

0.1380.169

0.188

0.197

0.201

0.203

= y e T( )( )CO

0.1110.225

0.326

0.378

0.398

0.405

= y e T( )( )H2O

0.1220.068

0.032

0.014-35.901·10-32.782·10

= y e T( )( )CO2

0.1430.091

0.041

0.015-35.491·10-32.194·10

= y e T( )( )N2

0.4870.447

0.413

0.396

0.39

0.387

=T

10001100

1200

1300

1400

1500

=

Page 7: Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T ΔHo298toT()Tj, 298.15 T

vector notation

T

10001100

1200

1300

1400

1500

=

Kvect T( )T

1.716 2.507( )

11.065 11.129( )

51.87 38.559( )

190.27 110.311( )

575.638 271.311( )

1492.845 590.957( )

⎡⎢⎢⎢⎢⎢⎢⎣

⎤⎥⎥⎥⎥⎥⎥⎦

= e T( )T

0.052− 0.531( )

0.116 0.713( )

0.314 0.855( )

0.429 0.936( )

0.473 0.972( )

0.489 0.986( )

⎡⎢⎢⎢⎢⎢⎢⎣

⎤⎥⎥⎥⎥⎥⎥⎦

=

T

10001100

1200

1300

1400

1500

=

y e T( )( )T

0.138 0.111 0 0.122 0.143 0.487 0.135( )

0.169 0.225 0 0.068 0.091 0.447 0.041( )

0.188 0.326 0 0.032 0.041 0.413 0.037−( )

0.197 0.378 0 0.014 0.015 0.396 0.077−( )

0.201 0.398 0 5.901 10 3−× 5.491 10 3−

× 0.39 0.092−( )0.203 0.405 0 2.782 10 3−

× 2.194 10 3−× 0.387 0.098−( )

⎡⎢⎢⎢⎢⎢⎢⎢⎣

⎤⎥⎥⎥⎥⎥⎥⎥⎦

=

1000 1100 1200 1300 1400 15000

0.1

0.2

0.3

0.4

0.5

H2COH2OCO2N2

Equilibrium Composition of Product Gases

Temperature

Com

posi

tions

y e T( )( )H2

y e T( )( )CO

y e T( )( )H2O

y e T( )( )CO2

y e T( )( )N2

T

Page 8: Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T ΔHo298toT()Tj, 298.15 T

Step 5. Adiabatic Reaction Temperature. In the above formulation, both temperature andpressure are specified. If the reactor is closed, changea in pressure result from different number ofmoles between reaction products and reaction reactants, and changes in temperature result fromheat given off by reactions and transfer of heat between the reactor and the surroundings. Thus, thepressure is given if the reactor is open or if the reactor pressure is regulated through a pressurerelease valve. On the other hand, the reactor temperature is determined by the amount of heatgain/loss to the surroundings. Here we solve for the adiabatic case of a well insulated reactor (orone in which reaction is much faster than heat transfer).

Heat balance equation

Q 0= ΔH= ΔHreactant.fromTinTo298 extent ΔHrxn298⋅+ ΔHproduct.298ToT+=

Q 0= ΔH=

i

niniTin

298.15τCP τ i, ( )

⌠⎮⌡

d⋅⎛⎜⎜⎝

⎞⎟⎟⎠

∑ e( )T ΔHrxn298⋅+

i

nouti298.15

TτCP τ i, ( )

⌠⎮⌡

d⋅⎛⎜⎜⎝

⎞⎟⎟⎠

∑+=

Assume an inlet temperature Tin=To=298K, so that the first heat capacity term for reactants iszero. In the above formulation, we assume all O2 reacted with C to form CO2. This effectivelyprovides the heat to drive the reformation reactions. We add this term to the reaction heat term inthe above equation.

eO2 0.21 air⋅:= ... extent of reaction for: C + O2 ⎯→ CO2

It is easier to define eO2 in terms of the original assumption that all O2 was converted to CO2.

ninCO2ΔHof298CO2

⋅ 196676−= J/mol

0 ninCO2ΔHof298CO2

⋅ eTΔHrxn298⋅+

i

nouti298.15

TτCp τ i, ( )

⌠⎮⌡

d⋅⎛⎜⎜⎝

⎞⎟⎟⎠

∑+=

substitute:nout nin ν e⋅+= nouti

ninij

νi j, ej⋅( )∑+= niniνi a, ea⋅+ νi b, eb⋅+=

0 ninCO2ΔHof298CO2

⋅ ea ΔHo298a⋅+ eb ΔHo298b

⋅+

i

niniνi a, ea⋅+ νi b, eb⋅+( )

298.15

TτCp τ i, ( )

⌠⎮⌡

d⋅⎡⎢⎢⎣

⎤⎥⎥⎦

∑+=

substitute ΔHo T j, ( ) ΔHo298jΔHo298toT T j, ( )+= ΔHo298j

298.15

i

νi j, Cp τ i, ( )⋅( )∑⌠⎮⎮⎮⌡

d+=

ΔHo T j, ( ) ΔHo298j298.15

Tτν

T Cp.vect τ( )⋅( )j

⌠⎮⎮⌡

d+=

0 ninCO2ΔHof298CO2

⋅ eTΔHo.vect T( )⋅+

i

nini298.15

TτCp τ i, ( )

⌠⎮⌡

d⋅⎛⎜⎜⎝

⎞⎟⎟⎠

∑+=

Page 9: Mathcad - e13-13cnsw/chbe301/e13-13c.pdf · 298.15:= vector notation to bring from 298K to T ΔHo298toT()Tj, 298.15 T

We add the above scaler heat balance equation (expressed in either scalar math or vector math) tothe equilibrium equation.

e0

0.9⎛⎜⎝

⎞⎟⎠

:= T 1000:= ... initial guess 2 unkonwns (e & T) & 2 equations

Given

kvect e( ) Kvect T( )= ... equilibrium equation

0 ninCO2ΔHof298CO2

⋅ eTΔHo298⋅+

298.15

Tτnin ν e⋅+( )T Cp.vect τ( )⋅

⌠⎮⌡

d+= ... heat balance equation

e

T⎛⎜⎝

⎞⎟⎠

Find e T, ( ):= e

T⎛⎜⎝

⎞⎟⎠

0.035

0.64⎛⎜⎝

⎞⎟⎠

1058.751

⎡⎢⎢⎣

⎤⎥⎥⎦

=

Equivalent set of equations (bring reatants from 298K to T, then react at T)

e0

0.9⎛⎜⎝

⎞⎟⎠

:= T 1000:= ... initial guess

Given

kvect e( ) Kvect T( )= ... equilibrium equation

0 ninCO2ΔHof298CO2

⋅ eTΔHo.vect T( )⋅+

298.15

Tτnin

T Cp.vect τ( )⋅⌠⎮⌡

d+= ... heat balance equation

e

T⎛⎜⎝

⎞⎟⎠

Find e T, ( ):= e

T⎛⎜⎝

⎞⎟⎠

0.035

0.64⎛⎜⎝

⎞⎟⎠

1058.751

⎡⎢⎢⎣

⎤⎥⎥⎦

=