PKjfIz~I;sYsY7Heat And Mass Transfer - A Practical Approach/ch1.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 1 : Introduction and basic concepts"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Heat needs to be transferred to the copper ball to heat it from 100 to 150 degree celsius is 92.5526285717 kJ\n",
"Average Heat Transfer by the iron ball is 51.4181269843 W\n",
"Average flux is 1636.68981481 W/m**2\n"
]
}
],
"source": [
"# Heating of a copper ball\n",
"\n",
"import math \n",
"# Variables\n",
"#(a)\n",
"#density of the copper ball\n",
"rho = 8950\t\t\t#[kg/m**3]\n",
"#Diameter of the copper ball\n",
"D = 0.1\t\t\t#[m]\n",
"#mass of the ball\n",
"m = rho*(math.pi/6)*(D**3)\t\t\t#[kg]\n",
"#Specific Heat of copper\n",
"Cp = 0.395\t\t\t#[kJ/Kg/m**3]\n",
"#Initial Temperature\n",
"T1 = 100\t\t\t#[degree C]\n",
"#Final Temperature\n",
"T2 = 150\t\t\t#[degree C]\n",
"\n",
"# Calculations and Results\n",
"# The amount of heat transferred to the copper ball is simply the change in it's internal energy and is given by\n",
"# Energy transfer to the system = Energy increase of the system\n",
"Q = (m*Cp*(T2-T1));\n",
"print \"Heat needs to be transferred to the copper ball to heat it from 100 to 150 degree celsius is \",Q,\"kJ\"\n",
"\n",
"#b\n",
"#Time interval for which the ball is heated\n",
"dT = 1800\t\t\t#[seconds]\n",
"Qavg = (Q/dT)*1000\t\t\t#[W]\n",
"print \"Average Heat Transfer by the iron ball is \",Qavg,\"W\"\n",
"\n",
"#(c)\n",
"#Heat Flux\n",
"qavg = (Qavg/(math.pi*(D**2)))\t\t\t#[W/m**2]\n",
"print \"Average flux is\",qavg,\"W/m**2\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.2"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time needed for this heater to supply 429.856 kJ of heat is 6.0 minutes\n"
]
}
],
"source": [
"# Heating of water in an Electric Teapot\n",
"\n",
"# Variables\n",
"#Mass of liquid water\n",
"m1 = 1.2\n",
"m2 = 0.5\t\t\t#[Kg]\n",
"#Initial Temperature\n",
"t1 = 15\t\t\t #[Degree Celcius]\n",
"#Final Temperature\n",
"t2 = 95\t\t \t#[Degree Celcius]\n",
"#Specific heat of water\n",
"cp1 = 4.186\t\t\t#[kJ/kG.K]\n",
"#Specific heat capacity of teapot\n",
"cp2 = .7\t\t\t#[]\n",
"\n",
"# Calculations\n",
"Em = (m1*cp1*(t2-t1))+(m2*cp2*(t2-t1))\t\t\t#[kJ]\n",
"#Rating of Electric Heating Equipment\n",
"Em1 = 1.2 \t\t\t#[kJ/s]\n",
"dt = (Em/Em1)/60\t\t\t#[seconds]\n",
"\n",
"# Results\n",
"print \"Time needed for this heater to supply \",Em,\"kJ\",\"of heat is\",round(dt),\"minutes\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.3"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The constant pressure specific heat of air at the average temperature of 330 K is 1.007 kJ/kg\n",
"mass flow rate of air through the duct is 0.261585627439 kg/s\n",
"The rate of heat loss by the air is 1.58050036099 kJ/s\n",
" Cost of heat loss to the home owner is $ 0.107863531745 per hour\n"
]
}
],
"source": [
"# Heat Loss from Heating Ducts in a Basement\n",
"\n",
"# Variables\n",
"T_in = 60+273\t\t\t#Temperature of hot air while entering the duct[K]\n",
"T_out = 54+273\t\t\t#Temperature of hot air while leaving the duct[K]\n",
"T_avg = (T_in+T_out)/2\t\t\t#Average temperature of air[K]\n",
"\n",
"# Calculations and Results\n",
"Cp = 1.007\t\t\t#[kJ/kg]\n",
"print \"The constant pressure specific heat of air at the average temperature of\",T_avg,\"K is\",Cp,\"kJ/kg\"\n",
"\n",
"P = 100 \t\t\t#Pressure of air while entering the duct[kPa]\n",
"R = 0.287\t\t\t#Universal Gas Consmath.tant[kPa.(m**3/kg).K]\n",
"v = 5\t \t\t#Average velocity of flowing air[m/s]\n",
"neta = 0.8\t\t\t#Efficiency of natural gas furnace\n",
"ucost = 1.60\t\t\t#Cost of natural gas in that area[$/therm],where 1therm = 105,500kJ\n",
"#Solution;-\n",
"rho = P/(R*T_in)\t\t\t#The density of air at the inlet conditions is[kg/m**3]\n",
"Ac = 0.20*0.25\t\t\t#Cross sectional area of the duct[m**2]\n",
"m_ = rho*v*Ac\t\t\t#[kg/s]\n",
"print \"mass flow rate of air through the duct is\",m_,\"kg/s\"\n",
"\n",
"Q_loss = m_*Cp*(T_in-T_out)\t\t\t#[kJ/s]\n",
"print \"The rate of heat loss by the air is\",Q_loss,\"kJ/s\"\n",
"\n",
"cost = (Q_loss*3600)*(ucost)*(1./105500)*(1/neta)\t\t\t#[$/h]\n",
"print \" Cost of heat loss to the home owner is\" ,\"$\",cost,\"per hour\"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.4"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The specific heat capacities of air at the average temperature of 288 K 0.72 and 1.007 kJ/kg.K\n",
"Mass of air in the room is 624.961524729 kg\n",
"The amount of energy transferred to air at constant volume is 4499.72297805 kJ\n",
"Cost of Energy is $ 0.0937442287093\n",
"The amount of energy transferred to air at constant is 6293.36255402 kJ\n",
"Cost of Energy is $ 0.131111719875\n"
]
}
],
"source": [
"# Electric Heating of a House at High Elevation\n",
"\n",
"# Variables\n",
"#(a)\n",
"t1 = 10+273\t\t\t#Initial temperature of house[K]\n",
"t2 = 20+273\t\t\t#Temperature after turning on heater[K]\n",
"\n",
"# Calculations and Results\n",
"tavg = (t1+t2)/2\t\t\t#Average temperature[K]\n",
"cp = 1.007\t\t\t#[kJ/kg.K]\n",
"cv = .720\t\t\t#[kJ/kg.K]\n",
"print \"The specific heat capacities of air\",\"at the average temperature of\",tavg,\"K\",cv,\"and\",cp,\"kJ/kg.K\"\n",
"\n",
"A = 200 \t\t\t#The floor area[m**2]\n",
"h = 3\t \t\t#Height of room[m]\n",
"V = A*h\t\t \t#Volume of the air in the house[m**3]\n",
"P = 84.6\t\t\t #Pressure [kPa]\n",
"R = 0.287\t\t\t #Universal gas consmath.tant[kPa.m**3/kg.K]\n",
"m = (P*V)/(R*t1)\t\t\t#[kg]\n",
"print \"Mass of air in the room is\",m,\"kg\"\n",
"\n",
"Eincv = m*cv*(t2-t1);\n",
"print \"The amount of energy transferred to air at constant volume is \",Eincv,\"kJ\"\n",
"\n",
"u_cost = 0.075\t\t\t#Unit math.cost of energy[$/kWh]\n",
"Cost1 = (Eincv*u_cost)/(3600)\t\t\t#[$]\n",
"print \"Cost of Energy is $\",Cost1\n",
"\n",
"#(b)\n",
"Eincp = m*cp*(t2-t1)\t\t\t#[kJ]\n",
"print \"The amount of energy transferred to air at constant is \",Eincp,\"kJ\"\n",
"\n",
"Cost2 = (Eincp*u_cost)/3600\t\t\t#[$]\n",
"print \"Cost of Energy is $\",Cost2\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.5"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The steady rate of heat transfer through the roof is 1689.6 W\n",
"The amount of heat lost through the roof 16.896 kWh and its cost is $ 1.35168\n"
]
}
],
"source": [
"# The cost of Heat loss through a Roof\n",
"\n",
"# Variables\n",
"k = 0.8\t\t\t#The thermal conductivity of the roof[W/m.degree.C]\n",
"A = 6*8\t\t\t#Area of the roof[m**2]\n",
"t1 = 15\t\t\t#temperature of inner surface roof[degree C]\n",
"t2 = 4\t\t\t#temperature of outer surface roof[degree C]\n",
"L = 0.25\t\t\t#thickness of roof[m]\n",
"\n",
"# Calculations and Results\n",
"Q_ = k*A*(t1-t2)/L\t\t\t#[W]\n",
"print \"The steady rate of heat transfer through the roof is\",Q_,\"W\"\n",
"\n",
"#(b)\n",
"dt = 10. \t\t\t#time period[h]\n",
"Q = Q_*dt/1000\t\t\t#[kWh]\n",
"u_cost = 0.08\t\t\t#Unit math.cost of energy[$/kWh]\n",
"Cost = Q*u_cost\t\t\t#[$]\n",
"print \"The amount of heat lost through the roof\",Q,\"kWh\",\"and its cost is $\",Cost\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.6"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The electrical power consumed by the resismath.tance heater and converted to heat is 44.0 W\n",
"The rate of heat flow through each sample 22.0 W\n",
"The thermal conductivity of the sample is 22.4090159873 W/mC\n"
]
}
],
"source": [
"# Measuring the Thermal Conductivity of a Material\n",
"\n",
"# Variables\n",
"V = 110\t\t\t#Voltage diffrence b/w thermocouples[V]\n",
"I = 0.4\t\t\t#Current drawn by thermocouples[A]\n",
"\n",
"# Calculations and Results\n",
"We = V*I\t\t\t#[W]\n",
"print \"The electrical power consumed by the resismath.tance heater and converted to heat is\",We,\"W\"\n",
"\n",
"q_ = We/2\t\t\t#[W]\n",
"print \"The rate of heat flow through each sample\",q_,\"W\"\n",
"\n",
"dT = 15\t\t\t#Temperature drop in the direction of heat flow[degree C]\n",
"l = .03\t\t\t#length for which temperature change is measured[m]\n",
"D = .05\t\t\t#diameter of cylinder[m]\n",
"a = (math.pi*D**2)/4\t\t\t#Cross-sectional area of the cylinder[m**2]\n",
"K = (q_*l)/(a*dT)\t\t\t#[W/m.degreeC]\n",
"print \"The thermal conductivity of the sample is\",K,\"W/mC\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.7"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The thermal conductivity of the brick in English units is 0.41601316752 Btu/h.ft.degree Farenhiet\n"
]
}
],
"source": [
"# Conversion between SI and English Units\n",
"\n",
"# Variables\n",
"W_to_btu_p_h = 3.41214\t\t\t#Conersion from Watt to btu per hour[btu/h]\n",
"m_to_ft = 3.2808\t\t\t #Conversion from meter to english unit feet[ft]\n",
"deg_C_to_deg_F = 1.8\t\t\t#Conversion from degree Celcius to degree Farenhiet\n",
"\n",
"# Calculations\n",
"W_per_m_deg_C = W_to_btu_p_h/(m_to_ft*deg_C_to_deg_F)\t\t\t#Conversion factor for 1W/m.degree Celcius[Btu/h.ft.degree Farenhiet]\n",
"k_brick = 0.72*W_per_m_deg_C \t\t\t#[Btu/h.ft.degree Farenhiet]\n",
"\n",
"# Results\n",
"print \"The thermal conductivity of the brick in English units is\",k_brick,\"Btu/h.ft.degree Farenhiet\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.8"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The rate of heat generated in the wire as a result of resismath.tance heating is 90.0 W\n",
"The convection Heat Transfer coefficient is 34.8514473924 W/m**2.degree Celcius\n"
]
}
],
"source": [
"# Measuring Convection Heat Transfer coefficient\n",
"\n",
"# Variables\n",
"T_ambient = 15\t\t\t#Temperature of room[degree Celcius]\n",
"T_surface = 152\t\t\t#Temperature of surface of wire[degree Celcius]\n",
"L = 2\t\t\t#Length of wire[m]\n",
"D = 0.003\t\t\t#Diameter of wire[m]\n",
"V = 60\t\t\t#Voltage drop across the current wire[Volts]\n",
"I = 1.5\t\t\t#Current flowing in the wire[amp]\n",
"\n",
"# Calculations and Results\n",
"#When steady conditions are reached, the rate of heat loss from the wire equals the rate of heat generation in the wire as a result of resismath.tance heating\n",
"\n",
"Q_ = V*I\t\t\t#[W]\n",
"print \"The rate of heat generated in the wire as a result of resismath.tance heating is\",Q_,\"W\"\n",
"\n",
"As = math.pi*D*L\t\t\t#Surface Area of the wire[m**2]\n",
"#Using Newton's Law of Cooling\n",
"#and assuming all heat loss in wire to occur by convection\n",
"h = Q_/(As*(T_surface-T_ambient))\t\t\t#[W/m**2.degree Celcius]\n",
"print \"The convection Heat Transfer coefficient is\",h, \"W/m**2.degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.9"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The net rates of radiation heat transfer from the body to the surrounding walls ,ceiling, and floor in winter and summer are respectively 152.0 and 40.9287218637 W\n"
]
}
],
"source": [
"# Radiation Effect on Thermal Comfort\n",
"\n",
"# Variables\n",
"T_room = 22+273\t\t\t#Temperature fo room[K]\n",
"T_wntr = 10+273\t\t\t#Average Temperature of inner surfaces of walls,floors and the cieling in winter[K]\n",
"T_smmr = 25+273\t\t\t#Average Temperature of inner surfaces of walls,floors and the cieling in summer[K]\n",
"T_outr = 30+273\t\t\t#Average outer surface temperature of the person[K]\n",
"A = 1.4 \t\t\t#The math.exposed surface area[m**2]\n",
"e = 0.95\t\t\t#Emissivity of person\n",
"\n",
"# Calculations\n",
"sigma = 5.67*(10**(-8))\t\t\t#Stefan's consmath.tant\n",
"Q_rad_wntr = e*sigma*A*((T_outr**4)-(T_wntr**4))\t\t\t#[W]\n",
"Q_rad_smmr = e*sigma*A*((T_outr**4)-(T_smmr**4))\t\t\t#[W]\n",
"\n",
"# Results\n",
"print \"The net rates of radiation heat transfer from the body to the surrounding walls \\\n",
",ceiling, and floor in winter and summer are respectively\",round(Q_rad_wntr),\"and\",Q_rad_smmr,\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.10"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Rate of convection heat transfer from the person to the air in the room is 86.4 W\n",
"The rate of convection heat transfer from the person to the surrounding walls,cieling,fllor is 81.712671952 W\n",
"The rate of total heat transfer from the body is 168.0 W\n"
]
}
],
"source": [
"# Heat Loss from a Person\n",
"\n",
"# Variables\n",
"T_room = 20+273\t\t\t#Temperature of breezy room[K]\n",
"T_outr = 29+273\t\t\t#Average outer surface temperature of the person[K]\n",
"As = 1.6\t\t\t#math.exposed Surface Area[m**2]\n",
"h = 6\t\t\t#Convection Heat transfer coefficient[W/m**2.K]\n",
"e = 0.95\t\t\t#Emissivity of person\n",
"\n",
"# Calculations and Results\n",
"sigma = 5.67*(10**(-8))\t\t\t#Stephan's consmath.tant[W/m**2.degree Celcius]\n",
"Q_conv = h*As*(T_outr-T_room)\t\t\t#[W]\n",
"print \"Rate of convection heat transfer from the person to the air in the room is\",Q_conv,\"W\"\n",
"\n",
"Q_rad = e*sigma*As*((T_outr**4)-(T_room**4))\t\t\t#[W]\n",
"print \"The rate of convection heat transfer from the person to the surrounding walls,cieling,fllor is\",Q_rad,\"W\"\n",
"\n",
"Q_total = Q_conv+Q_rad\t\t\t#[W]\n",
"print \"The rate of total heat transfer from the body is \",round(Q_total),\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.11"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The rates of conduction and radiation heat transfer between the plates through the air layer are respectively 219.0 and 369.0 W\n",
"('W', 588.0, 'Net rate of heat transfer is')\n",
"The heat transfer rate in reality will be higher because of the natural convection currents that are likely to occur in the air space between the plates\n",
"when the air space b/w the plates is evacuted there is no conduction or convection, and the only heat transfer between the plates will be by radiation. \n",
"Therefore Net rate of heat transfer is 369.0 W\n",
"An opaque solid material placed b/w the two plates blocks direct radiation heat transfer between the plates\n",
"The net rate of heat transfer through the urethane insulation is 260.0 W\n",
"The layers of superinsulation prevent any direct radiation heat transfer between the plates\n",
"The net rate of heat transfer through the layer of superinsulation is 0.2 W\n"
]
}
],
"source": [
"# Heat transfer between two Isothermal Plates\n",
"\n",
"# Variables\n",
"T1 = 300\n",
"T2 = 200.\t\t\t#Temperatures of two large parallel isothermal plates[K]\n",
"L = 0.01\t\t\t#dismath.tance between both plates[m]\n",
"e = 1\t\t\t#Emissivity of plates\n",
"A = 1\t\t\t#Surface area of plates[m**2]\n",
"\n",
"# Calculations and Results\n",
"T_avg = (T1+T2)/2\t\t\t#Average temperature[K]\n",
"sigma = 5.67*(10**(-8))\t\t\t#Stefan's consmath.tant[W/m**2.K**4]\n",
"#Solution (a)[space between plates is filled with air]\n",
"k_air = 0.0219\t\t\t#The thermal conductivity of aair at the average temperature[W/m.K]\n",
"Q_cond = k_air*A*(T1-T2)/L\t\t\t#[W]\n",
"Q_rad = e*sigma*A*((T1**4)-(T2**4))\t\t\t#[W]\n",
"print \"The rates of conduction and radiation heat transfer between the plates through\\\n",
" the air layer are respectively\",Q_cond,\"and\",round(Q_rad),\"W\"\n",
"\n",
"Q_total_a = Q_cond+Q_rad\t\t\t#[W]\n",
"print (\"W\",round(Q_total_a),\"Net rate of heat transfer is\")\n",
"print (\"The heat transfer rate in reality will be higher because of the natural convection currents that are likely to occur in the air space between the plates\")\n",
"\n",
"#Solution (b)[space between the plates is evacutaed]\n",
"print \"when the air space b/w the plates is evacuted there is no conduction or convection, \\\n",
"and the only heat transfer between the plates will be by radiation. \"\n",
"print (\"Therefore\"),\n",
"Q_total_b = Q_rad\t\t\t#[W]\n",
"print \"Net rate of heat transfer is\",round(Q_total_b),\"W\"\n",
"\n",
"#Solution (c)[space between the plates is filled with urethane insulation]\n",
"k_insu = 0.026\t\t\t#At average temperature thermal conductivity of urethane insulation [W/m.K]\n",
"print (\"An opaque solid material placed b/w the two plates blocks direct radiation heat\\\n",
" transfer between the plates\")\n",
"\n",
"Q_cond_c = k_insu*A*(T1-T2)/L\t\t\t#[W]\n",
"Q_total_c = Q_cond_c\t\t\t#[W]\n",
"print \"The net rate of heat transfer through the urethane insulation is\",round(Q_total_c),\"W\"\n",
"\n",
"#Solution (d)[the dismath.tance between the plates is filled with superinsulation]\n",
"k_super = 0.00002\t\t\t#At average temperature thermal conductvity of superinsulation[W/m.K]\n",
"print (\"The layers of superinsulation prevent any direct radiation heat transfer between the plates\")\n",
"\n",
"Q_cond_d = k_super*A*(T1-T2)/L\t\t\t#[W]\n",
"Q_total_d = Q_cond_d\t\t\t #[W]\n",
"print \"The net rate of heat transfer through the layer of superinsulation is\",Q_total_d,\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.13"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The plate surface temperature is 33.4 degree Celcius\n"
]
}
],
"source": [
"# Heating of a Plate by Solar Energy\n",
"\n",
"# Variables\n",
"a = 0.6\t\t\t#absorptivity of math.exposed surface of plate\n",
"q_incident = 700\t\t\t#Rate at which solar radiation incident on the plate [W/m**2]\n",
"T_surr = 25+273\t\t\t#Surrounding air temperature[K]\n",
"h = 50\t\t\t#Combined radiation and convection heat transfer coefficient[W/m**2.K]\n",
"\n",
"# Calculations\n",
"#Temperature keeps on increamath.sing till a point comes at which the rate of heat loss from the plate equals the rate of solar energy absorbed, and the temperature of the plate no longer changes\n",
"T_surface = T_surr+(a*(q_incident)/h)\t\t\t#[K]\n",
"\n",
"# Results\n",
"print \"The plate surface temperature is\",T_surface-273,\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 1.14"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 5. 1.]\n"
]
}
],
"source": [
"\n",
"from scipy.optimize import fsolve \n",
"import math \n",
"\n",
"# Non-linear equation in two variable\n",
"#x1 = x, x2 = y\n",
"def f2(x):\n",
" f = [0,0]\n",
" f[0] = x[0]-x[1]-4;\n",
" f[1] = x[0]**2+x[1]**2-x[0]-x[1]-20;\n",
" return f\n",
"#To get the desired output assign an initial value such as x0 = [1,1], [xs,fxs,m] = fsolve(f2,x0')\n",
"#To get the desired output assign an initial value such as \n",
"x0 = [1,1]\n",
"f = fsolve(f2,x0)\n",
"print f"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKjfIjj7Heat And Mass Transfer - A Practical Approach/ch2.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 2 : Heat Conduction Equation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.2"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The rate of heat generation in the wire per unit volume and heat flux on the outer surface of the wire as a result of this heat generation are respectively 212.0 W/cm**3 and 15.9154943092 W/cm**2\n"
]
}
],
"source": [
"# Heat Generation in a Hair Dryer\n",
"\n",
"import math \n",
"\n",
"\n",
"# Variables\n",
"E_gen = 1200.\t\t\t#[Total rate of heat generation]\n",
"L = 80\t\t \t #Length of wire[cm]\n",
"D = 0.3\t\t \t#Diameter of wire[cm]\n",
"\n",
"# Calculations\n",
"V_wire = math.pi*(D**2)*L/4\t\t\t#Volume of the wire[cm**3]\n",
"e_gen = E_gen/V_wire\t\t\t#[W/cm**3]\n",
"As = math.pi*D*L\t\t\t#Suface Area of wire[m**2]\n",
"Q_ = E_gen/As\t\t\t#[W/cm**2]\n",
"\n",
"# Results\n",
"print \"The rate of heat generation in the wire per unit volume and heat flux on the outer\\\n",
" surface of the wire as a result of this heat generation are respectively\",round(e_gen),\"W/cm**3\",\"and\",Q_,\"W/cm**2\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.4"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The rate of heat generation in the wire per unit volume is 318309886.184 W/m**3\n",
"The equation governing the variation of temperature int he wire is simply (1/r)d/dr(r.dT/dr)+ 21220659.0789 = 0\n"
]
}
],
"source": [
"# Heat Conduction in a Resistance Heater\n",
"import math \n",
"# Variables\n",
"E_gen = 2000\t\t\t#Total rate of heat generation in the wire[W]\n",
"L = 0.5 \t\t\t#Length of cyllindrical shaped wire[m]\n",
"D = 0.004\t \t\t#Diameter of wire[m]\n",
"k_heater = 15\t\t\t#Thermal conductivity of wire[W/m.K]\n",
"\n",
"# Calculations and Results\n",
"#The resistance wire is considered to be a very long cylinder since\n",
"# its length is more than 100 times its diameter.Heat is generated uniformly in the wire and the conditions on the outer surface of the wire are uniform.Hence it is reasonable to math.expect the temperature int he wire to vary in radial r direction only and thus heat transfer to be one dimensional,T = T(r)\n",
"V_wire = math.pi*(D**2)*L/4\t\t\t#Volume of the wire[m**3]\n",
"e_gen = E_gen/V_wire \t\t\t#[W/m**3]\n",
"print \"The rate of heat generation in the wire per unit volume is\",e_gen,\"W/m**3\"\n",
"const = e_gen/k_heater;\n",
"print \"The equation governing the variation of temperature int\\\n",
" he wire is simply (1/r)d/dr(r.dT/dr)+\",const,\" = 0\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.5"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The thermal conductivity is given to be variable,and there is no heat generation in the ball, therefore the differential equation governing the variation of temperature in the ball is\n",
"(1/(r**2)d/dr((r**2)k(dT/dr)) = rho*c(dT/dt)\n"
]
}
],
"source": [
"# Cooling of a Hot Metal Ball in Air\n",
"\n",
"# Variables\n",
"T_ball = 300\t\t\t#Temeprature of ball[degree Celcius]\n",
"T_surr = 25\t\t\t#Temperature of ambient air[degree Celcius]\n",
"\n",
"# Results\n",
"#The ball in initially at a uniform temperature and is cooled uniformly from the entire outer surface.Also, the temperature within the ball changes with the radial dismath.tance r and the time t. T = T(r,t)\n",
"print (\"The thermal conductivity is given to be variable,and there is no heat\\\n",
" generation in the ball, therefore the differential equation governing the variation of temperature in the ball is\")\n",
"print (\"(1/(r**2)d/dr((r**2)k(dT/dr)) = rho*c(dT/dt)\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.6"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The differential equation governing the variation of temperature in the billet is \n",
"((1/r)(d/dr)(k*r(dT/dr)))+((d/dz)(k(dT/dz))) = rho*c(dT/dt)\n",
"In case of consmath.tant thermal conductivity it reduces to\n",
"((1/r)(d/dr)(r(dT/dr)))+(d**2)T/(dz**2) = (1/a)(dT/dt)\n"
]
}
],
"source": [
"# Heat Conduction in a Short Cylinder\n",
"\n",
"# Variables\n",
"#Radius R and height h of the small cylinder\n",
"T = 300 \t\t\t#Temperature of cylinder[degree Celcius]\n",
"T_ambient = 20\t\t\t#Temperature of ambient air[degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"#Variation is thermal conductivity is negligible\n",
"#The cylinder is cooled unifromly from the top and bottom surfaces in the z-direction as well as the lateral surface in the radial r-direction.Also Temperature at any point in the ball changes with time during cooling. Therefore this is a two dimensional transient heat conduction problem i.e. T = T(r,z,t)\n",
"print (\"The differential equation governing the variation of temperature in the billet is \")\n",
"print (\"((1/r)(d/dr)(k*r(dT/dr)))+((d/dz)(k(dT/dz))) = rho*c(dT/dt)\")\n",
"print (\"In case of consmath.tant thermal conductivity it reduces to\")\n",
"print (\"((1/r)(d/dr)(r(dT/dr)))+(d**2)T/(dz**2) = (1/a)(dT/dt)\") \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.7"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"-k*dT(0)/dx = q_\n",
"T(L) = 110 degree Celcius\n",
"where L = 0.003 m\n"
]
}
],
"source": [
"# Heat Flux boundary Condition\n",
"import math \n",
"# Variables\n",
"Q = 800\t\t \t#Heat transfer rate[W]\n",
"D = 0.2\t\t\t #Diameter of pan[m]\n",
"L = 0.003\t\t\t#Thickness of pan[m]\n",
"T_in = 110\t\t\t#T(L) Temperature of the inner surface of the pan[degree Celcius]\n",
"neta = 0.9\t\t\t#Percent of total heat transferred to the pan\n",
"\n",
"# Calculations\n",
"#The inner and outer surfaces of the bottom section of the pan can be\n",
"# represented by x = 0 and x = L,respectively. During steady operation\n",
"# the temperature will depend on x only and thus T = T(x).\n",
"actual_Q = neta*Q \t\t\t#90 percent of the 800W is transferred to the pan at that surface\n",
"A = math.pi*(D**2)/4\t\t\t#Bottom Surface Area[m**2]\n",
"print (\"-k*dT(0)/dx = q_\")\n",
"q_ = actual_Q/(1000*A)\t\t\t#[kW/m**2]\n",
"\n",
"# Results\n",
"#The boundary condition on this surface can be math.expressed as\n",
"print \"T(L) = \",T_in,\"degree Celcius\"\n",
"print \"where L = \",L,\"m\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.8"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Taling the direction of heat transfer to be the positive r direction, the boundary condition on that surface can be math.expressed as\n",
"-k(dT(r_in,t)/dr) = h(T_steam-T(r1))\n",
"Then the boundary at the outer surface can be math.expressed as\n",
"dT(r_out,t)/dr = 0\n"
]
}
],
"source": [
"# Convection and Insulation Boundary Conditions\n",
"\n",
"# Variables\n",
"T_steam = 200\t\t\t#Temperature of steam[degree Celcius]\n",
"r_in = 0.08\t \t\t#Inner radii of pipe[m]\n",
"r_out = 0.085\t\t\t#Outer radii of pipe[m]\n",
"h = 65\t\t\t #convection heat transfer coefficient on the inner surface of the pipe[W/m**2.K]\n",
"\n",
"# Calculations and Results\n",
"#Heat transfer through the pipe material predominantly is in the radial\n",
"# direction and thus can be approximated as being one-dimensional\n",
"print (\"Taling the direction of heat transfer to be the positive r direction, the boundary\\\n",
" condition on that surface can be math.expressed as\")\n",
"print (\"-k(dT(r_in,t)/dr) = h(T_steam-T(r1))\")\n",
"#The pipe is said to be well insulated on the outside, and thus heat loss\n",
"# through the outer surface of the pipe can be assumed to be negligible.\n",
"print (\"Then the boundary at the outer surface can be math.expressed as\")\n",
"print (\"dT(r_out,t)/dr = 0\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.9"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The initial condition can be math.expressed as\n",
"T(r,0) = T_ball\n",
"('degree Celcius', 300)\n",
"The boundary condition at the midpoint i.e. r = 0 can be math.expressed as dT(0,t)/dr = 0\n",
"Taking the direction of heat transfer to be the positive r direction, the boundary condition on the outer surface can be math.expressed as\n",
"-k(dT(r_out,t)/dr) = h[T(r_out)-T_ambient]+e*sigma[(T(r_out)**4)-(T_ambient**4)]\n"
]
}
],
"source": [
"# Combined Convection and Radiation Condition\n",
"\n",
"# Variables\n",
"T_ball = 300\t\t\t#Temperature of spherical metal ball[degree Celcius]\n",
"T_ambient = 27\t\t\t#Temperature of ambient air[degree Celcius]\n",
"k = 14.4 \t\t\t#Thermal conductivity of the ball material[W/m.K]\n",
"h = 25\t\t \t #average convection heat transfer coefficient on the outer surface of the ball[W/m**2.K]\n",
"e = 0.6\t\t\t #Emissivity of outer surface of the ball\n",
"T_surr = 290\t\t\t#\n",
"\n",
"# Calculations and Results\n",
"#This is one-dimensional transient heat transfer problem math.since the temperature within the ball changes with the radial dismath.tance r and the time t i.e. T = T(r,t)\n",
"#Taking the moment the ball is removed from the oven to be t = 0\n",
"print (\"The initial condition can be math.expressed as\")\n",
"print (\"T(r,0) = T_ball\")\n",
"print (\"degree Celcius\",T_ball)\n",
"#The problem possesses symmetry about the mid point(r = 0) math.since the isotherms in this case are concentric spheres, and thus no heat is crosmath.sing the mid point of the ball.\n",
"print (\"The boundary condition at the midpoint i.e. r = 0 can be math.expressed as dT(0,t)/dr = 0\")\n",
"#The heat conducted to the outer surface of the ball is lost to the environment by convection and radiation.\n",
"print (\"Taking the direction of heat transfer to be the positive r direction, the boundary condition on the outer surface can be math.expressed as\")\n",
"print (\"-k(dT(r_out,t)/dr) = h[T(r_out)-T_ambient]+e*sigma[(T(r_out)**4)-(T_ambient**4)]\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.10"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The boundary condition ont the inner surface of the wall at x = 0 can be math.expressed as -k(dT(0)/dx) = h_in[T_surf1-T(0)]\n",
"where h_in and T_surf are respectively 6 W/m**2.degree Celcius and 20 degree Celcius\n",
"The boundary condition on the outer surface at x = L can be math.expressed as \n",
"-kdT(L)/dx = h_out[T(L)-T_surf2]+e*sigma[(T(L)**4)-(T_sky**4)]-a*q_solar\n",
"where T_sky is temperature of the sky and q_solar is the incident solar heat flux\n"
]
}
],
"source": [
"# Combined Convection, Radiation and Heat Flux\n",
"\n",
"# Variables\n",
"T_surf1 = 20\t\t\t#Ambient temperature in the interior of the house[degree Celcius]\n",
"T_surf2 = 5\t\t\t# Ambient temperature outside the house[degree Celcius]\n",
"L = 0.2\t\t\t# Thickness of the wall[m]\n",
"a = 0.5\t\t\t# absorptivity of outer surface of wall\n",
"h_in = 6\t\t\t#Convection heat transfer coefficient for inner surface of wall[W/m**2.degree Celcius]\n",
"h_out = 25\t\t\t#Convection heat transfer coefficient for outer surface of wall[W/m**2.degree Celcius]\n",
"k = 0.7\t\t\t#The thermal conductivity of wall material[W/m.degree Celcius]\n",
"e = 0.9\t\t\t#Emissivity of outer surface of wall\n",
"\n",
"# Calculations and Results\n",
"#The heat transfer though the wall is given to be steady and one dimensional and thus temperature depends on x only i.e. T = T(x)\n",
"print (\"The boundary condition ont the inner surface of the wall at x = 0 can be math.expressed as -k(dT(0)/dx) = h_in[T_surf1-T(0)]\")\n",
"print \"where h_in and T_surf are respectively \",h_in,\"W/m**2.degree Celcius\",\"and\",T_surf1,\"degree Celcius\"\n",
"print (\"The boundary condition on the outer surface at x = L can be math.expressed as \")\n",
"print (\"-kdT(L)/dx = h_out[T(L)-T_surf2]+e*sigma[(T(L)**4)-(T_sky**4)]-a*q_solar\")\n",
"print (\"where T_sky is temperature of the sky and q_solar is the incident solar heat flux\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.11"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Differential equation can be math.expressed as d**2(T)/(dx**2) = 0\n",
"with boundary conditions \n",
"T(0) = T1 = 120 degree Celcius\n",
"T(L) = T2 = 50 degree Celcius\n",
"integrating this we get,\n",
"('dT/dx = C1', 'where C1 is an arbitrary constant')\n",
"integrating we obtain temperature to follow following relation :-\n",
"('and substituting values in above equation', 'T(x) = ((T2-T1)/L)*x+T1 ')\n",
"The value of temperature at x = 0.1m is 85.0 degree Celcius\n",
"The rate of heat conduction through the wall is 6300.0 W\n"
]
}
],
"source": [
"# Heat Conduction in a Plane Wall\n",
"\n",
"# Variables\n",
"k_wall = 1.2\t\t\t#Thermal conductivity of wall[W/m.degree Celcius]\n",
"L = 0.2 \t \t\t#Thickness of wall[m]\n",
"As = 15\t \t \t#Surface area[m**2]\n",
"T1 = 120\n",
"T2 = 50\t\t#The two sides of the wall are maintained at these consmath.tant temperatures[degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"print (\"Differential equation can be math.expressed as d**2(T)/(dx**2) = 0\")\n",
"print (\"with boundary conditions \")\n",
"print \"T(0) = T1 = \",T1,\"degree Celcius\"\n",
"print \"T(L) = T2 = \",T2,\"degree Celcius\"\n",
"print (\"integrating this we get,\")\n",
"print (\"dT/dx = C1\", \"where C1 is an arbitrary constant\")\n",
"print (\"integrating we obtain temperature to follow following relation :-\")\n",
"print (\"and substituting values in above equation\",\"T(x) = ((T2-T1)/L)*x+T1 \")\n",
"T3 = (((T2-T1)/L)*(0.1))+T1;\n",
"print \"The value of temperature at x = 0.1m is\",T3,\"degree Celcius\"\n",
"Q_wall = -k_wall*As*((T2-T1)/L)\t\t\t#[W]\n",
"print \"The rate of heat conduction through the wall is\",Q_wall,\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.13"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Uniform Heat Flux to whicj inner surface of the base plate is subjected 40000.0 W/m**2\n",
"The temperatures at the inner and outer surfaces of the plate i.e. at x = 0 and x = L are 33.0 degree Celcius and 20.0 degree Celcius respectively\n"
]
}
],
"source": [
"# Heat Conduction in the Base Plate of an Iron\n",
"\n",
"# Variables\n",
"k = 15.\t \t\t#[W/m.degree Celcius]\n",
"A = 300.*10**(-4)\t\t\t#Base Area[m**2]\n",
"L = 0.005\t\t \t#Thickness[m]\n",
"T_surr = 20\t\t\t #Temp of surrounding[degree Celcius]\n",
"h = 80 \t\t\t#Convection het transfer coefficient[W/m**2.degree Celcius]\n",
"Q = 1200\t\t \t#[W]\n",
"\n",
"# Calculations and Results\n",
"q = Q/A\t\t\t#[W/m**2]\n",
"print \"Uniform Heat Flux to whicj inner surface of the base plate is subjected\",q,\"W/m**2\"\n",
"\n",
"#Integration Constants\n",
"C1 = -q/k;\n",
"C2 = T_surr+(q/h)+(q*L/k);\n",
"T_0 = T_surr+q*((L/k)+(1/h))\t\t\t#[degree Celcius]\n",
"T_L = T_surr+q*(1/h)\t\t\t#[degree Celcius]\n",
"print \"The temperatures at the inner and outer surfaces of the plate i.e. at x = 0 and x = L are\" \\\n",
",round(T_0),\"degree Celcius\",\"and\",T_L,\"degree Celcius\",\"respectively\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.14"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The outer surface temperature is 292.710183864 K\n",
"The steady rate of heat conduction through the wall is 146.0 W/m**2\n"
]
}
],
"source": [
"\n",
"from scipy.optimize import fsolve \n",
"import math \n",
"# Heat Conduction in a Solar Heated Wall\n",
"\n",
"# Variables\n",
"L = 0.06\t\t\t#Thickness of wall[m]\n",
"k = 1.2\t\t\t#Thermal Conductivity[W/m.degree Celcius]\n",
"e = 0.85\t\t\t#Emissivity\n",
"a = 0.26\t\t\t#Solar absorptivity\n",
"T1 = 300\t\t\t#Temp of Inner surface of Wall[K]\n",
"q_solar = 800\t\t\t#Incident rate of solar radiation[W/m**2]\n",
"T_space = 0\t\t\t#Temp of outer space[K]\n",
"\n",
"# Calculations\n",
"#Integrating results into\n",
"def temp(T):\n",
" return (((a*q_solar)-(e*5.67*10**(-8)*T[0]**4))*(L/k))+T1-T[0];\n",
"\n",
"# Results\n",
"x0 = [1] \n",
"xs = fsolve(temp,x0)\n",
"print \"The outer surface temperature is \",xs[0],\"K\"\n",
"#First execute the program with \n",
"q = k*(T1-xs)/L;\n",
"print \"The steady rate of heat conduction through the wall is\",round(q),\"W/m**2\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.15"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The rate of heat conduction through the pipe is 786.0 kW\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Loss through a Steam Pipe\n",
"\n",
"# Variables\n",
"L = 20.\t\t\t#Pipe Length[m]\n",
"k = 20.\t\t\t#[W/m.degree Celcius]\n",
"r1 = 0.06\t\t\t#Inner Radius[m]\n",
"r2 = 0.08\t\t\t#Outer Radius[m]\n",
"T1 = 150.\t\t\t#Temp of inner surface[degree Celcius]\n",
"T2 = 60.\t\t\t#Temp of outer surface[degree Celcius]\n",
"\n",
"# Calculations\n",
"#Integrating differential equation we get T(r) = C1math.logr+C2, where C1 and C2 are\n",
"C1 = (T2-T1)/math.log(r2/r1);\n",
"C2 = T1-((T2-T1/math.log(r2/r1))*math.log(r1));\n",
"Q_cyl = 2*math.pi*k*L*(T1-T2)/(math.log(r2/r1));\n",
"\n",
"# Results\n",
"print \"The rate of heat conduction through the pipe is\",round(Q_cyl/1000),\"kW\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.16"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The rate of heat conduction through the container wall is 27.143360527 kW\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Conduction through a Spherical Shell\n",
"\n",
"# Variables\n",
"r1 = 0.08\t\t\t#Inner Radius[m]\n",
"r2 = 0.1\t\t\t#Outer radius[m]\n",
"k = 45.\t \t\t#Thermal conductivity[W/m.degree Celcius]\n",
"T1 = 200.\t\t\t#Temperature of inner surface[degree Celcius]\n",
"T2 = 80.\t\t\t#Temperarure of outer surface[degree Celcius]\n",
"\n",
"# Calculations\n",
"#Integrating the differential equation twicw we get T(r) = -C1/r+C2, where\n",
"C1 = r1*r2*(T1-T2)/(r2-r1);\n",
"C2 = ((r2*T2)-(r1*T1))/(r2-r1);\n",
"Q_sphere = 4*math.pi*k*r1*r2*(T1-T2)/(r2-r1);\n",
"\n",
"# Results\n",
"print \"The rate of heat conduction through the container wall is\",Q_sphere/1000,\"kW\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.17"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The heat generation per unit volume of the wire is 318309886.184 W/m**3\n",
"The center temperature of the wire is 126.0 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Centerline Temperature of a Resismath.tance Heater\n",
"\n",
"# Variables\n",
"k = 15. \t\t\t#Thermal conductivity of heater wire[W/m.K]\n",
"E_gen = 2000.\t\t\t#Total heat generation[W]\n",
"l = 0.5\t\t \t#Length of resismath.tance heater wire[m]\n",
"D = 0.004\t \t\t#Diameter of wire[m]\n",
"Ts = 105.\t\t\t #Outer sorface Temperarure[degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"V_wire = math.pi*(D**2)*l/4\t\t\t#Volume of wire[m**3]\n",
"e_gen = E_gen/V_wire\t\t\t#[W/m**3]\n",
"print \"The heat generation per unit volume of the wire is\",e_gen,\"W/m**3\"\n",
"Tc = Ts+(e_gen*(D**2)/(4*4*k))\t\t\t#[degree Celcius]\n",
"print \"The center temperature of the wire is \",round(Tc),\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.18"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The temperature at the centreline,r = 0 is 128.0 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Variation of Temperature in a Resismath.tance Heater\n",
"\n",
"# Variables\n",
"k = 13.55\t\t\t#[W/m.degree Celcius]\n",
"ro = 0.005\t\t\t#[m]\n",
"e_gen = 4.3*10**7\t\t\t#rate of resismath.tance heating[W/m**3]\n",
"Ts = 108\t\t\t#Surface temperature[degree Celcius]\n",
"\n",
"# Calculations\n",
"#Integrating we get\n",
"#T(r) = Ts+((e_gen*(ro**2-r**2)/4k))\n",
"T_0 = Ts+((e_gen*ro**2)/(4*k));\n",
"\n",
"# Results\n",
"print \"The temperature at the centreline,r = 0 is\",round(T_0),\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.19"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Interface temperature is 149.396914041 degree Celcius\n",
"The temperature at the centreline(r = 0) is 152.730247375 degree Celcius\n",
"Thus the temperature of the centreline is slightly above the interface temperature\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Conduction in a two layer medium\n",
"\n",
"# Variables\n",
"k_wire = 15\n",
"k_ceramic = 1.2 \t\t\t#[W/m.degree Celcius]\n",
"r1 = 0.002\n",
"r2 = 0.007 \t\t\t#[m]\n",
"e_gen = 50*10**6\t\t\t#[W/m**3]\n",
"Ts = 45.\t\t\t #[degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"T1 = (((e_gen*(r1**2)*math.log(r2/r1))/(2*k_ceramic))+Ts)\t\t\t#[degree Celcius]\n",
"print \"The Interface temperature is\",T1,\"degree Celcius\"\n",
"T_wire = T1+((e_gen*(r1**2))/(4*k_wire))\t\t\t#[degree Celcius]\n",
"print \"The temperature at the centreline(r = 0) is\",T_wire,\"degree Celcius\"\n",
"print (\"Thus the temperature of the centreline is slightly above the interface temperature\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 2.21"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The average thermal conductivity of the medium is 55.499 W/m.K\n",
"The rate of heat conduction through the plate is 155.0 kW\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Conduction through a Wall with k(T)\n",
"\n",
"# Variables\n",
"#k varies with temperature as k = k0(1+bT)\n",
"k0 = 38\t \t\t#[W/m]\n",
"b = 9.21*(10**(-4))\t\t\t#[k**(-1)]\n",
"h = 2\n",
"w = 0.7\n",
"t = 0.1 \t\t\t#Height,width and thickness of plates respectively[m]\n",
"T1 = 600\n",
"T2 = 400\t\t\t#Temperature maintained on the two sides of the plate[K]\n",
"\n",
"# Calculations and Results\n",
"A = h*w \t\t\t#Surface area of plate[m**2]\n",
"Tavg = (T1+T2)/2\t\t\t#Average temperature of plate[K]\n",
"kavg = k0*(1+(b*Tavg))\t\t\t#[W/m.K]\n",
"print \"The average thermal conductivity of the medium is\",kavg,\"W/m.K\"\n",
"Q_ = kavg*A*(T1-T2)/t\t\t\t#[W]\n",
"print \"The rate of heat conduction through the plate is\",round(Q_/1000),\"kW\"\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKjfIh17Heat And Mass Transfer - A Practical Approach/ch3.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 3 : Steady Heat Conduction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The thermal conductivity is given to be 0.9 W/m.K\n",
"The area of the wall is 15 m**2\n",
"Thermal Resistnace offered by the wall is 0.0222222222222 degree Celicus/W\n",
"The steady rate of heat transfer through the wall is 630.0 W\n"
]
}
],
"source": [
"# Heat Loss through a Wall\n",
"import math \n",
"\n",
"#assumptions:- \n",
"#1)Heat transfer through the wall is steady \n",
"#2)Heat transfer is one-imensional\n",
"\n",
"# Variables\n",
"k = 0.9\t\t\t#[W/m.K]\n",
"print \"The thermal conductivity is given to be\",k,\"W/m.K\"\n",
"\n",
"# Calculations and Results\n",
"#Heat transfer through the wall is by conduction \n",
"A = (3*5)\t\t\t#[m**2]\n",
"print \"The area of the wall is\",A,\"m**2\"\n",
"T1 = 16\t \t \t#temperature of inner wall[degree Celcius]\n",
"T2 = 2\t\t \t#Temperature of Outer wall[degree Celcius]\n",
"delta_T = T1-T2\t\t\t#Temperature Gradient[degree Celcius]\n",
"L = 0.3\t\t\t #Length of wall along which heat is being transferred[m]\n",
"R_wall = L/(k*A)\t\t#[degree Celcius/W]\n",
"\n",
"print \"Thermal Resistnace offered by the wall is\",R_wall,\"degree Celicus/W\"\n",
"Q_ = (delta_T/R_wall)\t\t\t#[W]\n",
"print \"The steady rate of heat transfer through the wall is \",Q_,\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The thermal conductivity is given to be 0.78 W/m.K\n",
"The total Resismath.tance offered by glass window 0.112713675214 degree Celcius/W\n",
"Steady rate of Heat Transfer through the window is 266.161137441 W\n",
"Inner Surface Temperature of the window glass -2.18009478673 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Loss through a Single Pane Window\n",
"\n",
"#Assumptions :-\n",
"#1)Heat transfer through the window is steady\n",
"#2)Heat transfer through the wall is one dimensional\n",
"\n",
"# Variables\n",
"k = 0.78\t\t\t#[W/m.K]\n",
"print \"The thermal conductivity is given to be\",k,\"W/m.K\"\n",
"L = 0.008\t\t\t#Thickness of glass window[m]\n",
"A = (0.8*1.5)\t\t#Area of the window[m**2]\n",
"T_1 = 20\t\t\t#Temeprature of inner surface of glass window[dgree Celcius]\n",
"T_2 = -10\t\t\t#Temeprature of outer surface of glass window[dgree Celcius]\n",
"h_in = 10\t\t\t#Heat transfer coefficient on the inner surface of the window[W/m**2]\n",
"h_out = 40\t\t\t#Heat transfer coefficient on the outer surface of the window[W/m**2]\n",
"\n",
"# Calculations and Results\n",
"#Convection Resistance\n",
"R_conv1 = 1/(h_in*A)\t\t\t#[degree Celcius/W]\n",
"R_conv2 = 1/(h_out*A)\t\t\t#[degree Celcius/W]\n",
"#Conduction Resismath.tance\n",
"R_cond = L/(k*A)\t\t\t#[degree Celcius/W]\n",
"#Net Resismath.tance are in series\n",
"R_total = R_conv1+R_conv2+R_cond\t\t\t#[degree Celcius/W]\n",
"print \"The total Resismath.tance offered by glass window\",R_total,\"degree Celcius/W\"\n",
"Q_ = (T_1-T_2)/R_total\t\t\t#[W]\n",
"print \"Steady rate of Heat Transfer through the window is\",Q_,\"W\"\n",
"#Knowing the rate of Heat Transfer \n",
"T1 = T_1-(Q_*R_conv1)\t\t\t#[degree Celciusthe inner surface temperature of the window glass can be determined from]\n",
"print \"Inner Surface Temperature of the window glass\",T1,\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.3"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The net resismath.tance offered is 0.433226495726 degree Celcius/W\n",
"The steady rate of Heat transfer through the window is 69.2478421702 W\n",
"Inner Surface Temperature of the window is 14.2293464858 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Loss through double pane windows\n",
"\n",
"# Variables\n",
"k_g = 0.78\t\t\t#Thermal conductitvity of glass [W/m.K]\n",
"k_a = 0.026\t\t\t#Thermal conductivity of air space[W/m.K]\n",
"L_g = .004\t\t\t#Thickness of glass layer[m]\n",
"L_a = 0.01\t\t\t#Thickness of air space[m]\n",
"h_in = 10\t\t\t#ConvectionHeat transfer coefficient on the inner surface of the window[W/m**2]\n",
"h_out = 40\t\t\t#ConvectionHeat transfer coefficient on the outer surface of the window[W/m**2]\n",
"T_1 = 20\t\t\t#Outer wall Temperature [degree Celcius]\n",
"T_2 = -10\t\t\t#Inner wall Temperature [degree Celcius]\n",
"\n",
"# Calculations\n",
"A = (0.8*1.5)\t\t\t#Area of glass window[m**2]\n",
"#Convection Resistances\n",
"R_conv1 = 1/(h_in*A)\t\t\t#Due to convection heat transfer between inner atmosphere and glass[degree Celcius/W]\n",
"R_conv2 = 1/(h_out*A)\t\t\t#Due to convection heat transfer between outer atmosphere and glass[degree Celcius/W]\n",
"#Conduction Resistances\n",
"R_cond1 = L_g/(k_g*A)\t\t\t#Due to conduction heat transfer through the glass[degree Celcius/W]\n",
"R_cond2 = R_cond1\t\t\t#Glass Medium is seperated by air spac hence two glass mediums are created[degree Celcius/W]\n",
"R_cond3 = L_a/(k_a*A)\t\t\t#Due to conduction heat transfer through the air space[degree Celcius/W]\n",
"#Net Resistance offered by window is the sum of all the individual resistances written in the oreder of their occurence\n",
"R_total = R_conv1+R_cond1+R_cond2+R_cond3+R_conv2\t\t\t#[degree Celcius/W]\n",
"\n",
"# Results\n",
"print \"The net resismath.tance offered is\",R_total,\"degree Celcius/W\"\n",
"Q_ = (T_1-T_2)/R_total\t\t\t#[W]\n",
"print \"The steady rate of Heat transfer through the window is\",Q_,\"W\"\n",
"#Inner surface temperature of the window is given by\n",
"T1 = T_1-(Q_*R_conv1)\t\t\t#[degree Celcius]\n",
"print \"Inner Surface Temperature of the window is\",T1,\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.4"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Since thermal contact resismath.tance is the inverse of thermal contact conductance\n",
"Hence Therml contact Resistance is 9.09090909091e-05 m**2.K/W\n",
"Equivalent thickness is 2.15454545455 cm\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Equivalent Thickness for Contact Resistance\n",
"\n",
"# Variables\n",
"k = 237 \t\t\t#Thermal conductivity of aluminium[W/m.K]\n",
"L = 0.01\t\t\t#Thickness of aluminium plate[m]\n",
"hc = 11000\t\t\t#Thermal contact conducmath.tance[W/m**2.K]\n",
"\n",
"# Calculations and Results\n",
"Rc = 1./hc\t\t\t#[m**2.K/W]\n",
"print (\"Since thermal contact resismath.tance is the inverse of thermal contact conductance\")\n",
"print \"Hence Therml contact Resistance is\",Rc,\"m**2.K/W\"\n",
"#For a unit surface area, the thermal resismath.tance of a flat plate is defined as\n",
"R = L/k;\n",
"#Equivalent thickness for R = Rc\n",
"L = k*Rc\t\t\t#[m]\n",
"print \"Equivalent thickness is\",(100*L),\"cm\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.5"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The total thermal Tesistance is 4.03235257834 degree Cecius/W\n",
"The rate of heat transferred is 12.3997093579 W\n",
"The temperature jump at the interface is given by 0.369038968985 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Contact Reismath.tance of Transistors\n",
"\n",
"# Variables\n",
"k = 386 \t\t\t#Thermal Conductivity of Copper[W/m.K]\n",
"hc = 42000\t\t\t#Contact Conducmath.tance coreesponding to copper-aluminium interface for the case of 1.17-1.4 micron roughness and 5MPa[pressure, which is close to given to what we have[W/m**2.K]\n",
"Ac = .0008\t\t\t#Contact area b/w the case and the plate[m**2]\n",
"A = 0.01\t\t\t#Plate area for each resistor[m**2]\n",
"L = 0.01\t\t\t#Thickness of plate[m]\n",
"ho = 25\t \t\t#Heat tranfer coefficient for back surface\n",
"T_1 = 20\t\t\t#Ambient Temperature[degree Celcius]\n",
"T_2 = 70\t\t\t#Maximum temperature of case[degree Celcius]\n",
"\n",
"# Calculations\n",
"#Resistances Offered\n",
"R_interface = 1./(hc*Ac)\t\t\t#Resismath.tance offered at the copper aluminium interface[degree Cecius/W]\n",
"R_plate = L/(k*A)\t\t\t#conduction resismath.tance offered by coppr plate[degree Cecius/W]\n",
"R_conv = 1./(ho*A)\t\t\t#Convection resismath.tance offerd by back surface of camath.sing[degree Cecius/W]\n",
"R_total = R_interface+R_plate+R_conv\t\t\t#[degree Cecius/W]\n",
"\n",
"# Results\n",
"print \"The total thermal Tesistance is\",R_total,\"degree Cecius/W\"\n",
"Q_ = (T_2-T_1)/R_total\t\t\t#[W]\n",
"print \"The rate of heat transferred is\",Q_,\"W\"\n",
"delta_T = Q_*R_interface\t\t\t#[degree Celcius]\n",
"print \"The temperature jump at the interface is given by\",delta_T,\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.6"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Net Resismath.tance offered is 6.87235431235 degree Celcius/W\n",
"The steady rate of heat transfer through the wall is 4.36531625648 W\n",
"Heat Transfer per unit area is 17.4612650259 W/m**2\n",
"Thr rate of heat transfer through the entire wall 261.918975389 W\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Loss through a Composite Wall\n",
"\n",
"# Variables\n",
"#We consider a 1m deep and 0.25 m high portion of the wall math.since it is representative of the entire wall\n",
"#Assuming any cross-section of the wall normal to the x-direction to be isothermal\n",
"k_b = 0.72\t\t\t#thermal conductivity of bricks[W/m.K]\n",
"k_p = 0.22\t\t\t#thermal conductivity of plaster layers[W/m.K]\n",
"k_f = 0.026\t\t\t#thermal conductivity of foam layers[W/m.K]\n",
"T_in = 20\t\t\t#Indoor Temperature[dgeree Celcius]\n",
"T_out = -10\t\t\t#Outdoor Temperature[dgeree Celcius]\n",
"h_in = 10\t\t\t#Inner heat transfer coefficient[W/m**2.K]\n",
"h_out = 25\t\t\t#Outer heat transfer coefficient[W/m**2.K]\n",
"L_f = 0.03\t\t\t#Thickness of foam layer[m]\n",
"L_p = 0.02\t\t\t#Thickness of plaster[m]\n",
"L_b = 0.16\t\t\t#Thickness of brick wall[m]\n",
"L_c = 0.16\t\t\t#Thickness of central plaster layer[m]\n",
"A1 = (0.25*1)\t\t\t#[m**2]\n",
"A2 = (0.015*1)\t\t\t#[m**2]\n",
"A3 = (0.22*1)\t\t\t#[m**2]\n",
"\n",
"# Calculations\n",
"#Resistances offered:-\n",
"R_in = 1/(h_in*A1)\t\t\t#Resismath.tance to conevction heat transfer from inner surface[degree Celcius/W]\n",
"R1 = L_f/(k_f*A1)\t\t\t#Conduction Resismath.tance offered by outer foam layer[degree Celcius/W]\n",
"R2 = L_p/(k_p*A1)\t\t\t#Conduction Resismath.tance offered by Outer side Plaster Wall[degree Celcius/W]\n",
"R6 = R2\t\t\t#Conduction Resismath.tance offered by Inner side Plaster Wall[degree Celcius/W]\n",
"R3 = L_c/(k_p*A2)\t\t\t#Conduction Resismath.tance offered by one side central Plaster wall[degree Celcius/W]\n",
"R5 = R3\t\t\t#Conduction Resismath.tance offered by other side central Plaster wall[degree Celcius/W]\n",
"R4 = L_b/(k_b*A3)\t\t\t#Conduction Resismath.tance offered by Brick Wall[degree Celcius/W]\n",
"R_out = 1/(h_out*A1)\t\t\t#Convection Resismath.tance from outer surface[degree Celcius/W]\n",
"#R_in,R1,R2,R6,R_out are connected in series\n",
"#R3,R4,R5 are connected in parallel\n",
"R_mid = 1/((1/R3)+(1/R4)+(1/R5))\t\t\t#Effective Parrallel Resismath.tance\n",
"R_total = (R_in+R1+R2+R_mid+R6+R_out)\t\t\t#[degree Celcius/W]\n",
"\n",
"# Results\n",
"print \"Net Resismath.tance offered is\",R_total,\"degree Celcius/W\"\n",
"Q_ = (T_in-T_out)/R_total\t\t\t#[W]\n",
"print \"The steady rate of heat transfer through the wall is\",Q_,\"W\"\n",
"Q_p = Q_/A1\t\t\t #[W/m**2]\n",
"print \"Heat Transfer per unit area is\",Q_p,\"W/m**2\"\n",
"A_total = 3*5\t \t\t#Total Area of wall[m**2]\n",
"Q_total = Q_p*A_total\t\t \t#[W]\n",
"print \"Thr rate of heat transfer through the entire wall\",Q_total,\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.7"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The radiation heat transfer coefficient is given by \n",
"h_rad = e*sigma*((T2**2)+(T_tank**2))*(T2+T_tank)\n",
"But we dont know the outer surface temperature T2 of the math.tank. hence we assume a T2 value\n",
"since heat transfer inside the math.tank is larger \n",
"Therefore taking T2 = 278 K\n",
"The radiation heat transfer coefficient is determined to be 5.3382515319 W/m**2.degree Celcius\n",
"The steady rate of heat transfer to the iced water is 7978.31498334 W\n",
"We determine outer surface temperature to check the validity of assumption\n",
"277.08411431 K\n",
"which is sufficiently close to 278 K\n",
"The total amount of heat transfer during a 24 hour period is 574438.678801 kJ\n",
"The amount of ice that will melt during 24h period is 1721.42247168 kg\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Transfer to a Spherical Container\n",
"#Radiation effect is being considered. For the black math.tank emissivity = 1\n",
"\n",
"# Variables\n",
"k = 15 \t\t\t#thermal conductivity of stainless steel[W/m.degree Celcius]\n",
"T_ice = 0+273\t\t\t#temeperature of iced water[K]\n",
"T_tank = 22+273\t\t\t#temperature of math.tank stored at room temperature[K]\n",
"h_in = 80\t \t\t#Heat Transfer Coefficient at the inner surface of the math.tank[W/m**2.degree Celcius]\n",
"h_out = 10\t\t\t #Heat Transfer Coefficient at the outer surface of the math.tank[W/m**2.degree Celcius]\n",
"heat_f = 333.7\t\t\t#Heat of fusion of water at atmospheric pressure[kJ/kg]\n",
"e = 1\t\t\t #emissivity of math.tank\n",
"sigma = 5.67*(10**(-8))\t\t\t#Stefan's [W/m**2.K**4]\n",
"D1 = 3\t\t\t #inner diameter[m]\n",
"D2 = 3.04\t\t\t #Outer diameter[m]\n",
"\n",
"# Calculations and Results\n",
"#a)\n",
"A1 = (math.pi)*(D1**2)\t\t\t#Inner Surface area of the math.tank[m**2]\n",
"A2 = (math.pi)*(D2**2)\t\t\t#outer Surface area of the math.tank[m**2]\n",
"print (\"The radiation heat transfer coefficient is given by \")\n",
"print (\"h_rad = e*sigma*((T2**2)+(T_tank**2))*(T2+T_tank)\")\n",
"print (\"But we dont know the outer surface temperature T2 of the math.tank. hence we assume a T2 value\")\n",
"print (\"since heat transfer inside the math.tank is larger \")\n",
"T2 = 5+273\t\t\t#[K]\n",
"print \"Therefore taking T2 = \",T2,\"K\"\n",
"\n",
"h_rad = e*sigma*((T2**2)+(T_tank**2))*(T2+T_tank)\t\t\t#[W/m**2.K]\n",
"print \"The radiation heat transfer coefficient is determined to be\",h_rad,\"W/m**2.degree Celcius\"\n",
"\n",
"#Individual Thermal Resistances Offered\n",
"R_in = 1/(h_in*A1)\t\t\t#Resistance to convetion from inner side of math.tank[degree Celcius/W]\n",
"R_sphere = ((D2-D1)/2)/(4*math.pi*k*(D1/2)*(D2/2))\t\t\t#Resismath.tance to conduction due to ice sphere[degree Celcius/W]\n",
"R_out = 1/(h_out*A2)\t\t\t#Resistance to convection from outer side of math.tank[degree Celcius/W]\n",
"R_rad = 1/(h_rad*A2)\t\t\t#Resistance to radiation heat transfer[degree Celcius/W]\n",
"\n",
"#R_out and R_rad are in parallel connection,\n",
"R_eq = (1/((1/R_out)+(1/R_rad)))\t\t\t#[degree Celcius/W]\n",
"#R_in,R_sphere and R_eq are connected in series\n",
"R_total = R_in+R_sphere+R_eq\t\t\t#[degree Celcius/W]\n",
"Q_ = (T_tank-T_ice)/R_total\t\t\t#[W]\n",
"print \"The steady rate of heat transfer to the iced water is\",Q_,\"W\"\n",
"print (\"We determine outer surface temperature to check the validity of assumption\")\n",
"T2 = T_tank-(Q_*R_eq)\t\t\t#[K]\n",
"print T2,\"K\"\n",
"print (\"which is sufficiently close to 278 K\")\n",
"\n",
"#b)\n",
"delta_t = 24\t\t\t#Time duration[h]\n",
"Q = Q_*delta_t*(3600/1000)\t\t\t#[kJ]\n",
"print \"The total amount of heat transfer during a 24 hour period is\",Q,\"kJ\"\n",
"\n",
"#It takes 333.7 kJ of energy to melt 1kg of ice at 0 degree Celcius\n",
"m_ice = Q/heat_f\t\t\t#[kg]\n",
"print \"The amount of ice that will melt during 24h period is\",m_ice,\"kg\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.8"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The Steady rate of heat loss from the steam per m length of pipe is 120.786091657 W\n",
"The temperature drop across the pipe and the insulation is respectively 0.022902683016 and 283.587668342 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Loss through an Insulated Steam Pipe\n",
"\n",
"# Variables\n",
"T_steam = 320.\t\t\t#[degree Celcius]\n",
"T_surr = 5.\t\t \t#[degree Celcius]\n",
"k_iron = 80. \t\t#Thermal conductivity of cast iron[W/m.degree Celcius]\n",
"k_insu = 0.05\t \t\t#Thermal conductivity of glass wool insulation[W/m.degree Celcius]\n",
"h_out = 18.\t \t\t#Covection heat transfer coefficient outside the pipe[w/m**2.degree Celcius]\n",
"h_in = 60.\t\t \t#Covection heat transfer coefficient insideside the pipe[w/m**2.degree Celcius]\n",
"D_in = 0.05\t\t\t #Inner diameter of pipe[m]\n",
"D_out = 0.055\t\t\t#Outer diameter of pipe[m]\n",
"t = 0.03\t\t \t#Thickness of insulation[m]\n",
"r = (D_out/2)+t\t\t\t#Effective outer radius[m]\n",
"L = 1. \t\t\t#Length of pipe[m]\n",
"\n",
"# Calculations\n",
"#Areas of surfaces math.exposed to convection\n",
"A1 = 2*math.pi*(D_in/2)*L\t\t\t#Inner Area of pipe[m**2]\n",
"A2 = 2*math.pi*(r)*L\t\t\t#Outer Area of pipe[m**2\n",
"#Individual Thermal Resismath.tances\n",
"R_conv_in = 1/(h_in*A1)\t\t\t#Resismath.tance to convetion from inner surface of pipe[degree Celcius/W]\n",
"R_pipe = (math.log(D_out/D_in))/(2*math.pi*k_iron*L)\t\t\t#Resimath.tance to conduction through iron pipe[degree Celcius/W]\n",
"R_insu = (math.log(r/(D_out/2)))/(2*math.pi*k_insu*L)\t\t\t#Resismath.tance to conduction through insulation[degree Celcius/W]\n",
"R_conv_out = 1/(h_out*A2)\t\t\t#Resismath.tance to convetion from outer surface of insulation on pipe[degree Celcius/W]\n",
"#All resismath.tances are in series\n",
"R_total = R_conv_in+R_pipe+R_insu+R_conv_out\t\t\t#Total Resismath.tance[degree Celcius]\n",
"Q_ = (T_steam-T_surr)/R_total\t\t\t#[W]\n",
"\n",
"# Results\n",
"print \"The Steady rate of heat loss from the steam per m length of pipe is\",Q_,\"W\"\n",
"delta_T_pipe = Q_*R_pipe\t\t\t#[degree Celcius]\n",
"delta_T_insu = Q_*R_insu\t\t\t#[degree Celcius]\n",
"print \"The temperature drop across the pipe and the insulation is respectively\" \\\n",
",delta_T_pipe,\"and\",delta_T_insu,\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.9"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Heat generated in the wire is 80 W\n",
"The interface temperature is 105.014629738 degree Celcius\n",
"The critical radius of insulation of the plastic cover is 12.5 mm\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Loss from an Insulated Electric Wire\n",
"\n",
"# Variables\n",
"k_insu = 0.15\t\t\t#[W/m.degree Celcius]\n",
"V = 8\t\t\t#Voltage drop across wire[Volts]\n",
"I = 10\t\t\t#Current flowimg through the wire[Amperes]\n",
"T_atm = 30\t\t\t#Temperature of atmosphere to which wire is math.exposed[degree Celcius]\n",
"h = 12\t\t\t#heat transfer coefficient[W/m**2.degree Celcius]\n",
"L = 5\t\t\t#length of wire[m]\n",
"D = 0.003\t\t\t#diameter of wire[m]\n",
"t = 0.002\t\t\t#thickness of insulation[m]\n",
"r = (D/2)+t\t\t\t#Effective radius[m]\n",
"\n",
"# Calculations and Results\n",
"#Rate of heat generated in the wire becomes equal to the rate of heat transfer\n",
"Q_ = V*I\t\t\t#[W]\n",
"print \"Heat generated in the wire is\",Q_,\"W\"\n",
"A2 = 2*math.pi*r*L\t\t\t#Outer surface area[m**2]\n",
"\n",
"#Resistances offered\n",
"R_conv = 1/(h*A2)\t\t\t#Convection resismath.tance for the outer sueface of insulation[degree Celcius/W]\n",
"R_insu = (math.log(r/(D/2)))/(2*math.pi*k_insu*L)\t\t\t#Conduction resimath.tance for the plastic insulation[degree Celcius/W]\n",
"#Effective Resistance\n",
"R_total = R_conv+R_insu\t\t\t#[degree Celcius/W]\n",
"#Interface Temperature can be determined from\n",
"T1 = T_atm+(Q_*R_total)\t\t\t#[degree Celcius]\n",
"print \"The interface temperature is\",T1,\"degree Celcius\"\n",
"\n",
"#Critical radius \n",
"r_cr = k_insu/h\t\t\t#[m]\n",
"print \"The critical radius of insulation of the plastic cover is\",r_cr*1000,\"mm\"\n",
"#Larger value of critical radius ensures that increamathsing the thickness \n",
"# of insulation upto critical radius will increase the rate of heat transfer\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.10"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The given power transistor should not be operated at power levels above 3.0 W\n",
"if is its case temperature is not to exceed 85 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Maximum Power dissipation of a Transistor\n",
"\n",
"# Variables\n",
"T_ambient = 25.\t\t \t#Ambient temperature[degree Celcius]\n",
"T_case = 85.\t\t\t #Maximum temperature of the case[degree Celcius]\n",
"R_case_ambient = 20.\t\t#Resismath.tance for convection b/w case and ambient [degree Celcius/W]\n",
"\n",
"# Calculations\n",
"Q_ = (T_case-T_ambient)/R_case_ambient\t\t\t#[W]\n",
"\n",
"# Results\n",
"print \"The given power transistor should not be operated at power levels above\",Q_,\"W\"\n",
"print (\"if is its case temperature is not to exceed 85 degree Celcius\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.11"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The thermal resistance b/w the transistor attached to the heat sink and the ambient air for the specified temperature difference is 1.0 degree Celcius/W\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Selecting a Heat Sink for a Transistor\n",
"\n",
"# Variables\n",
"Q_ = 60. \t\t\t#Rate of heat transfer from given transistor at at full power[W]\n",
"T_ambient = 30.\t\t\t#Temperature of ambient air[degree Celcius]\n",
"T_case = 90\t\t\t#Maximum temperature of case[degree Celcius]\n",
"\n",
"# Calculations\n",
"R_math_sink = (T_case-T_ambient)/Q_\t\t\t#[degree Celcius/W]\n",
"\n",
"# Results\n",
"print \"The thermal resistance b/w the transistor attached to the heat sink\\\n",
" and the ambient air for the specified temperature difference is \",R_math_sink,\"degree Celcius/W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.12"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"In case of no fins\n",
"Rate of heat transfer when no finis attached 537.212343764 W\n",
"0.206559111798\n",
"Heat transfer due to the finned tube 25.3048502407 W\n",
"Heat transfer from the unfinned portion of the tube is 1.61163703129 W\n",
"The total Heat transfer from the finned tube is 5383.29745439 W\n",
"The increase in heat transfer from the tube per meter of length as a result of the addition of fins is 4846.08511062 W\n",
"The rate of heat transfer from the steam tube increases by a factor of 10.0208 as a result of adding fins\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Effect of fins on Heat transfer from steam pipes\n",
"\n",
"# Variables\n",
"k_fin = 180\t\t\t#thermal conductivity of aluminium alloy fins[W/m.degree Celcius]\n",
"D_tout = 0.03\t\t\t#Outer diameter of tube[m]\n",
"D_fout = 0.06\t\t\t#Outer diameter of circular fins[m]\n",
"t = 0.002\t\t\t#thickness of fin[m]\n",
"s = 0.003\t\t\t#dismath.tance between fins attached to the tube[m]\n",
"n = 200\t\t\t#number of fins per meter of tube\n",
"L = 1\t\t\t#length of tube[m]\n",
"T_surr = 25\t\t\t#Surrounding temperature[degree Celcius]\n",
"T_wall = 120\t\t\t#Temperature of wall of the tube[degree Celcius]\n",
"h = 60\t\t\t#Combined heat transfer coefficient[W/m**2.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"print (\"In case of no fins\")\n",
"A_nf = math.pi*D_tout*L\t\t\t#Area of tube with no fins attached[m**2]\n",
"\n",
"#Using Newton's Law of cooling\n",
"Q_nf = h*A_nf*(T_wall-T_surr)\t\t\t#[W]\n",
"print \"Rate of heat transfer when no finis attached\",Q_nf,\"W\"\n",
"\n",
"#The efficiency of the circular fins attached to a circular tube is plotted in Fig 3.43\n",
"L_fin = (D_fout-D_tout)/2\t\t\t#[m]\n",
"#In this case we have following corrected parameters\n",
"r2c = (D_fout+t)/2\t\t\t#[m]\n",
"Lc = L_fin+(t/2)\t\t\t#[m]\n",
"Ap = Lc*t\t\t\t#[m**2]\n",
"r = r2c/(D_tout/2);\n",
"alpha = (Lc*math.sqrt(Lc))*math.sqrt(h/(k_fin*Ap))\t\t\t#efficiency\n",
"print (alpha)\n",
"\n",
"#for above value of alpha efficiency is found out from the plot in fig 3.43\n",
"neta = 0.96;\n",
"A_f = 2*math.pi*((r2c**2)-((D_tout/2)**2))\t\t\t#Area of tube with fins attached to it[m**2]\n",
"Q_f_max = h*A_f*(T_wall-T_surr)\t\t\t#maximum rate of heat transfer[W]\n",
"Q_f = neta*Q_f_max\t\t\t#Heat transfer through tube with fins is efficiency times the maximum rate of heat transfer[W]\n",
"print \"Heat transfer due to the finned tube\",Q_f,\"W\"\n",
"\n",
"#From unfinned portion\n",
"A_uf = math.pi*D_tout*s\t\t\t # Unfinned area between two consecutive fins[m**2]\n",
"Q_uf = h*A_uf*(T_wall-T_surr)\t\t\t# [W]\n",
"print \"Heat transfer from the unfinned portion of the tube is\",Q_uf,\"W\"\n",
"\n",
"#Since there are 200 fins per meter of the tube hence 200 interfin spacing \n",
"Q_tf = n*(Q_f+Q_uf)\t\t\t #[W]\n",
"print \"The total Heat transfer from the finned tube is\",Q_tf,\"W\"\n",
"Q_increase = Q_tf-Q_nf\t\t\t #[W]\n",
"print \"The increase in heat transfer from the tube per meter of\\\n",
" length as a result of the addition of fins is\",Q_increase,\"W\"\n",
"eff = Q_tf/Q_nf\t\t\t #Effectiveness\n",
"print \"The rate of heat transfer from the steam tube increases by a factor of\",eff,\n",
"print (\"as a result of adding fins\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.13"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Shape factor is 62.9213634607\n",
"The steady rate of heat transfer from the pipe is 3964.04589803 W\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Loss from Buried Steam Pipes\n",
"\n",
"# Variables\n",
"T_esurf = 10\t\t\t#Surface temperatur of earth[degree Celcius]\n",
"T_psurf = 80\t\t\t#Outer surface temperature of pipe[degree Celcius]\n",
"k_soil = 0.9 #Thermal Conductivity of soil[W/m.degree Celcius]\n",
"L = 30\t\t \t #Length of pipe[m]\n",
"D = 0.1\t \t \t#Diameter of pipe[m]\n",
"z = 0.5\t\t\t #Depth at which pipe is kept[m]\n",
"\n",
"# Calculations and Results\n",
"#Calculating shape factor\n",
"if(z>(1.5*D)):\n",
" S = (2*math.pi*L)/(math.log((4*z)/D)) #[m]\n",
"\n",
"print \"Shape factor is\",S\n",
"Q_ = S*k_soil*(T_psurf-T_esurf)\t\t\t#[W]\n",
"print \"The steady rate of heat transfer from the pipe is\",Q_,\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.14"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Shave factor for given configuration is 9.18907197502e-30 m\n",
"The steady rate of heat transfer between the pipes becomes 3.79049218969e-28 W\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat Transfer between Hot and Cold Water pipes\n",
"\n",
"# Variables\n",
"T_hot = 70.\t\t\t#Surface Temperature of hot pipe[degree Celcius]\n",
"T_cold = 15.\t\t#Surface Temperature of cold pipe[degree Celcius]\n",
"L = 5\t\t \t#Length of both pipes[m]\n",
"D = 0.05\t\t\t#Diameter of both the pipes[m]\n",
"z = 0.3\t \t\t#Dismath.tance between centreline of both the pipes[m]\n",
"k = 0.75\t\t\t#Thermal Conductivity of the concerte[W/m.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"#Calculating Shape Factor\n",
"S = (2*math.pi*L)/(math.cosh(((4*(z**2))-(D**2)-(D**2))/(2*D*D)))\t\t\t#[m]\n",
"print \"Shave factor for given configuration is\",S,\"m\"\n",
"Q_ = S*k*(T_hot-T_cold)\t\t\t#[W]\n",
"print \"The steady rate of heat transfer between the pipes becomes\",Q_,\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.15"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The steady rate of heat transfer through the walls of the house is 925.699540089 W\n",
"The total amount of heat lost through the walss during a 24 hour period 22.2167889621 kWh/day\n",
"Cost of heat consumption is $ 1.66625917216 per day\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Cost of Heat Loss through walls in winter\n",
"\n",
"# Variables\n",
"R_va_insu = 2.3\t\t\t#thickness to thermal conductivity ratio[m**2.degreeCelcius/W]\n",
"L1 = 12. \t\t\t#length of first wall of house[m]\n",
"L2 = 12.\t \t\t#length of second wall of house[m]\n",
"L3 = 9.\t \t \t#length of third wall of house[m]\n",
"L4 = 9.\t\t \t#length of fourth wall of house[m]\n",
"H = 3.\t\t\t #height of all the walls[m]\n",
"T_in = 25.\t\t\t #Temperature inside house[degree Celcius]\n",
"T_out = 7.;\t\t\t #average temperature of outdoors on a certain day[degree Celcius]\n",
"ucost = 0.075 \t\t#Unit Cost of elctricity[$/kWh]\n",
"h_in = 8.29\n",
"h_out = 34.0\t\t\t#Heat transfer coefficients for inner and outer surface of the walls respectively[W/m**2.degree Celcius]\n",
"v = 24*(3600./1000)\t\t\t#velocity of wind[m/s]\n",
"\n",
"# Calculations and Results\n",
"#Heat transfer Area of walls = (Perimeter*Height)\n",
"A = (L1+L2+L3+L4)*H\t\t\t#[m**2]\n",
"#Individual Resismath.tances\n",
"R_conv_in = 1/(h_in*A)\t\t\t#Convection Resismath.tance on inner surface of wall[degree Celcius/W]\n",
"R_conv_out = 1/(h_out*A)\t\t\t#Convection Resismath.tance on outer surface of wall[degree Celcius/W]\n",
"R_wall = R_va_insu/A\t\t\t#Conduction resismath.tance to wall[degree Celcius/W]\n",
"\n",
"#All resistances are in series\n",
"R_total = R_conv_in+R_wall+R_conv_out\t\t\t#[degree Celcius/W]\n",
"Q_ = (T_in-T_out)/R_total\t\t\t#[W]\n",
"print \"The steady rate of heat transfer through the walls of the house is\",Q_,\"W\"\n",
"delta_t = 24\t\t\t #Time period[h]\n",
"Q = (Q_/1000)*delta_t\t\t\t#[kWh/day]\n",
"print \"The total amount of heat lost through the walss during a 24 hour period \",Q,\"kWh/day\"\n",
"cost = Q*ucost \t\t\t#[$/day]\n",
"print \"Cost of heat consumption is $\",cost,\"per day\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.16"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overall U factor is 0.553401639344 W/m**\n",
"Overall unit thermal Resistance is 1.80700585055 degree Celcius.m**2/W\n",
"The rate of heat loss through the walls under design conditions is 1328.16393443 W\n"
]
}
],
"source": [
"\n",
"import math \n",
"# The R-value of a Wood Frame Wall\n",
"\n",
"# Variables\n",
"f_area_insu = 0.75\t\t\t#area fraction for the insulation section\n",
"f_area_stud = 0.25\t\t\t#area fraction for the stud\n",
"R_bstud = 3.05\t\t\t#Total unit thermal resismath.tance of section between studs[m**.degree Celcius/W]\n",
"R_atstud = 1.23\t\t\t#Total unit thermal resismath.tance of section at studs[m**.degree Celcius/W]\n",
"P = 50\t\t\t#Perimeter of the building[m]\n",
"H = 2.5\t\t\t#height of the walls[m]\n",
"T_in = 22\t\t\t#Temperature inside the walls[degree Celcius]\n",
"T_out = -2\t\t\t#Temperature outside the walls[degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"U_bstud = 1/R_bstud\t\t\t#[W/m**2.degree Celcius]\n",
"U_atstud = 1/R_atstud\t\t\t#[W/m**2.degree Celcius]\n",
"Total_U = (f_area_insu*U_bstud)+(f_area_stud*R_atstud)\t\t\t#[W/m**2.degree Celcius]\n",
"print \"Overall U factor is\",Total_U,\"W/m**\"\n",
"print \"Overall unit thermal Resistance is\",(1/Total_U),\"degree Celcius.m**2/W\"\n",
"\n",
"#/Since glazing constitutes 20% of the walls,\n",
"A_wall = (0.80)*P*H\t\t\t#[m**2]\n",
"Q_ = Total_U*A_wall*(T_in-T_out)\t\t\t#[W]\n",
"print \"The rate of heat loss through the walls under design conditions is\",Q_,\"W\"\n",
"#Answer is slighthly different from book because of no of digits after decimal pont used here is quite large\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 3.17"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Old R value is 2.23 m**2.degree Celcius/W\n",
"New R value is 2.98 m**2.degree Celcius/W\n",
"Percent increase in R-value 33.6322869955\n"
]
}
],
"source": [
"\n",
"import math \n",
"# The R value of a Wall with Rigid Foam\n",
"\n",
"# Variables\n",
"#using values from previous \n",
"R_old = 2.23\t\t\t#AS written in book[m**2.degree Celcius/W]\n",
"#R value of of the fibreboard and the foam insulation, respectively\n",
"R_removed = 0.23\t\t\t#[m**2.degree Celcius/W]\n",
"R_added = 0.98\t\t\t#[m**2.degree Celcius/W]\n",
"\n",
"# Calculations\n",
"R_new = R_old-R_removed+R_added\t\t\t#[m**2.degree Celcius/W]\n",
"increase = ((R_new-R_old)/R_old)*100;\n",
"\n",
"# Results\n",
"print \"Old R value is\",R_old,\"m**2.degree Celcius/W\"\n",
"print \"New R value is\",R_new,\"m**2.degree Celcius/W\"\n",
"print \"Percent increase in R-value\",increase\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKjfI3&V&V7Heat And Mass Transfer - A Practical Approach/ch4.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 4 : Transient Heat Conduction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Since Bi = 0.001\n",
"is less than 0.1 hence lumped system is applicable and the error involved in this approximation is negligible\n",
"Time constant for given lumped heat capacity system 0.463235294118 s**(-1)\n",
"Required time is 10.0 seconds\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Temperature Measurement by Thermocouples\n",
"\n",
"# Variables\n",
"#Temperature of a gas stream is to be measured by a thermocouple whose junction can be approximated as a sphere\n",
"D = 0.001\t\t\t#Diameter of junction sphere[m]\n",
"#Properties of the junction\n",
"k = 35.\t\t \t#Thermal conductivity[W/m.degree Celcius]\n",
"rho = 8500.\t\t\t#desity[kg/m**3]\n",
"Cp = 320.\t\t\t#Specific heat[J/kg.degree Celcius] \n",
"h = 210. \t\t#Convection heat transfer coefficient between junction and the gas[W/m**2.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"Lc = (((math.pi/6)*(D**3))/(math.pi*(D**2)))\t\t\t#The characteristic length of the junction[m]\n",
"Bi = h*Lc/k\t\t\t#Biot Number\n",
"if(Bi<0.1):\n",
" print \"Since Bi = \",Bi\n",
" print (\"is less than 0.1 hence lumped system is applicable and the error involved\\\n",
" in this approximation is negligible\")\n",
"\n",
"b = h/(rho*Cp*Lc)\t\t\t#math.exponent time consmath.tant[s**(-1)]\n",
"print \"Time constant for given lumped heat capacity system\",b,\"s**(-1)\"\n",
"\n",
"#In order to read 99% of intial temperature difference between the junction and the gas we must have ((T(t)-T_end)/(Ti-T_end)) = 0.01\n",
"t = -1*(math.log(0.01))/b;\n",
"print \"Required time is\",round(t),\"seconds\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"lumped system analysis is not applicable, but we can still use it to get a rough estimate of time of death\n",
"As a rough estimate the person dies about 10.9400219974 hour\n",
"before the body was found\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Predicting the time of Death\n",
"\n",
"# Variables\n",
"T_room = 20\t\t\t#Temperature of room[degree Celcius]\n",
"T_body_f = 25\t\t\t#Temperature of dead body after some time[degree Celcius]\n",
"T_body_i = 37\t\t\t#Temperature of dead body just after death[degree Celcius]\n",
"h = 8\t\t\t#Heat transfer Coefficient[W/m**2.degree Celcius]\n",
"L = 1.7\t\t\t#Length of body which is assumed to be cylindrical in shape[m]\n",
"r = 0.15\t\t\t#Radius of cylindrical body\n",
"#Average human body is 72% water by mass, thus we assumne body to have properties of water\n",
"rho = 996\t\t\t#Density[kg/m**3]\n",
"k = 0.617\t\t\t#Thermal conductivity[W/m.degree Celcius]\n",
"Cp = 4178\t\t\t#Specific Heat[J/kg.degree Celcius]\n",
"\n",
"# Calculations\n",
"Lc = (math.pi*(r**2)*L)/((2*math.pi*r*L)+(2*math.pi*(r**2)))\t\t\t#Characteristic length of body[m]\n",
"Bi = (h*Lc)/k\t\t\t#Biot no\n",
"if(Bi>0.1):\n",
" print (\"lumped system analysis is not applicable, but we can still use it\\\n",
" to get a rough estimate of time of death\")\n",
"b = h/(rho*Cp*Lc)\t\t\t#[s**(-1)]\n",
"x = (T_body_i-T_room)/(T_body_f-T_room);\n",
"#math.exp(-b*t) = x;\n",
"t = (1./b)*math.log(x)\t\t\t#time elapsed[seconds]\n",
"\n",
"# Results\n",
"print \"As a rough estimate the person dies about\",t/3600,\"hour\"\n",
"print (\"before the body was found\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.3"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"the lumped system analysis is not applicable\n",
"Fourier no is 0.208501920689\n",
"The time taken for center of egg to reach 70 degree Celcius temperature 14.3834106435 minutes\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Boiling Eggs\n",
"\n",
"# Variables\n",
"T1 = 5.\t \t\t#Initial temperature of egg[degree Celcius]\n",
"T2 = 95.\t\t\t#Temperature of Boiling Water[degree Celcius]\n",
"h = 1200.\t\t\t#Convection heat transfer coefficient of egg[W/m**2.degree Celcius]\n",
"r = 0.025\t\t\t#Radius of egg[m]\n",
"T3 = 70\t\t \t#Final temperature attained by centre of egg[degree Celcius]\n",
"k = 0.627\t\t\t#Thermal conductivity[W/m.degree Celcius]\n",
"a = 0.151*(10**(-6))\t\t\t#Thermal diffusivity[m**2/s]\n",
"\n",
"# Calculations\n",
"Bi = (h*r)/k\t\t\t#Biot Number\n",
"if(Bi>0.1):\n",
" print (\"the lumped system analysis is not applicable\")\n",
" #Findinf coefficient for a sphere corresponding to this bi are,\n",
" lambda1 = 3.0754\n",
" A1 = 1.9959;\n",
" x = (T3-T2)/(T1-T2);\n",
" tau = (-1/(lambda1**2))*math.log(x/A1);\n",
" print \"Fourier no is\",tau\n",
" #Since fourier no is greater than 0.2, cooking time is determined from the definition of fourier no to be\n",
" t = (tau*(r**2))/a\t\t\t#[seconds]\n",
" print \"The time taken for center of egg to reach 70 degree Celcius temperature\",(t/60),\"minutes\"\n",
"else:\n",
" print (\"the lumped system is not applicable\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.4"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The surface temperature of the plates when they leave the oven will be 281.408 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"\n",
"# Variables\n",
"# Heating of Brass Plates in an Oven\n",
"T_in = 20.\t\t\t#Initial uniform temperature of brass plate[degree Celcius]\n",
"T_f = 500.\t\t\t#Temperature of the oven[degree Celcius]\n",
"t = 7*60.\t\t\t#[seconds]\n",
"h = 120.\t\t\t#combined convection and radiation heat transfer coefficient[W/m**2.degree Celcius]\n",
"L = 0.04/2\t\t\t#Thickness of plate 2L = 0.004[m]\n",
"#Properties of brass at room temperature are:-\n",
"k = 110.\t\t\t#Thermal conductivity[W/m.degree Celcius]\n",
"rho = 8530.\t\t\t#density[kg/m**3]\n",
"Cp = 380.\t\t\t#Specific Heat Capacity[J.kg.degree Celcius]\n",
"a = 33.9*(10**(-6))\t\t\t#Thermal Diffusivity[m**2/s]\n",
"\n",
"# Calculations\n",
"Bi1 = 1/(k/(h*L));\n",
"tau1 = (a*t)/(L**2);\n",
"#For above values of biot no and fourier no we have\n",
"p = 0.46\t\t\t# p = (T0-T_f)/(T_in-T_f),where T0 is temperature of inner surface of plate at time t\n",
"x = L;\n",
"Bi2 = Bi1;\n",
"#For above condition of x/L ratio and Biot number we have\n",
"q = 0.99\t\t\t#q = (T-T_f)/(T_in-T_f), where T is temperature of outer surface of plate after time t\n",
"T = T_f+((p*q)*(T_in-T_f))\t\t\t#[degree Celcius]\n",
"\n",
"# Results\n",
"print \"The surface temperature of the plates when they leave the oven will be\",T,\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.5"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The center temperature of the shaft after 45 minutes is 360.0 degree Celcius\n",
"The total heat transfer from the shaft during 45 minutes of cooling is 29359.0 kJ\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Cooling of a long Stainless Steel Cylindrical Shaft\n",
"\n",
"# Variables\n",
"Ti = 600.\t\t\t#Temperature of cylinder just after taking it out of the oven[degree Celcius]\n",
"h = 80. \t\t\t#average heat transfer coefficient[W/m**2.degree Celcius] \n",
"t = 45.*60\t\t\t#Time for cooling[seconds]\n",
"r = 0.1\t \t\t#Radius of cylinder[m]\n",
"l = 1.\t\t \t#Length of cylinder[m]\n",
"#Properties of stainless steel cylinder\n",
"k = 14.9\t\t\t#Thermal conductivity[W/m.degree Celcius]\n",
"rho = 7900.\t\t\t#Density[kg/m**3]\n",
"Cp = 477.\t\t\t#Specific Heat Capacity[J/kg.degree Celcius]\n",
"a = 3.95*(10**(-6))\t\t\t#Thermal diffusivity[m**2/s]\n",
"T_f = 200.\t\t\t#Ambient temperature[degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"Bi1 = (h*r)/k;\n",
"tau1 = (a*t)/(r**2);\n",
"#For biot no = Bi1 and fourier no = tau1,we have\n",
"p = 0.40\t\t\t#p = (T(0)-T_f)/(Ti-T_f) \n",
"T_0 = T_f+(p*(Ti-T_f))\t\t\t#[degree Celcius]\n",
"print \"The center temperature of the shaft after 45 minutes is\",T_0,\"degree Celcius\"\n",
"\n",
"#Determining actual heat transfer\n",
"m = rho*math.pi*(r**2)*l\t\t\t #[kg]\n",
"Q_max = m*Cp*(Ti-T_f)*(1./1000)\t\t\t#[kJ]\n",
"x = (Bi1**2)*tau1;\n",
"#For biot no = Bi1 and (h**2)at/(k**2) = x, we have\n",
"y = 0.62\t\t\t#y = Q/Q_max \n",
"Q = y*Q_max\t\t\t#[kJ]\n",
"print \"The total heat transfer from the shaft during 45 minutes of cooling is\",round(Q),\"kJ\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.6"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Water pipes must be burried to a depth of at least 0.7776 m\n",
"so as to avoid freezing under the specified harsh winter conditions\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Minimum Burial Depth of Water Pipes to avoid Freezing\n",
"\n",
"# Variables\n",
"#Soil properties:-\n",
"k = 0.4\t\t\t#Thermal conductivity[W/m.degree Celcius]\n",
"a = 0.15*(10**(-6))\t\t\t#Thermal diffusivity[m**2/s]\n",
"T_in = 15\t\t\t#Initial uniform temperature of ground[degree Celcius]\n",
"T_x = 0\t\t\t#Temperature after 3 months[degree Celcius]\n",
"Ts = -10\t\t\t#Temperature of surface[degree Celcius]\n",
"\n",
"# Calculations\n",
"#The temperature of the soil surrounding the pipes wil be 0 degree Celcius after three months in the case of minimum burial depth, therefore we have\n",
"x = (h/k)*(math.sqrt(a*t));\n",
"#Since h tends to infinty\n",
"#x = %inf;\n",
"y = (T_x-T_in)/(Ts-T_in);\n",
"#For values of x and y we have\n",
"neta = 0.36;\n",
"t = 90*24*60*60\t\t\t#[seconds]\n",
"x = 2*neta*math.sqrt(a*t)\t\t\t#[m]\n",
"\n",
"# Results\n",
"print \"Water pipes must be burried to a depth of at least \",x,\"m\"\n",
"print (\"so as to avoid freezing under the specified harsh winter conditions\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.7"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The surface temperature fro both the wood and aluminium blocks are 148.612000286 and 22.0 degree Celcius respectively\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Surface Temperature Rise of Heated Blocks\n",
"\n",
"# Variables\n",
"flux = 1250.\t\t\t#Consmath.tant solar heat flux[W/m**2]\n",
"T = 20\t\t \t#Temperature of black painted wood block[degree Celcius]\n",
"k_wood = 1.26\t\t\t#Thermal conductivity of wood at room temperature[W/m.K]\n",
"a_wood = 1.1*(10**(-5))\t\t\t#Diffusivity of wood at room temperature[m**2/s]\n",
"k_aluminium = 237\t\t\t#Thermal conductivity of aluminium at room temperature[W/m.K]\n",
"a_aluminium = 9.71*(10**(-5))\t\t\t#Diffusivity of aluminium at room temperature[m**2/s]\n",
"t = 20*60\t\t\t#[seconds]\n",
"\n",
"# Calculations\n",
"Ts_wood = T+((flux/k_wood)*(math.sqrt((4*a_wood*t)/math.pi)))\t\t\t#[degree Celcius]\n",
"Ts_aluminium = T+((flux/k_aluminium)*(math.sqrt((4*a_aluminium*t)/math.pi)))\t\t\t#[degree Celcius]\n",
"\n",
"# Results\n",
"print \"The surface temperature fro both the wood and aluminium blocks are \" \\\n",
",(Ts_wood),\"and\",round(Ts_aluminium),\"degree Celcius\",\"respectively\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.8"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"At the center of the plane wall\n",
"Fourier no and Biot no are 8.475 and 0.0327272727273 respectively\n",
"At the center of the cylinder\n",
"Fourier no and Biot no are 12.204 and 0.0272727272727 respectively\n",
"The temperature at the center of the short cylinder is 63.0 degree Celcius\n",
"The temperature at the top surface of the cylinder 62.0 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Cooling of a Short Brass Cylinder\n",
"\n",
"# Variables\n",
"Ti = 120\t\t\t#Initial Temperature[degree Celcius]\n",
"T_ambient = 25\t\t\t#Temperature of atmospheric air[degree Celcius]\n",
"h = 60\t\t\t#convetcion heat transfer coefficient[W/m**2.degree Celcius]\n",
"r = 0.05\t\t\t#radius of cylinder[m]\n",
"L = 0.06\t\t\t#thickness[m]\n",
"a = 3.39*(10**(-5))\t\t\t#Diffusivity of brass[m**2/s]\n",
"k = 110\t\t\t#Thermal conductivity of brass[W/m.degree Celcius]\n",
"t = 900\t\t\t#[seconds]\n",
"\n",
"# Calculations and Results\n",
"print (\"At the center of the plane wall\")\n",
"tau1 = (a*t)/(L**2);\n",
"Bi1 = (h*L)/k;\n",
"print \"Fourier no and Biot no are\",tau1,\"and\",Bi1,\"respectively\"\n",
"print (\"At the center of the cylinder\")\n",
"\n",
"tau2 = (a*t)/(r**2);\n",
"Bi2 = (h*r)/k;\n",
"print \"Fourier no and Biot no are\",tau2,\"and\",Bi2,\"respectively\"\n",
"\n",
"theta_wall_c = 0.8\t\t\t#(T(0,t)-T_ambient)/(Ti-T_ambient)\n",
"theta_cyl_c = 0.5\t\t\t#(T(0,t)-T_ambient)/(Ti-T_ambient)\n",
"T_center = T_ambient+((theta_wall_c*theta_cyl_c)*(Ti-T_ambient))\t\t\t#[degree Celcius]\n",
"print \"The temperature at the center of the short cylinder is\",round(T_center),\"degree Celcius\"\n",
"\n",
"#Solution (b):-\n",
"#The centre of the top surface of the cylinder is still at the center of the lonf cylinder(r = 0),but at the outer surface of the plane wall(x = L).\n",
"x = L\t\t\t#[m]\n",
"y = x/L;\n",
"#For Bi = Bi1 and x = 1\n",
"theta_wall_L = 0.98*theta_wall_c\t\t\t#(T(L,t)-T_ambient)/(Ti-T_ambient)\n",
"T_surface = T_ambient+((theta_wall_L*theta_cyl_c)*(Ti-T_ambient))\t\t\t#[degree Celcius]\n",
"print \"The temperature at the top surface of the cylinder\",round(T_surface),\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.9"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"At the center of the plane wall\n",
"At the center of the cylinder\n",
"The total heat transfer from the cylinder during the first 15 minutes of cooling is 171.781226985 kJ\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat transfer from a Short Cylinder\n",
"\n",
"# Variables\n",
"Ti = 120.\t\t\t#Initial Temperature[degree Celcius]\n",
"T_ambient = 25.\t\t#Temperature of atmospheric air[degree Celcius]\n",
"rho = 8530.\t\t\t#density of brass cyliner[kg/m**3]\n",
"Cp = 0.380\t\t\t#Specific heat of brass cylinder[kJ/kg.degree Celcius]\n",
"r = 0.05\t\t\t#radius[m]\n",
"H = 0.12\t\t\t#Height of cylinder[m]\n",
"h = 60. \t\t\t#convetcion heat transfer coefficient[W/m**2.degree Celcius]\n",
"a = 3.39*(10**(-5))\t\t\t#Diffusivity of brass [m**2/s]\n",
"k = 110. \t\t#Thermal conductivity of brass[W/m.degree Celcius]\n",
"L = 0.06\t\t\t#[m]\n",
"t = 900\t\t \t#[seconds]\n",
"\n",
"# Calculations\n",
"m = rho*(math.pi*(r**2)*H)\t\t\t#mass of cylinder[kg]\n",
"Q_max = m*Cp*(Ti-T_ambient)\t\t\t#[kJ]\n",
"print (\"At the center of the plane wall\")\n",
"tau1 = (a*t)/(L**2);\n",
"Bi1 = (h*L)/k;\n",
"x = (Bi1**2)*tau1;\n",
"\n",
"#For given x and Bi1\n",
"p = 0.23\t\t\t#(Q/Qmax) for plane wall\n",
"print (\"At the center of the cylinder\")\n",
"tau2 = (a*t)/(r**2);\n",
"Bi2 = (h*r)/k;\n",
"y = (Bi2**2)*tau2;\n",
"\n",
"#For given y and Bi2\n",
"q = 0.47\t\t\t#(Q/Qmax) for infinite cylinder\n",
"Q = Q_max*(p+(q*(1-p)))\t\t\t#[kJ]\n",
"print \"The total heat transfer from the cylinder during the first 15 minutes of cooling is\",Q,\"kJ\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.10"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"the temperature at the center of the cylinder 15cm from the exposed bottom surface 150.618494515 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"\n",
"# Cooling of a Long Cylinder by Water\n",
"\n",
"# Variables\n",
"Ti = 200. \t\t#Initial Temperature of aluminium cylinder[degree Celcius]\n",
"Tf = 15.\t\t\t#Temperature of water in which cylinder is kept[degree Celcius]\n",
"h = 120.\t\t\t#Heat transfer Coefficent[W/m**2.degree Celcius]\n",
"t = 5*60.\t\t\t#[seconds]\n",
"#Properties of aluminium at room temperature\n",
"k = 237\t\t\t#Thermal conductivity[W/m.degree Celcius]\n",
"a = 9.71*(10**(-5))\t\t\t#Thermal diffusivity[m**/s]\n",
"r = 0.1\t\t\t#Radius of cylinder[m]\n",
"x = 0.15\t\t\t#[m]\n",
"\n",
"# Calculations\n",
"Bi = (h*r)/k\t\t\t#Biot number\n",
"#Corresponding to this biot no coefficients for a cylinder\n",
"lambda_ = 0.3126\n",
"A = 1.0124;\n",
"tau = (a*t)/(r**2);\n",
"#Umath.sing one term approximation\n",
"theta0 = A*math.exp(-(lambda_**2)*tau);\n",
"neta = x/(2*math.sqrt(a*t));\n",
"u = (h*math.sqrt(a*t))/k;\n",
"v = (h*x)/k;\n",
"w = (u**2);\n",
"theta_semiinfinite = 1-math.erfc(neta)+(math.exp(v+w)*math.erfc(neta+u));\n",
"theta = theta_semiinfinite*theta0;\n",
"T_x_t = Tf+(theta*(Ti-Tf))\t\t\t#[degree Celcius]\n",
"\n",
"# Results\n",
"print \"the temperature at the center of the cylinder 15cm from the exposed bottom surface\",(T_x_t),\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 4.11"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The convection heat transfer coefficient should be kept below the value 20.0 W/m**2.degree Celcius\n",
"to satisfy the constraints on the temperature of the steak during refrigeration\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Refrigerating Steaks while Avoiding Frostbite\n",
"\n",
"# Variables\n",
"Ti = 25 \t\t\t#Initial temperature of steaks[degree Celcius]\n",
"Tf = -15\t\t\t#Temperature of refrigerator[degree Celcius]\n",
"L = 0.015\t\t\t#Thickness of steaks[m]\n",
"#Properties of steaks\n",
"k = 0.45\t\t\t#[W/m.degree Celcius]\n",
"rho = 1200\t\t\t#density[kg/m**3]\n",
"a = 9.03*(10**(-8))\t\t\t#Thermal diffusivity[m**2/s]\n",
"Cp = 4.10\t\t\t#Specific Heat [kJ/kg]\n",
"T_L = 2\n",
"T_0 = 8\t\t\t#[degree Celcius]\n",
"\n",
"# Calculations\n",
"#In the limiting case the surface temperature at x = L from the centre will be 2 degree C,while midplane temperature is 8 degree C in an environment at -15 degree C we have\n",
"x = L;\n",
"p = (T_L-Tf)/(T_0-Tf);\n",
"#For this value of p we have\n",
"Bi = 1/1.5\t\t\t#Biot number\n",
"h = (Bi*k)/L\t\t\t#[W/m**2.degree Celcius]\n",
"\n",
"# Results\n",
"print \"The convection heat transfer coefficient should be kept below the value\",h,\"W/m**2.degree Celcius\"\n",
"print (\"to satisfy the constraints on the temperature of the steak during refrigeration\")\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKjfI)%L557Heat And Mass Transfer - A Practical Approach/ch5.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 5 : Numerical Methods in Heat Conduction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 5.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"\n",
"from scipy.optimize import fsolve \n",
"import math \n",
"\n",
"# Steady Heat Conduction in a Large Uranium Plate\n",
"\n",
"# Variables\n",
"L = 0.04\t\t\t#Thickness of plate[m]\n",
"k = 28\t\t\t#Thermal conductivity[W/m.degree Celcius]\n",
"e_gen = 5*(10**6)\t\t\t#Rate of heat generation per unit volume[W/m**3]\n",
"h = 45\t\t\t#Heat transfer coefficient[W/m**2]\n",
"T_ambient = 30\t\t\t#Ambient temperature[degree Celcius]\n",
"\n",
"# Calculations\n",
"M = 3\t\t\t#No of nodes\n",
"#These nodes are chosen to be at the two surfaces of the plate and the mid point\n",
"del_x = L/(M-1)\t\t\t#Nodal Spacing[m]\n",
"#Let the nodes be 0,1 and 2. and temperatures at these nodes are\n",
"T0 = 0\t\t\t#Temperature at node 0[degree Celcius]\n",
"#Finding temperatures at other two nodes umath.sing finite difference method\n",
"c1 = e_gen*(del_x**2)/k;\n",
"c2 = (-h*del_x*T_ambient/k)-(c1/2);\n",
"def f1(T):\n",
" temp = [0,0]\n",
" temp[0] = 2*T[0]-T[1]-c1;\n",
" temp[1] = T[0]-1.032*T[1]-c2;\n",
"#To find the solution assume an initial value x0 = [a,b]\n",
"#then equate [xs,fxs,m] = fsolve(f1,x0')\n",
" \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 5.2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"((5.5-m)T_(m-1))-((10.008-2m)Tm)+((4.5-m)T_m+1) = -0.29\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heat transfer from triangular fins\n",
"\n",
"# Variables\n",
"k = 180 \t\t\t#Thermal conductivity of aluminium alloy[W/m.degree Celcius]\n",
"L = 0.05\t\t\t#length of fin[m]\n",
"b = 0.01\t\t\t#Base thickness of fin[m]\n",
"T_surr = 25\t\t\t#Temperature of surrounding[degree Celcius\n",
"h = 15\t\t\t#heat transfer coefficient[W/m**2.degree Celcius]\n",
"M = 6\t\t\t#No of equally spaced nodes along the fin\n",
"\n",
"# Calculations and Results\n",
"del_x = L/(M-1)\t\t\t#Nodal Spacing[m]\n",
"T0 = 200\t\t\t#Temperature at node 0[degree Celcius]\n",
"theta = math.tan(b/2*L);\n",
"#sigmaQ_all_sides = kA_left((T_(m-1)-T_m)/del_X)+((T_(m+1)-T_m)/del_x)+(hA_conv(T_surr-T_m)) = 0\n",
"#Simplifying above equation we get\n",
"print (\"((5.5-m)T_(m-1))-((10.008-2m)Tm)+((4.5-m)T_m+1) = -0.29\")\n",
"#Putting m = 1,2,3,4 we get five equations in five unknowns \n",
"#Solving these five equations we get temperatures at node 1,2,3,4 and 5 respectively\n",
"def f5(T):\n",
" node1 = -8.008*T[0]+3.5*T[1]+0*T[2]+0*T[3]+0*T[4]+900.209;\n",
" node2 = 3.5*T[0]-6.008*T[1]+2.5*T[2]+0*T[3]+0*T[4]+0.209;\n",
" node3 = 0*T[0]+2.5*T[1]-4.008*T[2]+1.5*T[3]+0*T[4]+0.209;\n",
" node4 = 0*T[0]+0*T[1]+1.5*T[2]-2.008*T[3]+0.5*T[4]+0.209;\n",
" node5 = 0*T[0]+0*T[1]+0*T[2]+1*T[3]-1.008*T[4]+0.209;\n",
" return node1\n",
" #Solution(b)\n",
" #T1 = T[0],T2 = T[1],T3 = T[2],T4 = T[3],T5 = T[4];\n",
" # w = 1\t\t\t#width[m]\n",
" # Q_fin = (h*w*del_x/math.cos(theta))*[(T0+2*(T1+T2+T3+T4)+T5-10*T_surr)]\t\t\t#[W]\n",
" # print \"The total rate of heat transfer from the fin is\",Q_fin,\"W\"\n",
" #Solution(c)\n",
"# Q_max = (h*2*w*L/math.cos(theta)*(T0-T_surr))\t\t\t#[W]\n",
"#neta = Q_fin/Q_max;\n",
"#print \"Efficiency of the fin is\",neta\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 5.3"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"\n",
"import math \n",
"# SteadLy Two-Dimensional Heat Conduction in L-Bars\n",
"\n",
"# Variables\n",
"e_gen = 2*(10**6)\t\t\t#Heat generated per unit volume[W/m**3]\n",
"k = 15\t\t\t#Thermal heat conductivity[W/m.degree Celcius]\n",
"T_ambient = 25\t\t\t#Temperature of ambient air[degree Celcius]\n",
"T_surface = 90\t\t\t#Temperature of the bottom surface[degree Celcius]\n",
"h = 80#convection coefficient[W/m**2]\n",
"q_R = 5000\t\t\t#Heat flux to which right surface is subjected[W/m**2]\n",
"del_x = 0.012\n",
"del_y = 0.012\t\t\t#Dismath.tance between equally spaced nodes[m]\n",
"\n",
"# Calculations\n",
"#After substituing values in equations of all nodal points finally we have nine equation and nine unknowns\n",
"def f9(T):\n",
" temp[0] = -2.064*T[0]+1*T[1]+0*T[2]+1*T[3]+0*T[4]+0*T[5]+0*T[6]+0*T[7]+0*T[8]+11.2;\n",
" temp[1] = 1*T[0]-4.128*T[1]+1*T[2]+0*T[3]+2*T[4]+0*T[5]+0*T[6]+0*T[7]+0*T[8]+22.4;\n",
" temp[2] = 0*T[0]+1*T[1]-2.128*T[2]+0*T[3]+0*T[4]+1*T[5]+0*T[6]+0*T[7]+0*T[8]+12.8;\n",
" temp[3] = 1*T[0]+0*T[1]+0*T[2]-4*T[3]+2*T[4]+109.2;\n",
" temp[4] = 0*T[0]+1*T[1]+0*T[2]+1*T[3]-4*T[4]+1*T[5]+0*T[6]+0*T[7]+0*T[8]+109.2;\n",
" temp[5] = 0*T[0]+0*T[1]+1*T[2]+0*T[3]+2*T[4]-6.128*T[5]+1*T[6]+0*T[7]+0*T[8]+212.0;\n",
" temp[6] = 0*T[0]+0*T[1]+0*T[2]+0*T[3]+0*T[4]+1*T[5]-4.128*T[6]+1*T[7]+0*T[8]+202.4;\n",
" temp[7] = 0*T[0]+0*T[1]+0*T[2]+0*T[3]+0*T[4]+0*T[5]+1*T[6]-4.128*T[7]+T[8]+202.4;\n",
" temp[8] = 0*T[0]+0*T[1]+0*T[2]+0*T[3]+0*T[4]+0*T[5]+0*T[6]+1*T[7]-2.064*T[8]+105.2;\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 5.4"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"\n",
"import math \n",
"from numpy import zeros\n",
"\n",
"# Heat Loss through Chimneys\n",
"\n",
"# Variablesa\n",
"k = 1.4\t\t\t#Thermal conductivity of concrete[W/m.degree Celcius]\n",
"A = 0.2*0.2\t\t\t#Area of flow section[m**2]\n",
"t = 0.2\t\t\t#Thickness of the wall[m]\n",
"Ti = 300+273\t\t\t#Average temperature of gases[K]\n",
"hi = 70\t\t\t#Convection heat transfer coefficient inside the chimney[W/m**2]\n",
"ho = 21\t\t\t#Convection heat transfer coefficient outside the chimney[W/m**2]\n",
"To = 20+273\t\t\t#Temperature od outer air[Kelvin]\n",
"e = 0.9\t\t\t#Emissivity\n",
"delx = 0.1\n",
"dely = 0.1\t\t\t#Nodal spacing [m]\n",
"\n",
"# Calculations\n",
"#Substituing values in all nodal equations and and solving these equations we get temperature at all nodes\n",
"def fu9(T):\n",
" temp = zeros(8)\n",
" temp[0] = 7*T[0]-T[1]-T[2]-2865;\n",
" temp[1] = -T[0]+8*T[1]-2*T[3]-2865;\n",
" temp[2] = -T[0]+4*T[2]-2*T[3]-T[5];\n",
" temp[3] = -T[1]-T[2]+4*T[3]-T[4]-T[6];\n",
" temp[4] = -2*T[3]+4*T[4]-2*T[7];\n",
" temp[5] = -T[1]-T[2]+3.5*T[5]+(0.3645*(10**(-9))*(T[5]**4))-456.2;\n",
" temp[6] = -2*T[3]-T[5]+7*T[6]+(0.729*(10**(-9))*(T[6]**4))-T[7]-912.4;\n",
" temp[7] = -2*T[4]-T[6]+7*T[7]+(0.729*(10**(-9))*(T[7]**4))-912.4;\n",
" temp[8] = -T[7]+2.5*T[8]+(0.3645*(10**(-9))*(T[8]**4))-456.2;\n",
"#T1 = T[0],T2 = T[1],T3 = T[2],T4 = T[3],T5 = T[4],T6 = T[5],T7 = T[6],T8 = T[7],T9 = T[8];\n",
"#T_wall = (0.5*T6+T7+T8+0.5*T9)/(0.5+1+1+0.5);\n",
"\n",
"# Results\n",
"#print \"The average temperature at the outer surface of the chimney weighed by the surface area is\",T_wall,\"Kelvin\"\n",
"#Q_chimney = (ho*4*0.6*1*(T_wall-To))+(e*5.67*(10**-8)*0.6*1*((T_wall**4)-((260**4))))\t\t\t#[W]\n",
"#print \"The heat transfer is\",Q_chimney,\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 5.5"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Temperatures at node 1 and 2 are respectively 139.732 228.3592 and 149.258625 172.775823867 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Transient Heat Conduction in a Large Uranium Plate\n",
"\n",
"# Variables\n",
"k = 28\t\t\t#[W/m.degree Celcius]\n",
"a = 12.5*10**(-6)\t\t\t#Thermal diffusivity[m**2/s]\n",
"T1_0 = 200\n",
"T2_0 = 200\t\t\t#Initial Temperature[degree Celcius]\n",
"e_gen = 5*10**6\t\t\t#Heat generated per unit volume[W/m**3]\n",
"h = 45\t\t\t#heat transfer coefficient[W/m**2.degree Celcius]\n",
"T0 = 0\t\t\t#Temperature at node 0[degree Celcius]\n",
"L = 0.04\t\t\t#[m]\n",
"M = 3\t\t\t#No of nodes\n",
"t = 15\t\t\t#[seconds]\n",
"\n",
"# Calculations\n",
"delx = L/(M-1)\t\t\t#[m]\n",
"#The nodes are 0,1 and 2\n",
"tau = (a*t)/(delx**2)\t\t\t#Fourier no\n",
"#Substituing this value of tau in nodal equations\n",
"#The nodal temperatures T1_1 and T2_1 at t = 15sec\n",
"T1_1 = 0.0625*T1_0+0.46875*T2_0+33.482\t\t\t#[degree Celcius]\n",
"T2_1 = 0.9375*T1_0+0.032366*T2_0+34.386\t\t\t#[degree Celcius]\n",
"#Similarly the nodal themperatures T1_2,T2_2 at t1 = 2*t = 30sec are\n",
"T1_2 = 0.0625*T1_1+0.46875*T2_1+33.482\t\t\t#[degree Celcius]\n",
"T2_2 = 0.9375*T1_1+0.032366*T2_1+34.386\t\t\t#[degree Celcius]\n",
"\n",
"# Results\n",
"print \"Temperatures at node 1 and 2 are respectively\",T1_1,T2_1,\"and\",T1_2,T2_2,\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 5.6"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"No of nodes are 6.0\n",
"The maximum allowable value of the time step is 2167.94334441 s\n",
"The mesh Fourier number is 0.111\n",
"Nodal temperatures at 7:15am are\n",
"Node0: 20.01876 degree Celcius\n",
"Node1: 16.6 degree Celcius\n",
"Node2: 12.2 degree Celcius\n",
"Node3: 7.8 degree Celcius\n",
"Node4: 3.4 degree Celcius\n",
"Node5: 5.45576 degree Celcius\n",
"The amount of heat transfer during the first time step or during the first 15 min period is -1012500.0 J\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Solar Energy Storage in Trombe Walls\n",
"\n",
"# Variables\n",
"hin = 10\t\t\t#[W/m**2]\n",
"A = 3*75\t\t\t#[m**2]\n",
"Tin = 21\t\t\t#[degree Celcius]\n",
"k = 0.69\t\t\t#[W/m.degree Celcius]\n",
"a = 4.44*10**(-7)\t\t\t#diffusivity[m**2/s]\n",
"kappa = 0.77;\n",
"delx = 0.06\t\t\t#The nodal spacing[m]\n",
"L = 0.3\t\t\t#Length of wall[m]\n",
"Tout = 0.6\n",
"q_solar = 360\t\t\t#Ambient temperature in degree Celcius and Solar Radiation between 7am to 10 am\n",
"\n",
"# Calculations and Results\n",
"M = (L/delx)+1;\n",
"print \"No of nodes are\",M\n",
"\n",
"#Stability Criterion\n",
"del_t = (delx**2)/(3.74*a)\t\t\t#[seconds]\n",
"print \"The maximum allowable value of the time step is\",del_t,\"s\"\n",
"\n",
"#Therefore any step less than del_t can be used to solve this problem,for convinience let's choose \n",
"delt = 900\t\t\t#[seconds]\n",
"tao = a*delt/(delx**2);\n",
"print \"The mesh Fourier number is\",tao\n",
"\n",
"#Initially at 7am or t = 0,the temperature of the wall is said to vary linearly between 21 degree Celcius at node 0 and -1 at node 5\n",
"#Temp between two neighbouring nodes is\n",
"temp = (21-(-1))/5.\t\t\t#[degree Celcius]\n",
"T0_0 = Tin;\n",
"T1_0 = T0_0-temp;\n",
"T2_0 = T1_0-temp;\n",
"T3_0 = T2_0-temp;\n",
"T4_0 = T3_0-temp;\n",
"T5_0 = T4_0-temp;\n",
"T0_1 = ((1-3.74*tao)*T0_0)+(tao*(2*T1_0+36.5));\n",
"T1_1 = (tao*(T0_0+T2_0))+(T1_0*(1-(2*tao)));\n",
"T2_1 = (tao*(T1_0+T3_0))+(T2_0*(1-(2*tao)));\n",
"T3_1 = (tao*(T2_0+T4_0))+(T3_0*(1-(2*tao)));\n",
"T4_1 = (tao*(T3_0+T5_0))+(T4_0*(1-(2*tao)));\n",
"T5_1 = (T5_0*(1-(2.70*tao)))+(tao*((2*T4_0)+(0.70*Tout)+(0.134*q_solar)));\n",
"\n",
"print (\"Nodal temperatures at 7:15am are\")\n",
"print \"Node0:\",T0_1,\"degree Celcius\"\n",
"print \"Node1:\",T1_1,\"degree Celcius\"\n",
"print \"Node2:\",T2_1,\"degree Celcius\"\n",
"print \"Node3:\",T3_1,\"degree Celcius\"\n",
"print \"Node4:\",T4_1,\"degree Celcius\"\n",
"print \"Node5:\",T5_1,\"degree Celcius\"\n",
"\n",
"Q_wall = hin*A*delt*(((round(T0_1)+T0_0)/2)-Tin)\t\t\t#[J]\n",
"print \"The amount of heat transfer during the first time step or during the first 15 min period is\",Q_wall,\"J\"\n",
"\n",
"#Similarly using values from the table given we can find temperature at various nodes after required time interval\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKjfIo`7Heat And Mass Transfer - A Practical Approach/ch6.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 6 : Fundamentals of Convection"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 6.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"T(y) = T0+(mu*(v**2)/(2*k))[(y/L)-((y/L)**2)]\n",
"Maximum temperature occurs at mid plane and its value is 20.0 degree Celcius\n",
"Heat fluxes at the two plates are equal in magnitude but opposite in sign and the value of magnitude is 30.1464 kW/m**2\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Temperature Rise of Oil is a Journal Bearing\n",
"\n",
"# Variables\n",
"k = 0.145\t\t\t#[W/m.K]\n",
"mu = 0.8374\t\t\t#[kg/m.s]or[N.s/m**2]\n",
"T1 = 20\t\t\t#Temperature of both the plates[degree Celcius]\n",
"t = 0.002\t\t\t#Thickness of oil film between the plates[m]\n",
"v = 12\t\t\t#Velocity with which plates move[m/s]\n",
"\n",
"# Calculations and Results\n",
"#Relation between velocity and temperature variation\n",
"print (\"T(y) = T0+(mu*(v**2)/(2*k))[(y/L)-((y/L)**2)]\")\n",
"#The location of maximum temperature is determined by setting dT/dy = 0 and solving for y\n",
"#(mu*(v**2)/(2*k*L))*(1-(2*y/L)) = 0\n",
"L = 1\t\t\t#Random initialisation of variable L, where L is length of plates\n",
"y = L/2.;\n",
"#T_max = T(L/2)\n",
"T_max = T1+((mu*(v**2)/(2*k))*(((L/2)/L)-(((L/2)**2)/(L**2))));\n",
"print \"Maximum temperature occurs at mid plane and its value is\",T_max,\"degree Celcius\"\n",
"\n",
"#heat flux q0 = -kdt/dy|y = 0; = -kmu*v**2/(2*k*L)\n",
"q0 = -(mu*k*(v**2)/(2*k*t))/1000\t\t\t#Heat flux from one plate [kW/m**2]\n",
"qL = -((k*mu*(v**2))*(1-2)/(2*k*t*1000))\t\t\t#Heat flux from another plate[kW/m**2]\n",
"print \"Heat fluxes at the two plates are equal in magnitude but opposite in sign and \\\n",
"the value of magnitude is\",qL,\"kW/m**2\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 6.2"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Friction Factor and average heat transfer coefficient are 0.00242954324587 and 12.7060334544 W/m**2.degree Celcius respectively\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Finding Convection Coefficient from Drag Measurement\n",
"\n",
"# Variables\n",
"#Properties of air\n",
"rho = 1.204\t\t\t#[kg/m**3]\n",
"Cp = 1007\t\t\t#[J/kg.K]\n",
"Pr = 0.7309\t\t\t#Prandtl number\n",
"w = 2\t\t\t#Width of plate[m]\n",
"L = 3\t\t\t#Characteristic length of plate[m]\n",
"v = 7\t\t\t#velocity of air[m/s]\n",
"Fd = 0.86\t\t\t#Total grag force[N]\n",
"\n",
"# Calculations\n",
"As = 2*w*L\t\t\t#Since both sides of plate are math.exposed to air flow[m**2]\n",
"#For flat plates drag force is equivalent to friction coefficient Cf\n",
"Cf = Fd/(rho*As*(v**2)/2);\n",
"h = (Cf*rho*v*Cp)/(2*(Pr**(2./3)))\t\t\t#[W/m**2.degree Celcius]\n",
"\n",
"# Results\n",
"print \"Friction Factor and average heat transfer coefficient are\",Cf,\"and\",h,\"W/m**2.degree Celcius\",\"respectively\"\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKjfIEPP7Heat And Mass Transfer - A Practical Approach/ch7.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 7 : External Forced Convection"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 7.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"We have laminar flow over the entire plate\n",
"(0.006630019984886925, 'The average friction coefficient is')\n",
"The drag force acting on the plate per unit width is 58.0789750676 N\n",
"Nusselt Number is 133.200201811\n",
"Convective heat transfer coefficient is 3.84682182831 W/m**.degree Celcius\n",
"Heat flow rate is 769.0 W\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Flow of hot oil over a Flat Plate\n",
"\n",
"# Variables\n",
"T_oil = 60\t\t\t#Temp of engine oil[degree Celcius]\n",
"T_plate = 20\t\t\t#Temp of flat plate[degree Celcius]\n",
"Rec = 5*10**5\t\t\t#Critical reynolds number for laminar flow\n",
"Tf = (T_oil+T_plate)/2\t\t\t#Film temperature[degree Celcius]\n",
"v = 2\t\t\t#[m/s]\n",
"#Properties of engine oil at film temperature\n",
"rho = 876\t\t\t#[kg/m**3]\n",
"Pr = 2962\t\t\t#Prandtl number\n",
"k = 0.1444\t\t\t#[W/m.degree Celcius]\n",
"nu = 2.485*10**(-4)\t\t\t#dynamic vismath.cosity[m**2/s]\n",
"L = 5\t\t\t#Length of plate[m]\n",
"\n",
"# Calculations and Results\n",
"ReL = (v*L)/nu;\n",
"if(ReLReC):\n",
" print (\"Flow is not laminar\")\n",
" #We have average Nusselt Number\n",
" Nu1 = ((0.037*(ReL1**(0.8)))-871)*(Pr**(1/3));\n",
" print \"Nusselt Number is\",Nu1\n",
" h1 = k*Nu1/L1\t\t\t#[W/m**2.degree Celcius]\n",
" As1 = w1*L1\t\t\t #Flow Area of plate[m**2]\n",
" Q1 = h1*As1*(T_plate-T_air);\n",
" print \"Heat Flow Rate is\",Q1,\"W\"\n",
"else:\n",
" print (\"Flow is laminar\")\n",
"\n",
"#Solution(b)\n",
"L2 = 1.5\t \t\t#Characteristic length of plate along flow of air[m]\n",
"ReL2 = v*L2/nu_ac\t\t\t#Reynolds Number\n",
"if(ReL2N??8Heat And Mass Transfer - A Practical Approach/ch10.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 10 : Boiling and Condensation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.1"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a) The rate of heat transfer during nucleate boiling becomes 5095.13655169 W\n",
"The rate of Evaporation of water is 0.00225748185719 kg/s\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Nucleate Boiling of Water in a Pan\n",
"Ts = 108.\t\t\t#Temp of surface of bottom of pan[degree Celcius]\n",
"Tsat = 100.\t\t\t#Saturation temp of water[degree Celcius]\n",
"D = 0.3 \t\t\t#Diameter[m]\n",
"#Properties of water at the saturation temp\n",
"rho_l = 957.9\t\t\t#Density of liquid[kg/m**3]\n",
"rho_v = 0.6\t\t\t#Density of vapour[kg/m**3]\n",
"Pr_l = 1.75\t\t\t#Prandtl no of liquid\n",
"mu_l = 0.282*10**(-3)\t\t\t#Vismath.cosity of liquid[kg/m.s]\n",
"Cp_l = 4217\t\t\t#Specific Heat of liquid[J/kg.degree Celcius]\n",
"h_fg = 2257*10**3\t\t\t#[J/kg]\n",
"sigma = 0.0589\t\t\t#[N/m]\n",
"g = 9.81\t\t\t#Acc due to gravity[m/s**2]\n",
"Csf = 0.0130\n",
"n = 1.0;\n",
"\n",
"# Calculations and Results\n",
"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)\t\t\t#[W/m**2]\n",
"A = math.pi*(D**2)/4\t\t\t#Surface Area of bottom of the pan[m**2]\n",
"Q_boiling = A*q_nuc \t\t\t#[W]\n",
"print \"(a) The rate of heat transfer during nucleate boiling becomes \",Q_boiling,\"W\"\n",
"#Solution(b):-\n",
"m = Q_boiling/h_fg\t\t\t#[kg/s]\n",
"print \"The rate of Evaporation of water is\",m,\"kg/s\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.2"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The maximum or critical heat flux is 1017411.21501 W/m**2\n",
"The surface temperature is 119.0 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Peak Heat Flux in Nucleate Boiling\n",
"\n",
"# Variables\n",
"D = 0.01\t\t\t#[m]\n",
"Tsat = 100\t\t\t#Saturation Temperature[degree Celcius]\n",
"sigma = 0.0589\t\t\t#[N/m]\n",
"#Properties of water at saturation temperature\n",
"rho_l = 957.9\t\t\t#[kg/m**3]\n",
"rho_v = 0.6\t\t\t#[kg/m**3]\n",
"h_fg = 2257*10**3\t\t\t#[J/kg]\n",
"mu_l = 0.282*10**(-3)\t\t\t#[kg/m.s]\n",
"Pr_l = 1.75\t\t\t#Prandtl number\n",
"Cp_l = 4217\t\t\t#[J/kg.degree Celcius]\n",
"Csf = 0.0130\n",
"n = 1.0;\n",
"g = 9.81\t\t\t#[m/s**2]\n",
"\n",
"# Calculations and Results\n",
"L_ = (D/2)*((g*(rho_l-rho_v)/sigma)**(1./2))\t\t\t#dimensionless Parameter\n",
"#For this value of L_ we have \n",
"C_cr = 0.12\t\t\t#Constant\n",
"q_max = C_cr*h_fg*((sigma*g*(rho_v**2)*(rho_l-rho_v))**(1./4))\t\t\t#[W/m**2]\n",
"print \"The maximum or critical heat flux is\",q_max,\"W/m**2\"\n",
"\n",
"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\t\t\t#[degree Celcius]\n",
"print \"The surface temperature is\",round(Ts),\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.3"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The film boiling heat flux is 63008.0039829 W/m**2)\n",
"The radiation heat flux is 372.19933107 W/m**2\n",
"The total heat flux is 63287.1534812 W/m**2\n",
"The rate of heat transfer from the heating element to the water is 994.112282215 W\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Film Boiling of Water on a Heating Element\n",
"\n",
"# Variables\n",
"D = 0.005\t\t\t#[m]\n",
"e = 0.05\t\t\t#Emissivity\n",
"Ts = 350\t\t\t#Surface temperature[degree Celcius]\n",
"Tsat = 100\t\t\t#[degree Celcius]\n",
"Tf = (Ts+Tsat)/2\t\t\t#[degree Celcius]\n",
"g = 9.81\t\t\t#[m/s**2]\n",
"#Properties of water at Tsat\n",
"rho_l = 957.9\t\t\t#[kg/m**3]\n",
"h_fg = 2257*10**3\t\t\t#[J/kg]\n",
"#Properties of vapor at film temp\n",
"rho_v = 0.444\t\t\t#[kg/m**3]\n",
"Cp_v = 1951\t\t\t#[J/kg.degree Celcius]\n",
"mu_v = 1.75*10**(-5)\t\t\t#[kg/m.s]\n",
"k_v = 0.0388\t\t\t#[W/m.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"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)\t\t\t#[W/m**2]\n",
"print \"The film boiling heat flux is\",q_film,\"W/m**2)\"\n",
"\n",
"q_rad = e*(5.67*10**(-8))*(((Ts+273)**4)-((Tsat+273)**4))\t\t\t#[W/m**2]\n",
"print \"The radiation heat flux is\",q_rad,\"W/m**2\"\n",
"\n",
"q_total = q_film+(3./4)*q_rad\t\t\t#[W/m**2]\n",
"print \"The total heat flux is\",q_total,\"W/m**2\"\n",
"\n",
"Q_total = (math.pi*D*1)*q_total\t\t\t#[W]\n",
"print \"The rate of heat transfer from the heating element to the water is\",Q_total,\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.4"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The modified latent heat of vapourization is 2314201.6 J/kg\n",
"For wavy laminar flow Reynolds number is 1287.24272174\n",
"The conensation heat transfer coefficient is 5850.17651749 W/m**2.degree Celcius\n",
"The rate of heat transfer during condensation process is 702021.182099 W\n",
"The rate of condensation of steam is 0.303353511682 kg/s\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Condensation of steam on a Vertical Plate\n",
"\n",
"# Variables\n",
"Tsat = 100\n",
"Ts = 80\t\t\t#[degree Celcius]\n",
"Tf = (Ts+Tsat)/2\t\t\t#[degree Celcius]\n",
"L = 2\n",
"w = 3\t\t\t#Dimensions of Plate[m]\n",
"g = 9.81\t\t\t#[m/s**2]\n",
"#Properties of water at Tsat\n",
"h_fg = 2257*10**3\t\t\t#[J/kg]\n",
"rho_v = 0.60\t\t\t#[kg/m**3]\n",
"#Properties of liquid water at Tf\n",
"rho_l = 965.3\t\t\t#[kg/m**3]\n",
"mu_l = 0.315*10**(-3)\t\t\t#[kg/m.s\n",
"Cp_l = 4206\t\t\t#[J/kg.degree Celcius]\n",
"k_l = 0.675\t\t\t#[W/m.degree Celcius]\n",
"nu_l = 0.326*10**(-6)\t\t\t#[m**2/s]\n",
"\n",
"# Calculations and Results\n",
"h_fg_m = h_fg+0.68*Cp_l*(Tsat-Ts)\t\t\t#[J/kg]\n",
"print \"The modified latent heat of vapourization is\",h_fg_m,\"J/kg\"\n",
"\n",
"Re = ((4.81+((3.70*L*k_l*(Tsat-Ts)*((g/nu_l**2)**(1./3)))/(mu_l*h_fg_m)))**(0.820));\n",
"print \"For wavy laminar flow Reynolds number is\",Re\n",
"\n",
"h = (Re*k_l*((g/nu_l**2)**(1./3)))/((1.08*(Re**(1.22)))-5.2)\t\t\t#[W/m**2.degree Celcius]\n",
"print \"The conensation heat transfer coefficient is\",h,\"W/m**2.degree Celcius\"\n",
"\n",
"As = w*L\t\t\t #[m**2]\n",
"Q = h*As*(Tsat-Ts)\t\t\t#[W]\n",
"print \"The rate of heat transfer during condensation process is\",Q,\"W\"\n",
"\n",
"#Solution (b)\n",
"m = Q/h_fg_m\t\t\t#[kg/s]\n",
"print \"The rate of condensation of steam is\",m,\"kg/s\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.5"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The modified latent heat of vapourization is 2314201.6 J/kg\n",
"For wavy laminar flow Reynolds number is 1287.24272174\n",
"The conensation heat transfer coefficient is 5643.54026792 W/m**2.degree Celcius\n",
"The rate of heat transfer during condensation process is 677224.83215 W\n",
"The rate of condensation of steam is 0.292638650043 kg/s\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Condensation of steam on a Vertical Tilted Plate\n",
"\n",
"# Variables\n",
"Tsat = 100\n",
"Ts = 80\t\t\t#[degree Celcius]\n",
"Tf = (Ts+Tsat)/2\t\t\t#[degree Celcius]\n",
"L = 2\n",
"w = 3\t\t\t#Dimensions of Plate[m]\n",
"g = 9.81\t\t\t#[m/s**2]\n",
"#Properties of water at Tsat\n",
"h_fg = 2257*10**3\t\t\t#[J/kg]\n",
"rho_v = 0.60\t\t\t#[kg/m**3]\n",
"#Properties of liquid water at Tf\n",
"rho_l = 965.3\t\t\t#[kg/m**3]\n",
"mu_l = 0.315*10**(-3)\t\t\t#[kg/m.s\n",
"Cp_l = 4206\t\t\t#[J/kg.degree Celcius]\n",
"k_l = 0.675\t\t\t#[W/m.degree Celcius]\n",
"nu_l = 0.326*10**(-6)\t\t\t#[m**2/s]\n",
"theta = (math.pi/6)\t\t\t#Angle at which plate is tilted[radians]\n",
"\n",
"# Calculations and Results\n",
"h_fg_m = h_fg+0.68*Cp_l*(Tsat-Ts)\t\t\t#[J/kg]\n",
"print \"The modified latent heat of vapourization is\",h_fg_m,\"J/kg\"\n",
"\n",
"Re = ((4.81+((3.70*L*k_l*(Tsat-Ts)*((g/nu_l**2)**(1./3)))/(mu_l*h_fg_m)))**(0.820));\n",
"print \"For wavy laminar flow Reynolds number is\",Re\n",
"\n",
"h = ((Re*k_l*((g/nu_l**2)**(1./3)))/((1.08*(Re**(1.22)))-5.2))*((math.cos(theta))**(1./4))\t\t\t#[W/m**2.degree Celcius]\n",
"print \"The conensation heat transfer coefficient is\",h,\"W/m**2.degree Celcius\"\n",
"\n",
"As = w*L\t\t\t #[m**2]\n",
"Q = h*As*(Tsat-Ts)\t\t\t#[W]\n",
"print \"The rate of heat transfer during condensation process is\",Q,\"W\"\n",
"\n",
"#Solution (b)\n",
"m = Q/h_fg_m\t\t\t#[kg/s]\n",
"print \"The rate of condensation of steam is\",m,\"kg/s\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.6"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a) The modified latent heat of vapourisation is 2435410.4 J/kg\n",
"The heat transfer coefficient for condensation on a single horizontal tube is 9294.6621572 W/m**2.degree Celcius\n",
"The rate of heat transfer during condensation Process is 8760.0127052 W\n",
"(b) The rate of condensation of steam is 0.00359693491709 kg/s\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Condensation of Steam on horizontal Tubes\n",
"\n",
"# Variables\n",
"Tsat = 40 \t\t \t#[degree Celcius]\n",
"D = 0.03\t \t\t #[m]\n",
"Ts = 30 \t\t \t#Outer Surface temperature of tube[degree Celcius]\n",
"Tf = (Ts+Tsat)/2\t\t\t#Film Temperature[degree Celcius]\n",
"g = 9.81\t\t\t #[m/s**2]\n",
"#Properties of water at the saturation temp\n",
"h_fg = 2407*10**3\t\t\t#[J/kg]\n",
"rho_v = 0.05\t \t\t#[kg/m**3]\n",
"#Properties of liquid water at the film temperature\n",
"rho_l = 994 \t \t\t#[kg/m**3]\n",
"Cp_l = 4178\t \t \t#[J/kg.degree Celcius]\n",
"mu_l = 0.720*10**(-3)\t\t#[kg/m.s]\n",
"k_l = 0.623\t\t\t #[W/m.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"h_fg_m = h_fg+0.68*Cp_l*(Tsat-Ts)\t\t\t#[J/kg]\n",
"print \"(a) The modified latent heat of vapourisation is\",h_fg_m,\"J/kg\"\n",
"\n",
"h_hori = 0.729*(((g*(rho_l**2)*h_fg_m*(k_l**3))/(mu_l*D*(Tsat-Ts)))**(1./4))\t\t\t#[W/m**2.degree Celcius]\n",
"print \"The heat transfer coefficient for condensation on a single horizontal tube is\",h_hori,\"W/m**2.degree Celcius\"\n",
"\n",
"As = math.pi*D*1\t\t\t#[m**2]\n",
"Q = h_hori*As*(Tsat-Ts)\t\t\t#[W]\n",
"print \"The rate of heat transfer during condensation Process is\",Q,\"W\"\n",
"\n",
"#Solution (b)\n",
"m = Q/h_fg_m\t\t\t#[kg/s]\n",
"print \"(b) The rate of condensation of steam is\",m,\"kg/s\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.7"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a) The modified latent heat of vapourisation is 2435410.4 J/kg\n",
"The heat transfer coefficient for condensation 12 horizontal tube is 7062.41599312 W/m**2.degree Celcius\n",
"The rate of heat transfer during condensation Process is 79874.0431221 W\n",
"(b) The rate of condensation of steam is 0.0327969541076 kg/s\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Condensation of Steam on horizontal Tube Banks\n",
"\n",
"# Variables\n",
"Tsat = 40\t \t\t#[degree Celcius]\n",
"D = 0.03\t\t \t#[m]\n",
"Ts = 30\t\t\t #Outer Surface temperature of tube[degree Celcius]\n",
"Tf = (Ts+Tsat)/2\t\t\t#Film Temperature[degree Celcius]\n",
"g = 9.81\t\t \t#[m/s**2]\n",
"N = 3\t\t\t #No of tubes in a vertical tier\n",
"N_total = 12\t\t\t#Total number of tubes\n",
"#Properties of water at the saturation temp\n",
"h_fg = 2407*10**3\t\t\t#[J/kg]\n",
"rho_v = 0.05\t\t\t#[kg/m**3]\n",
"#Properties of liquid water at the film temperature\n",
"rho_l = 994\t\t\t#[kg/m**3]\n",
"Cp_l = 4178\t\t\t#[J/kg.degree Celcius]\n",
"mu_l = 0.720*10**(-3)\t\t\t#[kg/m.s]\n",
"k_l = 0.623\t\t\t#[W/m.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"h_fg_m = h_fg+0.68*Cp_l*(Tsat-Ts)\t\t\t#[J/kg]\n",
"print \"(a) The modified latent heat of vapourisation is\",h_fg_m,\"J/kg\"\n",
"\n",
"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)))\t\t\t#[W/m**2.degree Celcius]\n",
"print \"The heat transfer coefficient for condensation 12 horizontal tube is\",h_hori_N,\"W/m**2.degree Celcius\"\n",
"\n",
"As = math.pi*D*1*N_total\t\t\t#[m**2]\n",
"Q = h_hori_N*As*(Tsat-Ts)\t\t\t#[W]\n",
"print \"The rate of heat transfer during condensation Process is\",Q,\"W\"\n",
"\n",
"#Solution (b)\n",
"m = Q/h_fg_m\t\t\t#[kg/s]\n",
"print \"(b) The rate of condensation of steam is\",m,\"kg/s\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.8"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The diameter of the copper pipe is 23.9066721377 cm\n",
"Mass of the copper rod is 120.0 kg\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Replacing a Heat Pipe by a Copper Rod\n",
"\n",
"# Variables\n",
"L = 0.3\t\t\t#[m]\n",
"D = 0.006\t\t\t#[m]\n",
"Q = 180.\t\t\t#[W]\n",
"del_T = 3.\t\t\t#Temperature Difference [degree Celcius]\n",
"#Properties of copper at room temperature\n",
"rho = 8933.\t\t\t#[kg/m**3]\n",
"k = 401.\t\t\t#[W/m.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"A = Q*L/(k*del_T)\t\t\t#[m**2]\n",
"d = math.sqrt(4*A/math.pi)\t\t\t#[m]\n",
"print \"The diameter of the copper pipe is\",100*d,\"cm\"\n",
"m = rho*A*L\t\t\t#[kg]\n",
"print \"Mass of the copper rod is\",round(m),\"kg\"\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKjfID4N4N8Heat And Mass Transfer - A Practical Approach/ch11.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 11 : Heat Exchangers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 11.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The average velocity of water in the tube is 1.60746331776 m/s\n",
"The Reynolds number for flow of water in the tube is 53404.0969357\n",
"The nusselt no for turbulent water flow 240.247125093\n",
"The average velocity for flow of oil is 2.39106017791 m/s\n",
"The Reynolds number for flow of oil is 630.221449106\n",
"The overall heat transfer Coefficient for the given heat exchanger is 74.4779584764 W/m**2.degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Overall Heat Transfer Coefficient of a Heat Exchanger\n",
"\n",
"# Variables\n",
"D_in = 0.02 \t\t\t#Diameter of inner tubes[m]\n",
"Di_out = 0.03\t\t\t#Inner Diameter of Outer tubes[m]\n",
"mw = 0.5\t \t\t#Mass Flow Rate of water[kg/s]\n",
"mo = 0.8\t\t \t#Mass Flow rate of oil[kg/s]\n",
"Tw = 45\t \t\t #Average Temp of water[degree Celcius]\n",
"To = 80\t\t \t#Average Temp of oil [degree Celcius]\n",
"#Properties of water at Tw\n",
"rho_w = 990.1\t\t\t#[kg/m**3]\n",
"Pr_w = 3.91\t\t\t#Prandtl Number\n",
"k_w = 0.637\t\t\t#[W/m.degree Celcius]\n",
"nu_w = 0.602*10**(-6)\t\t\t#[m**2/s]\n",
"#Properties of oil at To\n",
"rho_o = 852\t\t\t#[kg/m**3]\n",
"Pr_o = 499.3\t\t\t#Prandtl Number\n",
"k_o = 0.138\t\t\t#[W/m.degree Celcius]\n",
"nu_o = 3.794*10**(-5)\t\t\t#[m**2/s]\n",
"\n",
"# Calculations and Results\n",
"Vw = mw/(rho_w*(math.pi*(D_in**2)/4))\t\t\t#[m/s]\n",
"print \"The average velocity of water in the tube is\",Vw,\"m/s\"\n",
"\n",
"Re_w = Vw*D_in/nu_w;\n",
"print \"The Reynolds number for flow of water in the tube is\",Re_w\n",
"\n",
"Nu_w = 0.023*(Re_w**(0.8))*(Pr_w**(0.4));\n",
"print \"The nusselt no for turbulent water flow\",Nu_w\n",
"\n",
"hi = k_w*Nu_w/D_in\t\t\t#[W/m**2.degree Celcius]\n",
"#For oil flow\n",
"Dh = Di_out-D_in\t\t\t#Hydraulic Diameter for the annular space[m]\n",
"Vo = mo/(rho_o*(math.pi*((Di_out**2)-(D_in**2))/4))\t\t\t#[m/s]\n",
"print \"The average velocity for flow of oil is\",Vo,\"m/s\"\n",
"\n",
"Re_o = Vo*Dh/nu_o;\n",
"print \"The Reynolds number for flow of oil is\",Re_o\n",
"\n",
"Nu_o = 5.45\t \t\t#Nusselt number for flow of oil usign the table 11.3 and interpolating for value corresponding to Di_out/D_in\n",
"ho = Nu_o*k_o/Dh\t\t \t#[W/m**2.degree Celcius]\n",
"U = (1/((1/hi)+(1/ho)))\t\t\t#[W/m**2.degree Celcius]\n",
"print \"The overall heat transfer Coefficient for the given heat exchanger is\",U,\"W/m**2.degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 11.2"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The thermal Resistance for an unfinned shell and tube heat exchanger with fouling on both heat transfer surfaces is 0.0531419150758 m**2.degree Celcius/W\n",
"The overall Heat transfer Coefficients based on the inner and outer surfaces of the tube are 399.320556074 and 315.253070585 W/m**2.degree Celcius respectively\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Effect of Fouling on the Overall Heat Transfer Coefficient\n",
"\n",
"# Variables\n",
"k = 15.1\t\t\t#[W/m**2.degree Celcius]\n",
"Di = 0.015\t\t\t#Inner Diameter[m]\n",
"Do = 0.019\t\t\t#Outer Diameter[m]\n",
"Di_s = 0.032\t\t\t#Inner diameter of outer shell[m]\n",
"L = 1\t\t\t#[m]\n",
"hi = 800\t\t\t#W/m**2.degree Celcius\n",
"ho = 1200\t\t\t#[W/m**2.degree Celcius]\n",
"Rfi = 0.0004\t\t\t#[m**2.degree Celcius/W]\n",
"Rfo = 0.0001\t\t\t#[m**2.degree Celcius/W]\n",
"\n",
"# Calculations and Results\n",
"Ai = math.pi*Di*L\t\t\t#[m**2]\n",
"Ao = math.pi*Do*L\t\t\t#[m**2]\n",
"Ra = (1/(hi*Ai))+(Rfi/Ai)+((math.log(Do/Di))/(2*math.pi*k*L))+(Rfo/Ao)+(1/(ho*Ao))\t\t\t#[m**2.degree Celcius/W]\n",
"print \"The thermal Resistance for an unfinned shell and tube heat exchanger with\\\n",
" fouling on both heat transfer surfaces is\",Ra,\"m**2.degree Celcius/W\"\n",
" \n",
"#Solution (b):-\n",
"Ui = 1/(Ra*Ai)\t\t\t#[W/m**2.degree Celcius]\n",
"Uo = 1/(Ra*Ao)\t\t\t#[W/m**2.degree Celcius]\n",
"print \"The overall Heat transfer Coefficients based on the inner and outer surfaces of the tube are\" \\\n",
",Ui,\"and\",Uo,\"W/m**2.degree Celcius\",\"respectively\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 11.3"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The logrithmic Mean temperature difference is 11.5415603271 degree Celcius\n",
"The heat transfer rate in the condenser is 1090677.45091 W\n",
"The mass flow rate of the cooling water is 32.5847708805 kg/s\n",
"The rate of condensation of steam is 0.448653825961 kg/s\n"
]
}
],
"source": [
"\n",
"import math \n",
"# The Condensation of Steam in a Condenser\n",
"\n",
"# Variables\n",
"Th_in = 30.\n",
"Th_out = 30.\n",
"Tc_in = 14.\n",
"Tc_out = 22.\t\t\t#Inlet and Outlet temperatures of hot and cold liquids [degree Celcius]\n",
"A = 45.\t\t\t #[m**2]\n",
"U = 2100.\t\t\t#[W/m**2.degree Celcius]\n",
"h_fg = 2431.\t\t\t#Heat of vapourisation of water at Th_i[kJ/kg]\n",
"Cp = 4184.\t\t\t#Specific heat of cold water [J/kg]\n",
"\n",
"# Calculations and Results\n",
"del_T1 = Th_in-Tc_out\t\t\t#[degree Celcius]\n",
"del_T2 = Th_out-Tc_in\t\t\t#[degree Celcius]\n",
"del_T_lm = (del_T1-del_T2)/(math.log(del_T1/del_T2))\t\t\t#[degree Celcius]\n",
"print \"The logrithmic Mean temperature difference is\",del_T_lm,\"degree Celcius\"\n",
"\n",
"Q = U*A*del_T_lm\t\t\t#[W]\n",
"print \"The heat transfer rate in the condenser is\",Q,\"W\"\n",
"\n",
"mw = Q/(Cp*(Tc_out-Tc_in))\t\t\t#[kg/s]\n",
"print \"The mass flow rate of the cooling water is\",mw,\"kg/s\"\n",
"\n",
"ms = (Q/(1000*h_fg))\t\t\t#[kg/s]\n",
"print \"The rate of condensation of steam is\",ms,\"kg/s\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 11.4"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The rate of heat transfer in the heat exchanger is 300.96 kW\n",
"The outlet temp of geothermal fluid is 125.081206497 degree Celcius\n",
"The logrithmic Mean temperature difference is 91.9713238312 degree Celcius\n",
"The surface area of the heat exchanger is 5.11368631448 m**2\n",
"The length of the tube is 109.0 m\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heating Water in a Counter Flow Heat Exchanger\n",
"\n",
"# Variables\n",
"mw = 1.2\n",
"mgw = 2\t\t\t#Mass Flow rate of water and geothermal fluid[kg/s]\n",
"U = 640\t\t\t#Overall Heat transfer Coefficient[W/m**2.degree Celcius]\n",
"Di = 0.015\t\t\t#[m]\n",
"Tw_out = 80\n",
"Tw_in = 20\t\t\t#Outlet and Inlet temp of water[degree Celcius]\n",
"Tgw_in = 160\t\t\t#Inlet temp of geothermal fluid[degree Celcius]\n",
"Cp_w = 4.18\n",
"Cp_gw = 4.31\t\t\t#Specific Heats of water and geothermal fluid[kJ/kg.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"Q = mw*Cp_w*(Tw_out-Tw_in)\t\t\t#[kW]\n",
"print \"The rate of heat transfer in the heat exchanger is\",Q,\"kW\"\n",
"\n",
"Tgw_out = (Tgw_in-(math.ceil(Q)/(mgw*Cp_gw)))\t\t\t#[degree Celcius]\n",
"print \"The outlet temp of geothermal fluid is\",Tgw_out,\"degree Celcius\"\n",
"\n",
"del_T1 = Tgw_in-Tw_out\t\t\t#[degree Celcius]\n",
"del_T2 = Tgw_out-Tw_in\t\t\t#[degree Celcius]\n",
"del_T_lm = (del_T1-del_T2)/(math.log(del_T1/del_T2))\t\t\t#[degree Celcius]\n",
"print \"The logrithmic Mean temperature difference is\",del_T_lm,\"degree Celcius\"\n",
"\n",
"As = 1000*math.ceil(Q)/(U*del_T_lm)\t\t\t#[m**2]\n",
"print \"The surface area of the heat exchanger is\",As,\"m**2\"\n",
"\n",
"L = As/(math.pi*Di)\t\t\t#[m]\n",
"print \"The length of the tube is\",round(L),\"m\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 11.5"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The log mean temperature difference for the counter flow arrangement is 24.6630346238 degree Celcius\n",
"In case of no fouling, the over all heat transfer coefficient is 21.6216216216 W/m**2.degree Celcius\n",
"And the rate of heat transfer is 1829.39415267 W\n",
"When there is fouling on one of the surfaces, the overall heat transfer coefficient is 21.3447171825 W/m**2.degree Celcius\n",
"And the rate of heat transfer is 1806.0 W\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Heating of Glycerine in a Multipass Heat Exchanger\n",
"\n",
"# Variables\n",
"#A 2,4 shell and tube heat exchanger\n",
"D = 0.02\t \t\t#Diameter[m]\n",
"L = 60.\t\t \t#Length of tube[m]\n",
"Th_in = 80.\n",
"Th_out = 40.\n",
"Tc_in = 20.\n",
"Tc_out = 50.\t\t\t#Inlet and Outlet temperatures water and glycerine[degree Celcius]\n",
"hi = 160.\n",
"ho = 25. \t\t\t#Convective Heat transfer coefficients on both side of tube[W/m**2.degree Celcius]\n",
"Rf = 0.0006\t\t\t#Fouling Resismath.tance[m**2.degree Celcius/W]\n",
"\n",
"# Calculations and Results\n",
"As = math.pi*D*L \t\t\t#[m**2]\n",
"del_T1 = Th_in-Tc_out\t\t\t#[degree Celcius]\n",
"del_T2 = Th_out-Tc_in\t\t\t#[degree Celcius]\n",
"del_T_lm = (del_T1-del_T2)/math.log(del_T1/del_T2)\t\t\t#[degree Celcius]\n",
"print \"The log mean temperature difference for the counter flow arrangement is\",del_T_lm,\"degree Celcius\"\n",
"F = 0.91\t\t\t#Correction Factor\n",
"#(a)\n",
"Ua = 1/((1/hi)+(1/ho))\t\t\t#[W/m**2.degree Celcius]\n",
"print \"In case of no fouling, the over all heat transfer coefficient is\",Ua,\"W/m**2.degree Celcius\"\n",
"\n",
"Qa = Ua*As*F*del_T_lm\t\t\t#[W]\n",
"print \"And the rate of heat transfer is\",Qa,\"W\"\n",
"\n",
"#(b)\n",
"Ub = 1/((1/hi)+(1/ho)+(Rf))\t\t\t#[W/m**2.degree Celcius\n",
"print \"When there is fouling on one of the surfaces, the overall heat transfer coefficient is\",Ub,\"W/m**2.degree Celcius\"\n",
"\n",
"Qb = Ub*As*F*del_T_lm \t\t\t#[W]\n",
"print \"And the rate of heat transfer is\",round(Qb),\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 11.6"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The rate of heat transfer in the radiator from the hot water to the air is 62925.0 W\n",
"The log mean temperature difference for the counter flow arrangement is 47.4561079051 degree Celcius\n",
"the overall heat transfer coefficient is 3347.0 W/m**2.degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Cooling of Water in an Automotive Radiator\n",
"\n",
"# Variables\n",
"m = 0.6\t\t\t#Mass Flow rate of water[kg/s]\n",
"Th_in = 90.\n",
"Th_out = 65.\n",
"Tc_in = 20.\n",
"Tc_out = 40.\t\t\t#[degree Celcius]\n",
"Di = 0.005\t\t\t#[m]\n",
"L = 0.65\t\t\t#[m]\n",
"n = 40.\t \t\t#No of tubes\n",
"Cp = 4195.\t\t\t#[J/kg.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"Q = m*Cp*(Th_in-Th_out)\t\t\t#[W]\n",
"print \"The rate of heat transfer in the radiator from the hot water to the air is\",Q,\"W\"\n",
"\n",
"Ai = n*math.pi*Di*L\t\t \t#[m**2]\n",
"del_T1 = Th_in-Tc_out\t\t\t#[degree Celcius]\n",
"del_T2 = Th_out-Tc_in\t\t\t#[degree Celcius]\n",
"del_T_lm = (del_T1-del_T2)/math.log(del_T1/del_T2)\t\t\t#[degree Celcius]\n",
"print \"The log mean temperature difference for the counter flow arrangement is\",del_T_lm,\"degree Celcius\"\n",
"\n",
"F = 0.97\t \t\t#Correction Factor for this situation\n",
"Ui = Q/(Ai*F*del_T_lm)\t\t\t#[W/m**2.degree Celcius]\n",
"print \"the overall heat transfer coefficient is\",round(Ui),\"W/m**2.degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 11.8"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The maximum heat transfer rate is 702.24 kW\n",
"The effectiveness of the heat exchanger is 0.428571428571\n",
"The NTU of this counter flow heat exchanger is 0.652362199516\n",
"The heat transfer surface area is 5.11288873871 m**2\n",
"The length of the tube is 108.0 m\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Using the Effectiveness- NTU Method\n",
"\n",
"# Variables\n",
"mc = 1.2\n",
"mh = 2 \t \t\t#Mass Flow rate of water and geothermal fluid[kg/s]\n",
"U = 640\t \t \t#Overall Heat transfer Coefficient[W/m**2.degree Celcius]\n",
"Di = 0.015\t\t\t #[m]\n",
"Tc_out = 80\n",
"Tc_in = 20\t \t\t#Outlet and Inlet temp of water[degree Celcius]\n",
"Th_in = 160\t\t \t#Inlet temp of geothermal fluid[degree Celcius]\n",
"Cp_c = 4.18\n",
"Cp_h = 4.31\t\t\t #Specific Heats of water and geothermal fluid[kJ/kg.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"Ch = mh*Cp_h\t\t\t#[kW/degree Celcius]\n",
"Cc = mc*Cp_c\t\t\t#[kW/degree Celcius]\n",
"if(Ch>Cc):\n",
" Cmin = Cc;\n",
" c = Cmin/Ch;\n",
"else:\n",
" Cmin = Ch;\n",
" c = Cmin/Cc;\n",
"\n",
"Q_max = Cmin*(Th_in-Tc_in)\t\t\t#[kW]\n",
"print \"The maximum heat transfer rate is\",Q_max,\"kW\"\n",
"\n",
"Q_ac = mc*Cp_c*(Tc_out-Tc_in)\t\t\t#[kW]\n",
"e = Q_ac/Q_max;\n",
"print \"The effectiveness of the heat exchanger is\",e\n",
"\n",
"NTU = (1/(c-1))*math.log((e-1)/(e*c-1));\n",
"print \"The NTU of this counter flow heat exchanger is\",NTU\n",
"\n",
"As = NTU*Cmin*1000/U\t\t\t#[m**2]\n",
"print \"The heat transfer surface area is\",As,\"m**2\"\n",
"\n",
"L = As/(math.pi*Di)\t\t\t#[m]\n",
"print \"The length of the tube is\",round(L),\"m\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 11.9"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The maximum heat transfer rate is 83.07 kW\n",
"Heat transfer Surface Area is 1.75929188601 m**2\n",
"The NTU of this heat exchanger is 853.490586327\n",
"The temperature of cooling water will rise fromdegree Celcius 20 degree Celcius to 66.7020334928\n",
"as it cools the hot oil from 150 degree Celcius to 88.9 degree Celcius\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Cooling Hot Oil by Water in Multipass Heat Exchanger\n",
"\n",
"# Variables\n",
"Cp_c = 4.18\n",
"Cp_h = 2.13\t\t\t#Specific Heats of water and oil[kJ/kg]\n",
"mc = 0.2\n",
"mh = 0.3\t\t\t#Mass Flow rate of oil and water [kg/s]\n",
"Th_in = 150\n",
"Tc_in = 20\t\t\t#[degree Celcius]\n",
"n = 8 \t\t\t#No of tubes\n",
"D = 0.014\t\t\t#[m]\n",
"L = 5\t \t\t#[m]\n",
"U = 310\t\t \t#Overall Heat transfer Coefficient[W/m**2.degree Celcius]\n",
"\n",
"# Calculations and Results\n",
"Ch = mh*Cp_h\t\t\t#[kW/degree Celcius]\n",
"Cc = mc*Cp_c\t\t\t#[kW/degree Celcius]\n",
"if(Ch>Cc):\n",
" Cmin = Cc;\n",
" c = Cmin/Ch;\n",
"else:\n",
" Cmin = Ch;\n",
" c = Cmin/Cc;\n",
"\n",
"Q_max = Cmin*(Th_in-Tc_in)\t\t\t#[kW]\n",
"print \"The maximum heat transfer rate is\",Q_max,\"kW\"\n",
"\n",
"As = n*math.pi*D*L\t\t\t#[m**2]\n",
"print \"Heat transfer Surface Area is\",As,\"m**2\"\n",
"\n",
"NTU = U*As/Cmin;\n",
"print \"The NTU of this heat exchanger is\",NTU\n",
"\n",
"e = 0.47\t\t\t#Determined from fig 11.26(c)umath.sing value of NTU and c\n",
"Q = e*Q_max\t\t\t#[kW]\n",
"Tc_out = Tc_in+(Q/Cc)\t\t\t#[degree Celcius]\n",
"Th_out = Th_in-(Q/Ch)\t\t\t#[degree Celcius]\n",
"print \"The temperature of cooling water will rise from\"\"degree Celcius\",Tc_in,\"degree Celcius\",\"to\",Tc_out\n",
"print \"as it cools the hot oil from\",Th_in,\"degree Celcius\",\"to\",Th_out,\"degree Celcius\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 11.10"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Maximun Heat recover is 67.925 kJ/kg.degree Celcius\n",
"The energy saved during an entire year will be 1606562100.0 kJ/year\n",
"Fuel savings will be 19035.0959716 therms/year\n",
"The amount of money saved is $ 20938.6055687 per year\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Installing a Heat Exchanger to Save Energy and Money\n",
"\n",
"# Variables\n",
"Cp = 4.18\t \t\t#[kJ/kg.degree Celcius]\n",
"Th_in = 80\n",
"Tc_in = 15\t\t \t#Inlet temperatures of hot and cold water[degree Celcius]\n",
"m = 15./60\t\t\t #[kg/s]\n",
"e = 0.75\t\t\t #Effectiveness\n",
"t = 24. * 365\t\t\t#Operating Hours[hours/year]\n",
"neta = 0.8\t \t\t#Eficiency\n",
"cost = 1.10 \t\t#[$/therm]\n",
"\n",
"# Calculations and Results\n",
"Q_max = m*Cp*(Th_in-Tc_in)\t\t\t#[kJ/kg.degree Celcius]\n",
"print \"Maximun Heat recover is\",Q_max,\"kJ/kg.degree Celcius\"\n",
"\n",
"Q = e*Q_max\t\t\t #[kJ/s]\n",
"E_saved = Q*t*3600\t\t\t#[kJ/year]\n",
"print \"The energy saved during an entire year will be\",E_saved,\"kJ/year\"\n",
"\n",
"F_saved = (E_saved/neta)*(1./105500)\t\t\t#[therms]\n",
"print \"Fuel savings will be\",F_saved,\"therms/year\"\n",
"\n",
"M_saved = F_saved*cost\t\t\t#[$/year]\n",
"print \"The amount of money saved is $\",M_saved,\"per year\"\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKjfI˕+W+W+8Heat And Mass Transfer - A Practical Approach/ch12.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 12 : Fundamentals of Thermal Radiation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 12.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The ball emits 23.22432 kJ of energy in the form of energy in the form of electromagnetic radiation per second per m**2\n",
"The total Surface area of the ball is 0.125663706144 m**2\n",
"The total amount of radiation energy emitted from the entire ball is 875.536237159 kJ\n",
"The spectral blackbody emissive power 3846.0 W/m**2.micrometer\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Radiation Emission from a Black Ball\n",
"\n",
"# Variables\n",
"T = 800 \t\t \t#Temperature of suspended ball[K]\n",
"D = 0.2\t\t \t#Diameter[m]\n",
"C1 = 3.74177*10**8\t\t\t#[(micrometer**4)/m**2]\n",
"C2 = 1.43878*10**4\t\t\t#[micrometer.K]\n",
"lambda_ = 3\t\t \t#[micrometer]\n",
"\n",
"# Calculations and Results\n",
"Eb = (5.67*10**(-8))*(T**4)\t\t\t#[W/m**2]\n",
"print \"The ball emits\",Eb/1000,\"kJ\",\"of energy in the form of energy in the form of electromagnetic radiation per second per m**2\"\n",
"\n",
"As = math.pi*(D**2)\t\t\t#[m**2]\n",
"print \"The total Surface area of the ball is\",As,\"m**2\"\n",
"\n",
"del_t = 5*60. \t\t\t#[seconds]\n",
"Q_rad = Eb*As*del_t\t\t\t#[J]\n",
"print \"The total amount of radiation energy emitted from the entire ball is\",Q_rad/1000,\"kJ\"\n",
"\n",
"#Solution (c)\n",
"Eb_lambda = C1/((lambda_**5)*((math.exp(C2/(lambda_*T)))-1))\t\t\t#[W/m**2.micrometer]\n",
"print \"The spectral blackbody emissive power\",round(Eb_lambda),\"W/m**2.micrometer\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 12.2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Fraction of radiation emitted between the two given wavelengths is 0.052714\n",
"The wavelength at which the emission of radiation from the filament peaks is 1.15912 micron\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Emission of Radiation from a Lightbulb\n",
"\n",
"# Variables\n",
"T = 2500 \t\t\t#Temp of the filament[K]\n",
"lambda1 = 0.4\n",
"lambda2 = 0.76\t\t\t#Visible ranfe[micrometer]\n",
"f1 = 0.000321\n",
"f2 = 0.053035\t\t\t#The black body radiation functions corresponding to lamda1*T and lambda2*T\n",
"\n",
"# Calculations and Results\n",
"f3 = f2-f1;\n",
"print \"Fraction of radiation emitted between the two given wavelengths is\",f3\n",
"lambda_max = 2897.8/T\t\t\t#[micrometer]\n",
"print \"The wavelength at which the emission of radiation from the filament peaks is\",lambda_max,\"micron\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 12.3"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The solid angle subtended by a2 when viewed from A1 is 0.000680928393884 sr\n",
"The Intensity of radiation emitted by A1 is 2339.04290284 W/m**2.sr\n",
"The rate of radiation energy emitted by A1 in the direction of 0.959931088597 radians through the solid angle 0.000680928393884 Steradian is 0.913647447646 W\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Radiation Incident on a small surface\n",
"\n",
"# Variables\n",
"A1 = 3**10.**(-4)\t\t\t#[m**2]\n",
"T1 = 600.\t\t\t #[k]\n",
"A2 = 5*10.**(-4)\t\t\t#[m**2]\n",
"theta1 = math.pi*55./180\n",
"theta2 = math.pi*40./180\t\t\t#[Radian]\n",
"r = 0.75\t\t\t #[m]\n",
"\n",
"# Calculations and Results\n",
"w_2_1 = (A2*math.cos(theta2))/(r**2)\t\t\t#[Steradian]\n",
"print \"The solid angle subtended by a2 when viewed from A1 is\",w_2_1,\"sr\"\n",
"\n",
"I1 = (5.67*10**(-8))*(T1**4)/(math.pi)\t\t\t#[W/m**2.sr]\n",
"print \"The Intensity of radiation emitted by A1 is\",I1,\"W/m**2.sr\"\n",
"\n",
"Q1_2 = I1*(A1*math.cos(theta1))*w_2_1\t\t\t#[W]\n",
"print \"The rate of radiation energy emitted by A1 in the direction of\"\\\n",
",theta1,\"radians\",\"through the solid angle\",w_2_1,\"Steradian\",\"is \",Q1_2,\"W\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 12.4"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Average emissivity of the surface is 0.5206042\n",
"The Emissive Power of the surface is 12090.6785341 W/m**2\n"
]
}
],
"source": [
"\n",
"import math \n",
"# Emissivity of a surface and emissive Power\n",
"\n",
"# Variables\n",
"e1 = 0.3\t\t\t#For 0< = lambda < = 3micron \n",
"e2 = 0.8\t\t\t#3micron< = lambda< = 7micron\n",
"e3 = 0.1\t\t\t#7micron< = lamdaN??8XHeat And Mass Transfer - A Practical Approach/ch10.ipynbPKjfID4N4N8zHeat And Mass Transfer - A Practical Approach/ch11.ipynbPKjfI˕+W+W+8^Heat And Mass Transfer - A Practical Approach/ch12.ipynbPKjfI3EM4S4S8Heat And Mass Transfer - A Practical Approach/ch13.ipynbPKjfI
?ff8;Heat And Mass Transfer - A Practical Approach/ch14.ipynbPKbD