import math
dV = 0.5 # Change in volume in m**3
P = 101.325e03 # Atmospheric pressure in N/m**2
Wd = P*dV # Work done in J
print "\n Example 3.1"
print "\n The amount of work done upon the atmosphere by the balloon is ",Wd/1e3," kJ",
#The answers vary due to round off error
import math
dV = 0.6 # Volumetric change in m**3
P = 101.325e03 # Atmospheric pressure in N/m**2
Wd = P*dV # Work done in J
print "\n Example 3.2"
print "\n The displacement work done by the air is ",Wd/1e3 ," kJ"
#The answers vary due to round off error
import math
# Given that
T = 1.275 # Torque acting against the fluid in mN
N = 10000 # Number of revolutions
W1 = 2*math.pi*T*1e-3*N # Work done by stirring device upon the system
P = 101.325e03 # Atmospheric pressure in kN/m**2
d = 0.6 # Piston diameter in m
A = (math.pi/4)*(d)**2 # Piston area in m
L = 0.80 # Displacement of diameter in m
W2 = (P*A*L)/1000 # Work done by the system on the surroundings i KJ
W = -W1+W2 # net work transfer for the system
print "\n Example 3.3"
print "\n The net work transfer for the system is ",round(W,2) ," kJ"
#The answers vary due to round off error
import math
# Given that
ad = 5.5e-04 # Area of indicator diagram in m**2
ld = 0.06 # Length of diagram in m
k = 147 # Spring value in MPa/m
w = 150 # Speed of engine in revolution per minute
L = 1.2 # Stroke of piston in m
d = 0.8 # Diameter of the cylinder in m
A = (math.pi/4)*(0.8**2) # Area of cylinder
Pm = (ad/ld)*k # Effective pressure in MPa
W1 = Pm*L*A*w # Work done in 1 minute MJ
W = (12*W1)/60 # The rate of work transfer gas to the piston in MJ/s
print "\n Example 3.4"
print "\n The rate of work transfer from gas to the piston is ",W*1e3 ," kW"
#The answers vary due to round off error
import math
#Given that
m = 5 # mass flow rate in tones/h
Ti = 15 # Initial temperature in degree Celsius
tp = 1535 # Phase change temperature in degree Celsius
Tf = 1650 # Final temperature in degree Celsius
Lh = 270 # Latent heat of iron in kJ/Kg
ml = 29.93 # Specific heat of iron in liquid phase in kJ/Kg
ma = 56 # Atomic weight of iron
sh = 0.502 # Specific heat of iron in solid phase in kJ/Kg
d = 6900 # Density of molten metal in kg/m**3
n=0.7 # furnace efficiency
l_d_ratio = 2 # length to diameter ratio
print "\n Example 3.5"
h1 = sh*(tp-Ti) # Heat required to raise temperature
h2 = Lh # Heat consumed in phase change
h3 = ml*(Tf-tp)/ma # Heat consumed in raising temperature of molten mass
h = h1+h2+h3 # Heat required per unit mass
Hi = h*m*1e3 # Ideal heat requirement
H = Hi/(n*3600) # Actual heat requirement
V = (3*m)/d # Volume required in m**3
d = (4*V/(math.pi*l_d_ratio))**(1/3) # Diameter of furnace
l = d*l_d_ratio # Length of furnace
print "\n Rating of furnace would be ",H/1e3 ," *1e3 kW"
print "\n Diameter of furnace is ",d ," m"
print "\n Length of furnace is ",l ," m"
#The answer provided in the textbook is wrong
import math
# Given that
SH = 0.9 # Specific heat of aluminium in solid state in kJ/kgK
L = 390 # Latent heat in kJ/kg
aw = 27 # Atomic weight
D = 2400 # Density in molten state in kg/m**3
Tf = 700 # Final temperature in degree Celsius
Tm = 660 # Melting point of aluminium in degree Celsius
Ti = 15 # Initial temperature in degree Celsius
HR = SH*(Tm-Ti)+L+(29.93/27)*(Tf-Tm) # Heat requirement
HS = HR/0.7 # Heat supplied
RM = 2.17e3*3600/HS # From the data of problem 3.7
V = 2.18 # Volume in m**3
M = V*D
print "\n Example 3.6"
print "\n Rate at which aluminium can be melted is ",round(RM/1e3,2) ," tonnes/h"
print "\n Mass of aluminium that can be held in furnace is ",M/1e3 ,"tonnes"