In [1]:

```
# Variables
d_r = 13640.; # Density of mercury in kg/m3
g = 9.79; # Acceleration due to gravity in m/s2
z = 562e-03; # Difference in height in m
z0 = 761e-03; # Reading of barometer in m
# Calculation
P = (d_r*g*(z+z0))*(0.987/1e05); # Gas Pressure in bar
# Results
print "Gas Pressure is %.3f bar"%P
```

In [6]:

```
# Variables
d_r = 13.6e03; # Density of mercury in kg/m3
g = 9.81; # Acceleration due to gravity in m/s2
z = 710e-03; # Stean flow pressure in m
z0 = 772e-03; # Reading of barometer in m
P = 1.4e06; # Gauge pressure of applied steam in Pa
# Calculation
P0 = d_r*g*z0; # Atmospheric pressure in Pa
Pi = P+P0 ; # Inlet steam pressure in Pa
Pc = d_r*g*(z0-z); # Condenser pressure in Pa
# Results
print "Inlet steam pressure is %.3e Pa"%Pi
print "Condenser pressure is %.2e Pa"%Pc
```

In [3]:

```
# Variables
z = 0.760; # Barometer reading in m
# Part (a)
h1 = 40e-02; # Mercury height in vaccume in m
d_r = 13.6e03; # Density of mercury in kg/m3
g = 9.80; # Acceleration due to gravity in m/s2
# Calculation and Results
Patm = z*d_r*g; # Atmospheric pressure in Pas
Pv = h1*d_r*g; # Pressue in vaccume in Pa
Pabst = Patm-Pv; # Absolute pressure in Pa
Pabs = 101.325 - Pv/1000
print "Pvaccum = %.2f kPa"%(Pv/1000)
print "Pabsolute = %.f"%(Pabst/1000),"kPa"
print "40 cmHg vacuum : %.3f kPa"%Pabs
# Part (b)
h2 = 90e-02; # Mercury height in gauge in m
Pg = h2*d_r*g; # Gauge Pressure in Pa
Pabs1 = Patm + Pg ; # Absolute pressure in Pa
print "\nPgauge = %.f kPa"%(Pg/1000)
print "90cmHg gauge is %.3f"%(Pabs1/1000),"kPa"
# Part(c)
d_w = 1e03 ; # Density of water in kg/m3
h3 = 1.2 ; # Gauge Pressure water height in m
Pga = d_w*h3*g; # Gauge Pressure in Pa
Pabs3 = Patm + Pga ; # Absolute pressure in Pa
print "\n1.2 m H2O gauge is %.3f"%(Pabs3/1000),"kPa"
# rounding off error
```

In [23]:

```
from scipy.integrate import quad
# Variables
Pr = 1.033e05; # Required Pressure in bar
# Calculation
def pressure(p):
return p**(-0.714);
g = 9.81; # Acceleration due to gravity in m/s2
H = ((2.5e05**0.714)/g)* quad(pressure,0,Pr)[0]; # Depth of atmosphere required in m
# Results
print "The depth of atmosphere required is %.3f Km"%(H/1000)
# note : there will be rounding off error because of quad function
```

In [6]:

```
# Variables
m = 68. ; # Astronaut mass in Kg
g = 9.806; # Acceleration due to gravity in m/s2
# Calculation
a = 10*g ; # Lift off acceleration in m/s2
F = m*a; # Net vertical force in N
# Results
print "Net vertical force experienced by astronaut is %.0f N"%F
```