CHAPTER 1 : Basic Principles

Ex1.2 : PG-9

In [77]:
# initialization of variables
m=10 # mass in Kg
V=5 # velocity in m/s

KE=m*V**2/2 # kinetic energy in N-m 
print "The Kinetic Energy is ",round(KE)," N.m"
The Kinetic Energy is  125.0  N.m

Ex1.3 : PG-10

In [78]:
# initialization of variables
V= 3*5*20; # Volume of air in m^3 from dimensions
m= 350.0; # mass in kg
g= 9.81; # gavitational acceleration in m/s^2

rho=m/V;# density
print " The Density is ",round(rho,3),"kg/m^3 \n"

v= 1/rho # specific volume of air
print " The specific volume  is", round(v,3),"m^3/kg \n"

gama= rho*g # specific weight of air
print " The specific weight is", round(gama,2)," N/m^3"
 The Density is  1.167 kg/m^3 

 The specific volume  is 0.857 m^3/kg 

 The specific weight is 11.45  N/m^3

Ex1.4 : PG-13

In [79]:
# initialization of variables
h=0.020 # height of mercury in m
gammawater=9810 # specific weight of water in N/m^3
Patm=0.7846*101.3 # atmospheric pressure in kPa from table B.1

Pgauge=13.6*gammawater*h/1000 # pressure in Pascal from condition gammaHg=13.6*gammawater

P=(Pgauge+Patm)# absolute pressure in KPa
#result
print "The Pressure is",round(P,2)," kPa"
The Pressure is 82.15  kPa

Ex1.5 : PG-13

In [80]:
import math
# initialization of variables
d=10.0/100 # diameter of cylinder in 'm'
P=600 # pressure in KPa
Patm=100 # atmospheric pressure in Kpa
K=4.8*1000 # spring constant in N/m 

deltax=(P-Patm)*(math.pi*1000*d**2)/(4*K) # by balancing forces on piston
#result
print "The Compression in spring is",round(deltax,3)," m"
The Compression in spring is 0.818  m

Ex1.6 : PG-16

In [81]:
# initialization of variables
ma=2200 # mass of Automobile 'a' in kg
va=25 #velocity of Automobile 'a' in m/s before collision
va1=13.89 # velocity of Automobile 'a' after collision in m/s
mb=1000 # mass of Automobile 'b' in kg
vb=24.44 #velocity of Automobile 'b' after collision in m/s

KE1=(ma*va**2)/2 # kinetic energy before collision
KE2=(ma*va1**2)/2+(mb*vb**2)/2 # kinetic energy after collision
U=(KE1-KE2)/1000 # internal energy from conservation of energy principle in kJ
#result
print "The increase in kinetic energy is of",round(U,1)," kJ"
The increase in kinetic energy is of 176.6  kJ