0% found this document useful (0 votes)
5 views18 pages

Module 1

Module 1 of CHE 410 focuses on the application of Excel in thermodynamics, specifically for solving chemical engineering problems and material & energy balance equations using Solver. It covers essential concepts such as equations of state, their mathematical formulations, and methods to solve cubic equations using Excel's Goal Seek and Solver features. Additionally, it includes class problems and practice problems to reinforce the application of these concepts in real-world scenarios.

Uploaded by

rashedmo1440
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views18 pages

Module 1

Module 1 of CHE 410 focuses on the application of Excel in thermodynamics, specifically for solving chemical engineering problems and material & energy balance equations using Solver. It covers essential concepts such as equations of state, their mathematical formulations, and methods to solve cubic equations using Excel's Goal Seek and Solver features. Additionally, it includes class problems and practice problems to reinforce the application of these concepts in real-world scenarios.

Uploaded by

rashedmo1440
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module 1 CHE 410

Application of Excel in Thermodynamics


Objectives:
After the completion of this module, the students should be able to use EXCEL
spreadsheet to solve routine chemical engineering problems and material & energy
balance equations by using Solver.

Prerequisite Mathematical Skills


Essential commands and formulae entry in EXCEL

Prerequisite Engineering & Science Skills


1. Basic knowledge of Equations of State
2. Basic Knowledge of Material and Energy balance of chemical processes

1.1. Equations of State


Solving equations of state (EOS) allow us to find the specific volume of a gaseous
mixture of chemicals at specified temperature and pressure. Without using equations of
state, it would be virtually impossible to design a chemical plant. By knowing this
specific volume, the size and thus cost of the plant can be determined, including the
parameters such as diameter of pipes, the horse power of compressors and pumps, and
the diameter of distillation tower and chemical reactor. Imagine how challenging it
would have been to design a plant without knowing this important information.
Determining the specific volume is the first step in the calculation of enthalpy and
vapor-liquid properties of mixtures. Calculation of enthalpy is essentially important to
perform energy balances to reduce energy use and help environment. In this module the
calculations will be done for the vapor phase only.

Equations of State- Mathematical Formulation


The ideal gas EOS, which relates the pressure, temperature, and specific volume, is a
familiar equation:
𝑉
𝑃𝑉 = 𝑛𝑅𝑇 𝑜𝑟 𝑃𝑣̂ = 𝑅𝑇 where 𝑣̂ =
𝑛
The term P is the absolute pressure, V is the volume, n is the number of moles,
R is the gas constant, T is the absolute temperature and 𝑣̂ is the specific volume. This
equation is quite adequate when the pressure is low (such as 1 atm). However, many
chemical processes take place at very high pressure. For example ammonia is made at
220 atm or more. Under these conditions, the ideal gas EOS may not be a valid
representation of the reality.
The rule of thumb is that the ideal gas is a good approximation for pressures
upto 10 atm although this can change depending on the temperature. Accuracy of ideal
gas EOS improves when used for processes which take place at high temperature.

3
CHE 410

Other equations of state have been developed usually in conjunction with the process
simulators to address chemical processes at high pressure.
There are two key criteria:
(1) The equation is able to present the real p-V-T behavior
(2) The parameters must be easily found, including for mixtures.
The second criterion is no small criteria. There are more than 25 million compounds,
leading to an infinite number of different mixtures. Obviously it is not possible to look
up the properties of those mixtures on the web.

The first generalization of the ideal gas law was the van der Waals EOS:

𝑅𝑇 𝑎
𝑃= − 2
𝑣̂ − 𝑏 𝑣̂
Where b accounts for the excluded volume and a accounts for the force of interaction
between two molecules.
This extension is just a first step, however, because it will not be a good approximation
at extremely high pressures. Many more equations of state have been proposed in order
to improve the representation. Some of the important Equations of State for pure
components have been summarized in Table 1.1.

4
CHE 410

Table 1.1: Equations of State for Pure Components

Reproduced from Introduction to Chemical Engineering Computing by B.A Finlayson

5
CHE 410

All these equations can be arranged into a cubic function of specific volume. The form
of the Redlich-Kwong and Redlich-Kwong-Soave EOS is

̂𝟑 (𝒑) − 𝒗
𝒗 ̂𝟐 (𝑹𝑻) + 𝒗
̂(𝒂 − 𝒑𝒃𝟐 − 𝑹𝑻𝒃) − 𝒂𝒃 = 𝟎 (1)

When the temperature and the pressure of a gaseous mixture and the parameters a and
b are given, then the specific volume, 𝑣̂ of the mixture can be calculated by solving the
cubic EOS. The equation represents one algebraic equation with one unknown, i.e. the
specific volume. Similarly the Peng-Robinson EOS results in

̂𝟑 (𝒑) + 𝒗
𝒗 ̂𝟐 (𝒃𝒑 − 𝑹𝑻) + 𝒗
̂(𝒂 − 𝟑𝒑𝒃𝟐 − 𝟐𝑹𝑻𝒃) + (𝒑𝒃𝟑 + 𝑹𝑻𝒃𝟐 − 𝒂𝒃) = 𝟎 (2)

