In [2]:

```
# Variables
F = 300; #[N]
g_local = 4.5; #local gravitational acceleration[m/s**2]
g_earth = 9.81; #earth's gravitational acceleration[m/s**2]
# Calculations
#To find man's mass and weight on earth
m = F/g_local; #mass of man[kg]
w = m*g_earth; # weight of man on earth[N]
# Results
print 'Mass of man is %f kg'%m
print '\nWeight of man on earth is %f N'%w
```

In [2]:

```
# Variables
p1 = 1.15*10**5; #measured pressure[N/m**2]
p2 = 1.01325*10**5; #atmospheric pressure[N/m**2]
rho = 2.95*10**3; #specific gravity of fluid
g = 9.8067
# Calculations
#To find height of manometer fluid
p = p1-p2; #difference in pressure
h = p/(rho*g); #height of manometer fluid[m]
# Results
print 'Height of manometer fluid is %f m'%h
```

In [3]:

```
# Variables
PE = 1.5*10**3; #potential energy[J]
m = 10; #mass in kg
u = 50; # velocity in m/s
g = 9.8067
# Calculations
h = PE/(m*g); # height from ground in m
#Using equation 1.9 (Page no. 8)
KE = 0.5*m*(u**2); # Kinetic energy in J
# Results
print 'Height from ground is %f m'%h
print '\nKinetic Energy of body is %3.2e J'%KE
```

In [10]:

```
# Variables
#Given
F = 600.; #weight in N
t = 120.; #time in sec
h = 0.18; #height of stairs in m
# Calculations
#To determine the power developed in man
S = 20*h; #total vertical displacement in m
W = F*S; #work done in J
P = W/t; #power developed
# Results
print 'Power developed is %i W'%P
```

In [4]:

```
import math
# Variables
#Given:
A = (math.pi/4)*(0.1**2); #area in m**2
P = 1.01325*10**5; #pressure in N/m**2
m = 50; #mass of piston and weight in kg
g = 9.81; #acceleration due to gravity (N/m**2)
# Calculations and Results
#To determine the force exerted pressure work done and change in potential energy
#(a)
Fa = P*A; #force exerted by atmosphere in N
Fp = m*g; #force exerted by piston and weight in N
F = Fp+Fa; #total force exerted in N
print 'Total force exerted by the atmosphere, the piston and the weight is %f N'%F
#(b)
Pg = F/A; #pressure of gas in N/m**2
print 'Pressure of gas is %5.4e N/m^2'%Pg
#(c)
S = 0.4; #displacement of gas in m
W = F*S; #work done by gas in J
print 'Work done by gas is %f J'%W
#(d)
PE = m*g*S; #change in potential energy in J
print 'Change in potential energy is %f J'%PE
```

In [12]:

```
import math
# Variables
#P =(2*10**5)*D
Df = 2.5; #final diameter (m)
Di = 0.5; #initial diameter(m)
# Calculations
#To determine work done by gas
W = (math.pi/4)*10**5*((Df**4)-Di**4);
# Results
print 'Work done by gas is %6.4e J'%W
```

In [1]:

```
# Variables
T = 300.; #temperature in K
P = 6.5*10**5; #pressure in N/m**2
Pa = 1.01325*10**5; #atmospheric pressure in N/m**2
R = 8.314; #ideal gas constant
m = 2.; #mass of gas (kg)
M = 44.; #molecular weihgt of gas
# Calculations
#To find the work done on surrounding
n = m/M; # n is number of kmoles
Vi = (n*R*10**3*T)/P; # initial volume in m**3
Vf = 2*Vi; #final volume in m**3
V = Vf-Vi; #change in volume
Ps = Pa+(5000*9.8067); #pressure on surroundings
W = Ps*V; #work done on the surroundings
# Results
print 'Work done on surroundings is %5.2e J'%W
```

In [12]:

```
import math
from scipy import integrate
#Taking 3rd and 2nd order derivative respectively, we get the following expression
#x = ((2*10**5*math.pi)/2)*
D = lambda x: x**3
integ,err = integrate.quad(D,0.5,2.5)
print integ
#integ,err = integrate.quad(D**3,0.5,2.5)
#print integ
```

In [ ]:

```
```