The Museum of HP Calculators

# Ideal Gas Equation of State for the HP-33E/C

This program is Copyright © 1978 by Hewlett-Packard and is used here by permission. This program was originally published in "HP-33E Student Engineering Applications".

This program is supplied without representation or warranty of any kind. Hewlett-Packard Company and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

## Overview

Many gases obey the ideal gas laws quite closely at reasonable temperatures and pressures. This program calculates any one of the four variables when data for the other three and the universal gas constant are entered. Likewise the value of the universal gas constant can be determined by entering data for the four variables.

Equation:

PV = nRT

Where:
 P is the absolute pressure V is the volume n is the number of moles present R is the universal gas constant T is the absolute temperature

 Value of R Units of R Units of P Units of V Units of T 8.314 N-m/g mole- K N/m2 m3/g mole K 83.14 cm3-bar/g mole- K bar cm3/g mole K 82.05 cm3-atm/g mole- K atm cm3/g mole K 0.08205 l-atm/g mole- K atm l/g mole K 0.7302 atm-ft3/lb mole-°R atm ft3/lb mole °R 10.73 psi-ft3/lb mole-°R psi ft3/lb mole °R 1545 psf-ft3/lb mole-°R psf ft3/lb mole °R

Remarks:

• At low temperatures or high pressures the ideal gas law does not represent the behavior of real gases.
• The value of R used must be compatible with the units of P, V, T.
• In running the program be sure to enter zero for the variable to be calculated.

## Instructions

 Step Instructions Input Data/Units Keys Output Data/Units 1 Enter program 2 Set display and initialize f FIX 2 f PRGM 3 Input variables* Pressure P ENTER Volume V R/S Number of moles n ENTER Universal gas constant** R ENTER Absolute temperature T 4 a) To calculate P or V R/S P or V or b) To calculate n, R or T R/S R/S n, R or T 5 To change conditions: a) Go to step 3, or, b) Store new variable in proper register (see register contents) and store 1 in register of variable to be calculated, then, for P or V GSB 16 P or V or, for n, R or T GSB 16 R/S n, R or T * Note: variables must be input in order shown. Input zero for variable to be calculated. ** Be sure R is in units compatible with units of variables.

## Example

0.63 moles of air are enclosed in 25000 cm3 at 1200K. What is the pressure in bars? In atmospheres? Assume and ideal gas. (R = 83.14 cm3-bar/g mole-K or 82.05 cm3-atm/g mole-K)

```Keystrokes          Display
f FIX 2 f PRGM
0 ENTER
25000 R/S
.63 ENTER
83.14 ENTER
1200 R/S            2.51    (bars)
82.05 STO 4
GSB 16              2.48    (atm)
```

## The Program

```LINE    CODE    KEYS
00             f CLEAR PRGM
01     12 28   GSB 28
02     23  2   STO 2
03        22   Roll dn
04     12 28   GSB 28
05     23  1   STO 1
06        22   Roll dn
07        74   R/S
08     12 28   GSB 28
09     23  5   STO 5
10        22   Roll dn
11     12 28   GSB 28
12     23  4   STO 4
13        22   Roll dn
14     12 28   GSB 28
15     23  3   STO 3
16     24  3   RCL 3
17     24  4   RCL 4
18        61   x
19     24  5   RCL 5
20        61   x
21     24  1   RCL 1
22     24  2   RCL 2
23        61   x
24        71   ÷
25        74   R/S
26     15  3   g 1/x
27     13 00   GTO 00
28     15 61   g x!=0
29     15 12   g RTN
30        22   Roll dn
31         1   1
32     15 12   g RTN
```

```R1  P
R2  V
R3  n
R4  R
R5  T
```