# CHAPTER07:COMPRESSIBLE FLOW SOME PRELIMINARY ASPECTS¶

## Example E01 : Pg 222¶

In [1]:
# All the quantities are expressed in SI units
import math
l = 5.;                # dimensions of the room
b = 7.;
h = 3.3;
V = l*b*h;            # volume of the room
p = 101000.;           # ambient pressure
T = 273. + 25.;         # ambient temperature
R = 287.;              # gas constant
gam = 1.4;            # ratio of specific heats
cv = R/(gam-1.);
cp = gam*R/(gam-1.);

# the density can by calculaled by the ideal gas law
rho = p/R/T;

# thus the mass is given by
M = rho*V;

# from eq.(7.6a), the internal energy per unit mass is
e = cv*T;

# thus internal energy in the room is
E = e*M;

# from eq.(7.6b), the enthalpy per unit mass is given by
h = cp*T;

# Thus the enthalpy in the room is
H = M*h;

print"The internal energy in the room is: E =", E/10**7
print"The Enthalpy in the room is: H = ",H/10**7

The internal energy in the room is: E = 2.916375
The Enthalpy in the room is: H =  4.082925


## Example E02 : Pg 223¶

In [2]:
# All the quantities are expressed in SI units

p_inf = 22790.9;            # ambient pressure at 36000 ft
T_inf = 217.2;              # ambient temperature at 36000 ft
p = 19152;                  # pressure at the given point
gam = 1.4;

# thus the temperature at the given point can be calculated by eq.(7.32) as
T = T_inf*((p/p_inf)**((gam-1)/gam));

print"The temperature at the given point is: T =",T,"K"

The temperature at the given point is: T = 206.668775312 K


## Example E03 : Pg 223¶

In [2]:
# All the quantities are expressed in SI units

p =101000;                # static pressure
T = 320;                  # static temperature
v = 1000;                 # velocity
gam = 1.4;                # ratio of specific heats
R = 287;                  # universal gas constant
cp = gam*R/(gam-1);       # specific heat at constant pressure

# from eq.(7.54), the total temperature is given by
T0 = T + (v**2)/2/cp;

# from eq.(7.32),the total pressure is given by
p0 = p*((T0/T)**(gam/(gam-1)));

p0_atm = p0/101000;

print"The total temperature and pressure are given by: T0 =",T0,"K"
print"P0 =",p0_atm,"atm"

The total temperature and pressure are given by: T0 = 817.760079642 K
P0 = 26.678766535 atm