Chapter16-equlibrium

Example1-pg460

In [2]:
import math
#calculate entropy at the equllibrium state
##initialisation of variables
m= 10. ##kg
R= 8.314 ##J/mol K
k= 1.4
M= 29. ##kg
TA= 20. ##C
TB= 200. ##C
##CALCULATIONS
T= (TA+TB)/2
dS= 0.5*m*R*(math.log(273.15+T)*math.log(273.15+T))/((273.15+TA)*(273.15+TB))/((k-1)*M)
##RESULTS
print'%s %.4f %s'% ('entropy at the equillibrium state=',dS,'kJ/K')


##answer GIVEN IN THE TEXTBOOK IS WRONG
entropy at the equillibrium state= 0.0009 kJ/K

Example2-pg469

In [3]:
import math
#calcualte equlibrium pressure and diameter of droplet
##initialisation of variables
psat= 143.3 ##kPa
R= 8.314 ##J/mol K
T= 110. ##C
m= 18.02 ##gms
pv= 150. ##kPa
v= 0.001052 ##m^3/kg
s= math.pow(10,-3)
##CALCULATIONS
PL= psat+((R*(273.15+T)/(m*0.0010502))*math.log(pv/psat))
D= (4*s/(PL-pv))*(75.64-13.91*(T/100)-3*(T/100)*(T/100))*10*10*10
##RESULTS
print'%s %.f %s'% ('equilibrium pressure=',PL-13,'kPa')
print'%s %.4f %s'% ('diameter of droplet=',D,'mm')
equilibrium pressure= 7822 kPa
diameter of droplet= 0.0295 mm