You are on page 1of 2

Exercise 1 - Gas Density Calculation.

The task is to reproduce the spreadsheet shown in the lecture and printed out below.
This can be broken down into several stages. It is probably a good idea to work
through the example in the manual before starting this exercise if you are not familiar
with Excel.

The purpose of your spreadsheet is to calculate the density of an ideal gas given its
molecular weight for a range of temperatures at a given pressure. The user should be
able to specify the molecular weight, the pressure in bar and the temperature range in
°C.

Your Spreadsheet must have the following features:


1. A title in a font which is different from the rest of the sheet.
2. A short summary of the purpose of the spreadsheet and what it does.
3. An easily identifiable area where variables and constants are entered, as opposed
to quantities that are calculated. This area should include anything you might want
to change as well as any constants.
4. An area where calculated quantities are displayed.

Gas Density Calculation


The density of a gas is calculated using PV=nRT
Density =Mn/V=MP/RT
P is given, T varies between Tmin and Tmax

Variables and Constants Temperature C Temperature K Density kg/m3


Pressure 1 bara 800 1073 0.325
R 8.314 kJ/kmolK 840 1113 0.313
Tmin 800 C 880 1153 0.303
Tmax 1200 C 920 1193 0.292
Mol wt 29 kg/kmol 960 1233 0.283
1000 1273 0.274
1040 1313 0.266
1080 1353 0.258
1120 1393 0.250
1160 1433 0.243
1200 1473 0.237
Useful Information and hints.

The ideal gas equation is PV = nRT where P is the absolute pressure, V is the gas
volume, R is the gas constant, n is the number of moles present and T is the absolute
temperature.

We require the density of the gas, which can be calculated from the equation above.
mass of material
To do this we think about density ρ, which is defined as . In order to
volume occupied
determine the mass of material present we need an additional piece of information;
the molecular weight of the substance, we will call this M. The mass present is then
Mn
given by mass = Mn . The density is then ρ = rearranging the ideal gas equation
V
n P Mn MP
gives = , so = , the equation used in the spreadsheet.
V RT V RT

Stages in building up your spreadsheet:


First put in the title, description and box of constants and variables.

I think giving the constants and variables names helps in composing the formulae.

Think about units! What units do you need in the equation to make it consistent?

Calculate the density at one temperature first then think about how to get the range of
temperatures. Think about how you would go about getting 11 (Tmin, Tmax and 9
intermediate temperatures) evenly spaced temperatures manually, then think about
how to do this automatically.

For this exercise you should print out 2 copies of your spreadsheet, one similar to the
one on the previous page and one showing the formulae you have used. The second is
produced by selecting Options on the Tools menu then on the View menu select
formulas in the Window option section. This exercise is not assessed, but you are
advised to show the two copies to me so that comments can be given on layout and
functionality of the spreadsheet.

Based on a document produced by Dr J M Skilling


Dr John Christy
28th January 2000

You might also like