For the pure components, the parameters a and b are determined from the critical
temperature and critical pressure and possibly the accentric factor. These are all
tabulated quantities for pure components. For mixtures, it is necessary to combine the
values of a and b for each component according to the composition of the gaseous
mixture. Thus the following equations can be used to find a and b for a binary mixture.
𝑎 = 𝑦12 𝑎1 + 2𝑦1 𝑦2 𝑎12 + 𝑦22 𝑎2

𝑏 = 𝑦1 𝑏1 + 𝑦2 𝑏2

Common mixing rules for the multicomponent mixtures in terms of the pure component
properties {𝑎𝑖 , 𝑏𝑖 , 𝛼1 } for the major equations of state are shown in Table 1.2. The only
difference between the mathematical problem for a pure component and for a mixture
is in the evaluation of the parameters a and b.

6
CHE 410

Table 1.2: Equations of State for Mixtures

7
CHE 410

Solution of Cubic Equation of State by Excel

The mathematical problem that has to be solved in this module consists of a given set
of chemicals along with its temperature and pressure, and the specific volume of the
mixture has to be found out.

Once the parameters are known, the equation (1) or (2) which is nonlinear equation
with one variable, must be solved to calculate specific volume,𝑣̂ . Since these are cubic
equations, it is possible to find the solution in a series of analytic steps, but it is not
usually done because it is quicker to find the solution numerically using EXCEL.

This module will allow us to solve for the specific volume easily in less time interval
than the hectic manual analytical steps.

8
CHE 410

1.2. Solving Equation of State Using Excel (Single Equation in One Unknown)

There are at least two methods to solve algebraic equations using Excel. The first one
uses “Goal Seek” while the other uses “Solver”. Both can be illustrated using a simple
example:
Find ‘x’ so that ‘f(x) = 0’
𝑓(𝑥) = 𝑥 2 − 2𝑥 − 8

1.2.1 Solution using Goal Seek

Step1: Open a spreadsheet and put the following statement in cell B1

=A1*A1-2*A1-8

Cell B1 basically contains the equation f(x) that has to be zero at some value in A1.
This value is the required value ‘x’. The value in cell A1 has to be varied and adjusted
in such a way that the value in cell B1 becomes zero.

Step2: Under “Data” and “What if analysis” choose “Goal Seek.” When a small
screen appears, fill in the spaces shown as below:

Step3 Click OK. The following answer appears in the spreadsheet.

9
CHE 410

-2.000000686 4.11369E-06

The value at cell B1 is 4.11 x10-6 and not ‘0’ as required but is small enough to be
considered as relative tolerance for most purposes.

1.2.2 Solution using Solver

Step 1: Repeat the step same as done above for Goal Seek.

Step 2: Under the Data menu, click on “Solver”.

Step 3: When the following window appears, choose the option to make the cell equal
to a value of (or maximum or minimum) by changing another cell. If the appropriate
cell location is inserted, the same answer will be obtained as with the Goal seek. This
time, however, it is more accurate.

10
CHE 410

11
CHE 410

CLASS PROBLEM
Find the specific volume of n-butane at 393.3 K using the following equations:

(1) Ideal gas


(2) Redlick- Kwong EOS

Use excel sheet to calculate the Specific Volume at the following pressures using the
above equations and then plot the results.
Make a plot of P vs V for ideal gas and RK EOS and compare your results.

Pressure (atm) 5 10 15 20 25
Sepecific Volume(L/g-mol)

Data Given: TC=425.2 K; PC=37.5 atm; R=0.08206 L-atm/gmol.K

12
CHE 410

1.3 Using Solver with set of equations


To apply solver write all the equations in the following form:
𝑥 + 2𝑦 + 3𝑧 − 366 = 0

4𝑥 + 5𝑦 + 6𝑧 − 804 = 0

7𝑥 + 8𝑦 − 351 = 0
1. Start a new sheet and name it example2
2. Start cell A1, enter “Solving set of equations: Solver method”
3. Put initial guesses of x, y and z in the cells B8:B10.
4. Now input in the equations (which are equal to zero). When these equations
evaluate to zero, the problem is solved.
5. In cells C8:C10, enter the contents (equation) as shown in the table below.
Cell Contents
C8 =(B8+2*B9+3*B10-366)
C9 =(4*B8+5*B9+6*B10-804)/6
C10 =(7*B8+8*B9-351)
6. In C11, point it to cells C9; C10, sum the absolute values of these solutions in a
cell to create a single value for the solver to optimize.
7. In cell C11, type =SUM(ABS(B8:B10)) and press Ctrl+Shift+Enter
8. Open solver from data browser.
9. Select cell $C$11 for the set cell option and cells $C$8:$C$10 as the cells to
change as shown in Figure 2. Select the value of options and enter 0 in the value
box.
10. On the subject to constraints, click on add, and, choose cell $B$8:$B$10=0. The
dialogue box should appear as in Figure 2.
11. Click Solve to search for a solution.

When solver locates a solution to the problem, it displays the solver results dialogue
shown in Figure 3. The results are shown in figure 4

13
CHE 410

Figure 4: Solver Dialogue Box

14
CHE 410

Figure 5: Solver Dialogue box after running it.

Figure 6: Results of the calculation

15
CHE 410

If the solver cannot find a solution, the window in Figure 7 appears. If this happens, try
running solver again. Solver can solve set of equations as long as the results are added
together are roughly of similar magnitude. If not, the one result predominates the
calculation, making it difficult or impossible for the solver to find a solution. If the
results are of different order of magnitude, multiply the results by some factor to make
their magnitudes roughly equal. Multiplying by a value will not change the results,
because the wanted result is zero.

Figure 7: Solver Dialogue box without a solution.

16
CHE 410

CLASS PROBLEM
A mixture containing 45% benzene (B), 50% toluene (T) and 5% nitrobenzene (NB) by
mass is fed to a distillation column. The overhead stream is composed of 95% B and
4% T. The bottom contains, 90% T. The feed rate is 2000 kg/h. Determine the overhead
and bottom flow rate of the streams and the composition.

17
CHE 410

PRACTICE PROBLEMS
PROBLEM 1
Find the molar volume of methanol gas at 3000C using the following equation of state,
𝑇𝑐 = 512.6 𝐾, 𝑝𝑐 = 79.9 𝑎𝑡𝑚, ω = 0.559; units of a and b correspond to 𝑣 in l/g mol.
(1) Ideal gas law;
(2) Redlich–Kwong equation of state;
(3) Redlich–Kwong–Soave equation of state.

Pressure (atm) 10 25 50 75 100 125


Sepecific Volume(L/g-mol)
Plot the pressure and specific volume and make analysis on the nature of the plot. Give
reasons why the ideal gas or Redlich-Kwong Equation of State are not expected to be
valid choices.

PROBLEM 2
Consider a mixture of 25 percent ammonia, and the rest nitrogen and hydrogen in a 1:3
ratio. The gas is at 550 K. Use Excel to compute the specific volume using:
(1) Ideal gas law;
(2) Redlich–Kwong equation of state;
(3) Redlich–Kwong–Soave equation of state.
Plot the pressure and specific volume and make analysis on the nature of the plot. How
do the three answers compare? Is the gas ideal or not? Comment on the reasons the
RKS equation might be expected to be better.

Pressure (atm) 50 100 150 200 250 300


Sepecific Volume(L/mol)

Data Given:

Component TC (K) PC (atm) ω

NH3 406.6 111.23 0.252

N2 126.1 33.5 0.040

H2 33.3 12.8 -0.215

18
CHE 410

PROBLEM 3
Calculate the molar volume of a binary mixture containing 30 mol% CO2 and 70
mol% i-butane (2) at 400 K using the following equation of sates:
(1) Ideal gas law;
(2) Redlich–Kwong equation of state;
(3) Peng-Robinson equation of state.
Plot the pressure and specific volume and make analysis on the nature of the plot.
How do the three answers compare? Is the gas ideal or not? Comment on the reasons
the RKS equation might be expected to be better.

Pressure (atm) 20 40 60 80 100 120


Sepecific Volume(L/mol)

Data Given:

Component TC (K) PC (atm) ω

CO2 304.2 72.86 0.228

i-butane 408.1 36 0.177

19
CHE 410

PROBLEM 4
Ethane is dehydrogenated to ethylene and acetylene in the following pair of catalytic
reactions:
𝐶2 𝐻6 ⇌ 𝐶2 𝐻4 + 𝐻2 [A ⇌ B+D]

𝐶2 𝐻6 ⇌ 𝐶2 𝐻2 + 2𝐻2 [A ⇌ C+2D]

The reactions take place at 9770C and 1 atm and proceed to a point such that the product
gas composition satisfies the following equilibrium conditions:
𝑦𝐵 𝑦𝐷 𝑦𝐶 𝑦𝐷 2
= 3.75 = 0.135
𝑦𝐴 𝑦𝐴
where y denotes the mole fraction. The product gas goes to a complex separation
process that separates 95% of the unreacted ethane from the ethylene, acetylene and
hydrogen and recycles the separated ethane to the reactor.

Calculate the flow rate and the composition of the product stream using Solver.

PROBLEM 5

One method for the manufacture of “Synthesis gas” (a mixture of CO and H2) is the
catalytic reforming of CH4 with stream at high temperature and atmospheric pressure
𝐶𝐻4 + 𝐻2 𝑂(𝑔) → 𝐶𝑂(𝑔) + 3𝐻2 (𝑔)
The only side reaction to be considered is:
𝐶𝑂(𝑔) + 𝐻2 𝑂(𝑔) → 𝐶𝑂2 (𝑔) + 𝐻2 (𝑔)
If the reactants is supplied in the ratio, 2 mol steam to 1 mol CH4 to the reactor and the
conversion of CH4 is 90% and the product stream contains 17.4 mol % CO, calculate
the flow rate and the composition of the feed stream supplied to the mixer and the flow
rate and the composition of the product stream coming out from the separator. The
separator after the reactor separates 99% of CH4 and is recycled back to the reactor.

20

You might also like