Stoichiometry (HW1 Problem 1)

Atom balance for reaction:

Atom balance for N

neq = nno + nnh3 == 2 nn2 ;

Atom balance for O

oeq = nno +  2 no2 == nh2o;

atom balance for H

heq  = 3 nnh3 ==2  nh2o;

Restriction that 1 NH3 reduces 1 NO

xeq = nnh3-nno==0;

ans =Solve[{neq, oeq,heq,xeq},{nnh3,nn2,nh2o,no2}]

If we don’t like 1/4 of an O2 we could get

ans/.nno->2

Which is:

First get the molar flow  rate

totalmolarflowrate = (1 BAR) 10 l/s/(0.08314 l BAR/K/mol)/((273 + 400)K)

The get the flow fractions of the total molar flow.  We use the concentrations of the total streams to match the moles with O2 needing to be 1/4 of NO.

eq4 = .02 nofrac  == .1 o2frac  4

eq5 =  .02 nofrac  == 0.04 nh3frac

the fractions sum to 1

eq6 =nofrac + o2frac + nh3frac ==1

ans2 =Solve[{eq4,eq5,eq6},{nh3frac,nofrac,o2frac}]

Now use the “ans2” to get the molar flowrate for each tank

nomolarflow  = (totalmolarflowrate nofrac)/.ans2[[1]]

o2molarflow = (totalmolarflowrate  o2frac)/.ans2[[1]]

nh3molarflow = (totalmolarflowrate nh3frac)/.ans2[[1]]

Now use the molecular masses of the mixed gases to get the mass flow rates

nomassflow  = nomolarflow ( .02 30g/mol + .98 28 g/mol)

O2massflow =o2molarflow  ( .9 28g/mol + .1 32 g/mol)

nh3massflow = nh3molarflow ( .04 17g/mol + .96 28 g/mol)

We want the flow rate as the gases are reacting...

no = 0.02 nomolarflow/(mol/s)  -2 ξ

o2 = 0.1 o2molarflow/(mol/s)  -1/2 ξ

nh3 = 0.04 nh3molarflow/(mol/s)  -2 ξ

n2 = 0.98 nomolarflow /(mol/s)+.9 o2molarflow/(mol/s)  +  .96 nh3molarflow/(mol/s) + 2 ξ

h2o = 3 ξ

What the largest value for ξ?  Note that written this way, ξ has units of mol/s, e.g., a flowrate.

Solve[ 0.1 o2molarflow/(mol/s)  -1/2 ξ ==0, ξ]

Solve[ 0.02 nomolarflow/(mol/s)  -2 ξ==0,ξ]

Plot[{no,o2,nh3, n2, h2o},{ξ,0,.001153},PlotLegends->"Expressions"]

This doesn’t show much so:

Plot[{no,o2,nh3, n2, h2o},{ξ,0,.001153},PlotLegends->"Expressions",PlotRange->{0,.0040}, AxesLabel->{"ξ, advancement","molar flow (mol/s)"}]

flowrate = (no+o2+nh3+n2+h2o)* .08314 (273+400)/1

Plot[flowrate,{ξ,0,.0115},Frame-> True, FrameLabel->{"ξ, advancement","total molar flow (mol/s)"} ]

Now add a 2nd reaction:

Atom balance

Atom balance for N

neq = nnh3 ==  nno

Atom balance for O

oeq =    2 no2 == nh2o + nno

atom balance for H

heq  = 3 nnh3 ==2  nh2o

ans =Solve[{neq, oeq,heq},{nnh3,nh2o,no2}]

Let’s multiply by 4 to get all whole numbers

ans/.nno->4

Which is:

Here is the original reaction:

We pick the same feed streams but now allow both reactions to proceed.

First let’s get the “answer” in mol/s

For NO

0.036g/s/( 30 g/mol)

for NH3

0.017g/s/( 17 g/mol)

Here are the mole balances for NH3 and NO for the two reactions:

nh3 = 0.04 nh3molarflow-2 ξ1 - 4ξ2

no = 0.02 nomolarflow  -2 ξ1 + 4 ξ2

The two “advancements”.

ans4 = Solve[{ nh3 == .001 mol/s,no == .0012 mol/s},{ξ1,ξ2}]

These would be more meaningful if divided by the nh3 initial flowrate

The first reaction is 1/4 of the way to completion:

(ξ1/.ans4[[1]]) / .0023 /(mol/s)

(ξ2/.ans4[[1]]) / .0023 /(mol/s)