{ "metadata": { "name": "", "signature": "sha256:2ba7e707b3be5d9c0c54b9bb8556d6e5f96b70b9fbb7f8e292b6019cfe481029" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Introduction" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.1 Page 5" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "L=.15; \t\t \t\t\t#[m] - Thickness of conducting wall\n", "delT = 1400. - 1150.; \t\t#[K] - Temperature Difference across the Wall\n", "A=.5*1.2; \t\t\t\t\t#[m^2] - Cross sectional Area of wall = H*W\n", "k=1.7; \t\t\t\t\t#[W/m.k] - Thermal Conductivity of Wall Material\n", "#calculations\n", "#Using Fourier's Law eq 1.2\n", "Q = k*delT/L; \t\t\t#[W/m^2] - Heat Flux\n", "\n", "q = A*Q; \t\t\t#[W] - Rate of Heat Transfer \n", "#results\n", "print '%s %.2f %s' %(\"\\n \\n Heat Loss through the Wall =\",q,\" W\");\n", "#END" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " \n", " Heat Loss through the Wall = 1700.00 W\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.2 Page 11" ] }, { "cell_type": "code", "collapsed": false, "input": [ " \n", "import math\n", "d=.07; \t\t\t\t\t\t\t\t\t#[m] - Outside Diameter of Pipe\n", "Ts = 200+273.15; \t\t\t\t\t\t\t#[K] - Surface Temperature of Steam\n", "Tsurr = 25+273.15; \t\t\t\t\t\t\t#[K] - Temperature outside the pipe\n", "e=.8; \t\t\t\t\t\t\t\t\t\t# Emissivity of Surface\n", "h=15; \t\t\t\t\t\t\t\t\t#[W/m^2.k] - Thermal Convectivity from surface to air\n", "stfncnstt=5.67*math.pow(10,(-8)); \t \t# [W/m^2.K^4] - Stefan Boltzmann Constant \n", "#calculations\n", "#Using Eq 1.5 \n", "E = e*stfncnstt*Ts*Ts*Ts*Ts; \t\t\t#[W/m^2] - Emissive Power\n", "G = stfncnstt*Tsurr*Tsurr*Tsurr*Tsurr; \t#[W/m^2] - Irradiation falling on surface\n", "#results\n", "print '%s %.2f %s' %(\"\\n (a) Surface Emissive Power = \",E,\" W/m^2\");\n", "print '%s %.2f %s' %(\"\\n Irradiation Falling on Surface =\",G,\" W/m^2\");\n", "\n", "#Using Eq 1.10 Total Rate of Heat Transfer Q = Q by convection + Q by radiation\n", "q = h*(math.pi*d)*(Ts-Tsurr)+e*(math.pi*d)*stfncnstt*(Ts*Ts*Ts*Ts-Tsurr*Tsurr*Tsurr*Tsurr); #[W] \n", "\n", "print '%s %.2f %s' %(\"\\n\\n (b) Total Heat Loss per unit Length of Pipe=\",q,\" W\");\n", "#END" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " (a) Surface Emissive Power = 2273.36 W/m^2\n", "\n", " Irradiation Falling on Surface = 448.05 W/m^2\n", "\n", "\n", " (b) Total Heat Loss per unit Length of Pipe= 998.38 W\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.4 Page 20" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "import math\n", "Ts = 56.4+273.15; \t\t\t\t\t#[K] - Surface Temperature of Steam\n", "Tsurr = 25+273.15; \t\t\t\t\t#[K] - Temperature of Surroundings\n", "e=.88; \t\t\t\t\t\t\t\t# Emissivity of Surface\n", "\n", "#As h=(10.9*math.pow(V,.8)[W/m^2.k] - Thermal Convectivity from surface to air\n", "stfncnstt=5.67*math.pow(10,(-8)); \t# [W/m^2.K^4] - Stefan Boltzmann Constant \n", "\n", "A=2*.05*.05; \t\t\t\t\t# [m^2] Area for Heat transfer i.e. both surfaces\n", "\n", "E = 11.25; \t\t\t \t \t\t#[W] Net heat to be removed by cooling air\n", "#calculations\n", "\n", "Qrad = e*stfncnstt*A*(math.pow(Ts,4)-math.pow(Tsurr,4));\n", "\n", "#Using Eq 1.10 Total Rate of Heat Transfer Q = Q by convection + Q by radiation\n", "Qconv = E - Qrad;\t\t\t\t\t#[W] \n", "\n", "#As Qconv = h*A*(Ts-Tsurr) & h=10.9 Ws^(.8)/m^(-.8)K.V^(.8)\n", "\n", "V = math.pow(Qconv/(10.9*A*(Ts-Tsurr)),(1/0.8));\n", "#results\n", "\n", "print '%s %.2f %s' %(\"\\n\\n Velocity of Cooling Air flowing= \", V,\"m/s\");\n", "#END" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", " EXAMPLE 1.4 Page 20 \n", "\n", "\n", "\n", " Velocity of Cooling Air flowing= 9.40 m/s\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.6 Page 26" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "import math\n", "A=1.8;\t \t\t\t\t\t\t\t\t# [m^2] Area for Heat transfer i.e. both surfaces\n", "Ti = 35+273.; \t \t\t\t\t\t\t\t#[K] - Inside Surface Temperature of Body\n", "Tsurr = 297.; \t\t\t\t\t\t\t\t#[K] - Temperature of surrounding\n", "Tf = 297.; \t\t\t\t\t\t\t\t\t#[K] - Temperature of Fluid Flow\n", "e=.95; \t\t\t\t\t\t\t\t\t\t# Emissivity of Surface\n", "L=.003; \t\t\t\t\t\t\t\t\t#[m] - Thickness of Skin\n", "k=.3; \t\t\t\t\t\t\t\t\t\t# Effective Thermal Conductivity\n", "h=2; \t\t\t\t\t\t\t\t\t#[W/m^2.k] - Natural Thermal Convectivity from body to air\n", "stfncnstt=5.67*math.pow(10,(-8)); \t\t\t# [W/m^2.K^4] - Stefan Boltzmann Constant \n", "#Using Eq 1.5\n", "\n", "Tsa=305.; \t\t\t \t\t\t\t #[K] Body Temperature Assumed\n", "#calculations\n", "\n", "Ts=307.19\n", "q = k*A*(Ti-Ts)/L; #[W] \n", "\n", "print '%s' %(\"\\n\\n (I) In presence of Air\")\n", "print '%s %.2f %s' %(\"\\n (a) Temperature of Skin = \",Ts,\"K\");\n", "print '%s %.2f %s' %(\"\\n (b) Total Heat Loss = \",q,\" W\");\n", "\n", "#When person is in Water\n", "h = 200; \t\t\t\t\t\t\t\t#[W/m^2.k] - Thermal Convectivity from body to water\n", "hr = 0; \t\t\t\t\t\t\t\t\t# As Water is Opaque for Thermal Radiation\n", "Ts = (k*Ti/L + (h+hr)*Tf)/(k/L +(h+hr)); \t#[K] Body Temperature \n", "q = k*A*(Ti-Ts)/L; \t\t\t\t#[W] \n", "#results\n", "\n", "print '%s' %(\"\\n\\n (II) In presence of Water\")\n", "print '%s %.2f %s' %(\"\\n (a) Temperature of Skin =\",Ts,\" K\");\n", "print '%s %.2f %s' %(\"\\n (b) Total Heat Loss =\",q,\" W\");\n", "\n", "#END" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", "\n", " (I) In presence of Air\n", "\n", " (a) Temperature of Skin = 307.19 K\n", "\n", " (b) Total Heat Loss = 145.80 W\n", "\n", "\n", " (II) In presence of Water\n", "\n", " (a) Temperature of Skin = 300.67 K\n", "\n", " (b) Total Heat Loss = 1320.00 W\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.7 Page 30" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "%pylab inline\n", "\n", "import math\n", "import numpy\n", "from numpy import roots\n", "import matplotlib\n", "from matplotlib import pyplot\n", "Tsurr = 30+273; #[K] - Temperature of surrounding\n", "Tf = 20+273; #[K] - Temperature of Fluid Flow\n", "e=.5; # Emissivity of Surface\n", "a = .8; # Absorptivity of Surface\n", "G = 2000; #[W/m^2] - Irradiation falling on surface\n", "h=15; #[W/m^2.k] - Thermal Convectivity from plate to air\n", "stfncnstt=5.67*math.pow(10,(-8)); # [W/m^2.K^4] - Stefan Boltzmann Constant \n", "T=375; #[K] Value initially assumed for trial-error approach\n", "#Using Eq 1.3a & 1.7 and trial-and error approach of Newton Raphson \n", "#calculations and results\n", "while(1>0):\n", " f=((a*G)-(h*(T-Tf)+e*stfncnstt*(T*T*T*T - Tsurr*Tsurr*Tsurr*Tsurr)));\n", " fd=(-h*T-4*e*stfncnstt*T*T*T);\n", " Tn=T-f/fd;\n", " if(((a*G)-(h*(Tn-Tf)+e*stfncnstt*(Tn*Tn*Tn*Tn - Tsurr*Tsurr*Tsurr*Tsurr)))<.01):\n", " break;\n", " T=Tn;\n", "\n", "print '%s %.2f %s' %(\"\\n (a) Cure Temperature of Plate =\",T-273.,\"degC\\n\");\n", "#solution (b)\n", "Treq=50+273;\n", "#def T(h):\n", "# t=375;\n", "# while(1>0):\n", "# f=((a*G)-(h*(t-Tf)+e*stfncnstt*(t*t*t*t - Tsurr*Tsurr*Tsurr*Tsurr)));\n", "# fd=(-h*t-4*e*stfncnstt*t*t*t);\n", "# Tn=t-f/fd;\n", "# if((a*G)-(h*(Tn-Tf)+e*stfncnstt*(Tn*Tn*Tn*Tn - Tsurr*Tsurr*Tsurr*Tsurr))<.01):\n", "# break;\n", "# tnew=Tn;\n", "# return tnew;\n", "\n", "\n", "def T(h):\n", " global rt\n", " coeff = ([-e*stfncnstt, 0,0, -h, a*G+h*Tf+e*stfncnstt*Tsurr*Tsurr*Tsurr*Tsurr]);\n", " rot=numpy.roots(coeff);\n", " rt=rot[3];\n", " #for i in range (0,3):\n", " # if 273" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "\n", " (b) Air flow must provide a convection of = 51.01 W/m^2.K\n", "\n", " The code for the graph requires more than 10 min to run. \n", "\n", " To run it, please remove comments. It is perfectly correct. The reason it takes such a long time\n", "\n", " is that it needs to calculate using Newton raphson method at 100 points. Each point itself takes a minute.\n" ] } ], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }