# Chapter 5 - Actual Gases¶

## Example 1 - Pg 74¶

In [1]:
#calculate the volume occupied by the gas and also the tabulated volume
#Initialization of variables
m=20. #lbm
P=1000. #psia
T=580. #R
R=35.12
#calculations
print '%s' %("From table 5-2,")
z=0.667
V=z*m*R*T/(P*144.)
vt=0.0935
vtt=vt*m
#results
print '%s %.3f %s' %("Volume occupied =",V,"cu ft")
print '%s %.2f %s' %("\n Tablulated value for volume =",vtt," cu ft")

From table 5-2,
Volume occupied = 1.887 cu ft

Tablulated value for volume = 1.87  cu ft


## Example 2 - Pg 74¶

In [3]:
#calculate the pressure obtained and theoretical pressure
#Initialization of variables
m=90 #lbm
T=200+459.7 #R
Tc=232.7+459.7 #R
R0=1545.
M=120.9
V=30. #cu ft
#calculations
R=R0/M
print '%s' %("From fig 5.5")
z=0.883
P=z*R*m*T/V/144.
vc=V/m
P2=156.1 #psia
#results
print '%s %.2f %s' %("Pressure obtained =",P,"psia")
print '%s %.1f %s' %("\n Theoretical pressure =",P2,"psia")

From fig 5.5
Pressure obtained = 155.08 psia

Theoretical pressure = 156.1 psia


## Example 3 - Pg 84¶

In [5]:
#calculate the heat added in both cases
#Initialization of variables
import math
T1=140+460. #R
T2=240 +460. #R
N=1.
#calculations
Q=N*(9.47*(T2-T1)-3.47*1000. *math.log(T2/T1) -1.16*math.pow(10,6) *(1/T2-1/T1))
Tm=(T1+T2)/2
Cp=9.47-3.47*1000. /Tm +1.16*math.pow(10,6) /Tm/Tm
Q2=N*Cp*(T2-T1)
#results
print '%s %d %s' %("Heat added in case 1 =",Q,"Btu")
print '%s %.1f %s' %("\n Heat added in case 2 =",Q2,"Btu")

Heat added in case 1 = 688 Btu

Heat added in case 2 = 687.7 Btu


## Example 4 - Pg 85¶

In [6]:
#calculate the heat added in both cases
#Initialization of variables
import math
Rj=1.985
N=1
T1=540.+460 #R
T2=3540.+460 #R
#calculations
Q=N*(14.215*(T2-T1)-6.53*1000. *math.log(T2/T1) -1.41*math.pow(10,6) *(1/T2-1/T1))
Tm=(T1+T2)/2
Cv=14.215-6.53*1000. /Tm +1.41*math.pow(10,6) /Tm/Tm
Q2=N*Cv*(T2-T1)
#results
print '%s %.1f %s' %("Heat added in case 1 =",Q,"Btu")
print '%s %.1f %s' %("\n Heat added in case 2 =",Q2,"Btu")

Heat added in case 1 = 34650.0 Btu

Heat added in case 2 = 35485.8 Btu