{
"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
}