import math
# Nucleate Boiling of Water in a Pan
Ts = 108. #Temp of surface of bottom of pan[degree Celcius]
Tsat = 100. #Saturation temp of water[degree Celcius]
D = 0.3 #Diameter[m]
#Properties of water at the saturation temp
rho_l = 957.9 #Density of liquid[kg/m**3]
rho_v = 0.6 #Density of vapour[kg/m**3]
Pr_l = 1.75 #Prandtl no of liquid
mu_l = 0.282*10**(-3) #Vismath.cosity of liquid[kg/m.s]
Cp_l = 4217 #Specific Heat of liquid[J/kg.degree Celcius]
h_fg = 2257*10**3 #[J/kg]
sigma = 0.0589 #[N/m]
g = 9.81 #Acc due to gravity[m/s**2]
Csf = 0.0130
n = 1.0;
# Calculations and Results
q_nuc = mu_l*h_fg*((g*(rho_l-rho_v)/sigma)**(1./2))*((Cp_l*(Ts-Tsat)/(Csf*h_fg*(Pr_l**n)))**3) #[W/m**2]
A = math.pi*(D**2)/4 #Surface Area of bottom of the pan[m**2]
Q_boiling = A*q_nuc #[W]
print "(a) The rate of heat transfer during nucleate boiling becomes ",Q_boiling,"W"
#Solution(b):-
m = Q_boiling/h_fg #[kg/s]
print "The rate of Evaporation of water is",m,"kg/s"
import math
# Peak Heat Flux in Nucleate Boiling
# Variables
D = 0.01 #[m]
Tsat = 100 #Saturation Temperature[degree Celcius]
sigma = 0.0589 #[N/m]
#Properties of water at saturation temperature
rho_l = 957.9 #[kg/m**3]
rho_v = 0.6 #[kg/m**3]
h_fg = 2257*10**3 #[J/kg]
mu_l = 0.282*10**(-3) #[kg/m.s]
Pr_l = 1.75 #Prandtl number
Cp_l = 4217 #[J/kg.degree Celcius]
Csf = 0.0130
n = 1.0;
g = 9.81 #[m/s**2]
# Calculations and Results
L_ = (D/2)*((g*(rho_l-rho_v)/sigma)**(1./2)) #dimensionless Parameter
#For this value of L_ we have
C_cr = 0.12 #Constant
q_max = C_cr*h_fg*((sigma*g*(rho_v**2)*(rho_l-rho_v))**(1./4)) #[W/m**2]
print "The maximum or critical heat flux is",q_max,"W/m**2"
Ts = (((q_max/(mu_l*h_fg*((g*(rho_l-rho_v)/sigma)**(1./2))))**(1./3))*(Csf*h_fg*Pr_l**n)/Cp_l)+Tsat #[degree Celcius]
print "The surface temperature is",round(Ts),"degree Celcius"
import math
# Film Boiling of Water on a Heating Element
# Variables
D = 0.005 #[m]
e = 0.05 #Emissivity
Ts = 350 #Surface temperature[degree Celcius]
Tsat = 100 #[degree Celcius]
Tf = (Ts+Tsat)/2 #[degree Celcius]
g = 9.81 #[m/s**2]
#Properties of water at Tsat
rho_l = 957.9 #[kg/m**3]
h_fg = 2257*10**3 #[J/kg]
#Properties of vapor at film temp
rho_v = 0.444 #[kg/m**3]
Cp_v = 1951 #[J/kg.degree Celcius]
mu_v = 1.75*10**(-5) #[kg/m.s]
k_v = 0.0388 #[W/m.degree Celcius]
# Calculations and Results
q_film = 0.62*(((g*(k_v**3)*rho_v*(rho_l-rho_v)*(h_fg+(0.4*Cp_v*(Ts-Tsat))))/(mu_v*D*(Ts-Tsat)))**(1./4))*(Ts-Tsat) #[W/m**2]
print "The film boiling heat flux is",q_film,"W/m**2)"
q_rad = e*(5.67*10**(-8))*(((Ts+273)**4)-((Tsat+273)**4)) #[W/m**2]
print "The radiation heat flux is",q_rad,"W/m**2"
q_total = q_film+(3./4)*q_rad #[W/m**2]
print "The total heat flux is",q_total,"W/m**2"
Q_total = (math.pi*D*1)*q_total #[W]
print "The rate of heat transfer from the heating element to the water is",Q_total,"W"
import math
# Condensation of steam on a Vertical Plate
# Variables
Tsat = 100
Ts = 80 #[degree Celcius]
Tf = (Ts+Tsat)/2 #[degree Celcius]
L = 2
w = 3 #Dimensions of Plate[m]
g = 9.81 #[m/s**2]
#Properties of water at Tsat
h_fg = 2257*10**3 #[J/kg]
rho_v = 0.60 #[kg/m**3]
#Properties of liquid water at Tf
rho_l = 965.3 #[kg/m**3]
mu_l = 0.315*10**(-3) #[kg/m.s
Cp_l = 4206 #[J/kg.degree Celcius]
k_l = 0.675 #[W/m.degree Celcius]
nu_l = 0.326*10**(-6) #[m**2/s]
# Calculations and Results
h_fg_m = h_fg+0.68*Cp_l*(Tsat-Ts) #[J/kg]
print "The modified latent heat of vapourization is",h_fg_m,"J/kg"
Re = ((4.81+((3.70*L*k_l*(Tsat-Ts)*((g/nu_l**2)**(1./3)))/(mu_l*h_fg_m)))**(0.820));
print "For wavy laminar flow Reynolds number is",Re
h = (Re*k_l*((g/nu_l**2)**(1./3)))/((1.08*(Re**(1.22)))-5.2) #[W/m**2.degree Celcius]
print "The conensation heat transfer coefficient is",h,"W/m**2.degree Celcius"
As = w*L #[m**2]
Q = h*As*(Tsat-Ts) #[W]
print "The rate of heat transfer during condensation process is",Q,"W"
#Solution (b)
m = Q/h_fg_m #[kg/s]
print "The rate of condensation of steam is",m,"kg/s"
import math
# Condensation of steam on a Vertical Tilted Plate
# Variables
Tsat = 100
Ts = 80 #[degree Celcius]
Tf = (Ts+Tsat)/2 #[degree Celcius]
L = 2
w = 3 #Dimensions of Plate[m]
g = 9.81 #[m/s**2]
#Properties of water at Tsat
h_fg = 2257*10**3 #[J/kg]
rho_v = 0.60 #[kg/m**3]
#Properties of liquid water at Tf
rho_l = 965.3 #[kg/m**3]
mu_l = 0.315*10**(-3) #[kg/m.s
Cp_l = 4206 #[J/kg.degree Celcius]
k_l = 0.675 #[W/m.degree Celcius]
nu_l = 0.326*10**(-6) #[m**2/s]
theta = (math.pi/6) #Angle at which plate is tilted[radians]
# Calculations and Results
h_fg_m = h_fg+0.68*Cp_l*(Tsat-Ts) #[J/kg]
print "The modified latent heat of vapourization is",h_fg_m,"J/kg"
Re = ((4.81+((3.70*L*k_l*(Tsat-Ts)*((g/nu_l**2)**(1./3)))/(mu_l*h_fg_m)))**(0.820));
print "For wavy laminar flow Reynolds number is",Re
h = ((Re*k_l*((g/nu_l**2)**(1./3)))/((1.08*(Re**(1.22)))-5.2))*((math.cos(theta))**(1./4)) #[W/m**2.degree Celcius]
print "The conensation heat transfer coefficient is",h,"W/m**2.degree Celcius"
As = w*L #[m**2]
Q = h*As*(Tsat-Ts) #[W]
print "The rate of heat transfer during condensation process is",Q,"W"
#Solution (b)
m = Q/h_fg_m #[kg/s]
print "The rate of condensation of steam is",m,"kg/s"
import math
# Condensation of Steam on horizontal Tubes
# Variables
Tsat = 40 #[degree Celcius]
D = 0.03 #[m]
Ts = 30 #Outer Surface temperature of tube[degree Celcius]
Tf = (Ts+Tsat)/2 #Film Temperature[degree Celcius]
g = 9.81 #[m/s**2]
#Properties of water at the saturation temp
h_fg = 2407*10**3 #[J/kg]
rho_v = 0.05 #[kg/m**3]
#Properties of liquid water at the film temperature
rho_l = 994 #[kg/m**3]
Cp_l = 4178 #[J/kg.degree Celcius]
mu_l = 0.720*10**(-3) #[kg/m.s]
k_l = 0.623 #[W/m.degree Celcius]
# Calculations and Results
h_fg_m = h_fg+0.68*Cp_l*(Tsat-Ts) #[J/kg]
print "(a) The modified latent heat of vapourisation is",h_fg_m,"J/kg"
h_hori = 0.729*(((g*(rho_l**2)*h_fg_m*(k_l**3))/(mu_l*D*(Tsat-Ts)))**(1./4)) #[W/m**2.degree Celcius]
print "The heat transfer coefficient for condensation on a single horizontal tube is",h_hori,"W/m**2.degree Celcius"
As = math.pi*D*1 #[m**2]
Q = h_hori*As*(Tsat-Ts) #[W]
print "The rate of heat transfer during condensation Process is",Q,"W"
#Solution (b)
m = Q/h_fg_m #[kg/s]
print "(b) The rate of condensation of steam is",m,"kg/s"
import math
# Condensation of Steam on horizontal Tube Banks
# Variables
Tsat = 40 #[degree Celcius]
D = 0.03 #[m]
Ts = 30 #Outer Surface temperature of tube[degree Celcius]
Tf = (Ts+Tsat)/2 #Film Temperature[degree Celcius]
g = 9.81 #[m/s**2]
N = 3 #No of tubes in a vertical tier
N_total = 12 #Total number of tubes
#Properties of water at the saturation temp
h_fg = 2407*10**3 #[J/kg]
rho_v = 0.05 #[kg/m**3]
#Properties of liquid water at the film temperature
rho_l = 994 #[kg/m**3]
Cp_l = 4178 #[J/kg.degree Celcius]
mu_l = 0.720*10**(-3) #[kg/m.s]
k_l = 0.623 #[W/m.degree Celcius]
# Calculations and Results
h_fg_m = h_fg+0.68*Cp_l*(Tsat-Ts) #[J/kg]
print "(a) The modified latent heat of vapourisation is",h_fg_m,"J/kg"
h_hori_N = (0.729*(((g*(rho_l**2)*h_fg_m*(k_l**3))/(mu_l*D*(Tsat-Ts)))**(1./4)))*(1/(N**(1./4))) #[W/m**2.degree Celcius]
print "The heat transfer coefficient for condensation 12 horizontal tube is",h_hori_N,"W/m**2.degree Celcius"
As = math.pi*D*1*N_total #[m**2]
Q = h_hori_N*As*(Tsat-Ts) #[W]
print "The rate of heat transfer during condensation Process is",Q,"W"
#Solution (b)
m = Q/h_fg_m #[kg/s]
print "(b) The rate of condensation of steam is",m,"kg/s"
import math
# Replacing a Heat Pipe by a Copper Rod
# Variables
L = 0.3 #[m]
D = 0.006 #[m]
Q = 180. #[W]
del_T = 3. #Temperature Difference [degree Celcius]
#Properties of copper at room temperature
rho = 8933. #[kg/m**3]
k = 401. #[W/m.degree Celcius]
# Calculations and Results
A = Q*L/(k*del_T) #[m**2]
d = math.sqrt(4*A/math.pi) #[m]
print "The diameter of the copper pipe is",100*d,"cm"
m = rho*A*L #[kg]
print "Mass of the copper rod is",round(m),"kg"