summaryrefslogtreecommitdiff
path: root/Introduction_to_Heat_Transfer_by_S._K._Som/Chapter4.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Introduction_to_Heat_Transfer_by_S._K._Som/Chapter4.ipynb')
-rw-r--r--Introduction_to_Heat_Transfer_by_S._K._Som/Chapter4.ipynb103
1 files changed, 79 insertions, 24 deletions
diff --git a/Introduction_to_Heat_Transfer_by_S._K._Som/Chapter4.ipynb b/Introduction_to_Heat_Transfer_by_S._K._Som/Chapter4.ipynb
index 6c85f1a7..54a5875b 100644
--- a/Introduction_to_Heat_Transfer_by_S._K._Som/Chapter4.ipynb
+++ b/Introduction_to_Heat_Transfer_by_S._K._Som/Chapter4.ipynb
@@ -35,6 +35,10 @@
}
],
"source": [
+ " \n",
+ "\n",
+ " \n",
+ " \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 1\"\n",
@@ -55,7 +59,8 @@
"if Bi<0.1:\n",
" print\"Problem is suitable for lumped parameter analysis\"\n",
"else:\n",
- " print\"Problem is not suitable for lumped parameter analysis\""
+ " print\"Problem is not suitable for lumped parameter analysis\"\n",
+ "\n"
]
},
{
@@ -67,7 +72,7 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 1,
"metadata": {
"collapsed": false
},
@@ -85,6 +90,7 @@
}
],
"source": [
+ " \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 2\"\n",
@@ -109,7 +115,7 @@
"#Required time in sec\n",
"t = (-8)*math.log(0.01);\n",
"print\"Time required in seconds\"\n",
- "print\"t=\",t"
+ "print\"t=\",t\n"
]
},
{
@@ -121,7 +127,7 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 2,
"metadata": {
"collapsed": false
},
@@ -137,6 +143,7 @@
}
],
"source": [
+ " \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 3\"\n",
@@ -150,7 +157,7 @@
"#Maximum dimension in metre\n",
"a = ((6*k)*Bi)/h;\n",
"print\"Maximum dimension in metre for lumped parameter analysis\"\n",
- "print\"a=\",a"
+ "print\"a=\",a\n"
]
},
{
@@ -179,6 +186,7 @@
}
],
"source": [
+ " \n",
"from scipy.integrate import quad\n",
"import math\n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 4\"\n",
@@ -214,7 +222,7 @@
"E = (((h*math.pi)*d)*H)*quad(lambda t:(80.0-25.0)*math.e*(-t/472.5),0,60.0*t)[0];\n",
"print\"Energy required for cooling in KJ\"\n",
"E = E/1000.0\n",
- "print \"E=\",E"
+ "print \"E=\",E\n"
]
},
{
@@ -226,7 +234,7 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 3,
"metadata": {
"collapsed": false
},
@@ -244,6 +252,7 @@
}
],
"source": [
+ " \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 5\"\n",
@@ -279,7 +288,7 @@
"Q = ((((0.69*k)*2)*L)*(Tinfinity-Ti))/alpha;\n",
"print\"Heat transfer rate in MJ\"\n",
"Q = Q/(10**6)\n",
- "print\"Q=\",Q"
+ "print\"Q=\",Q\n"
]
},
{
@@ -291,7 +300,7 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 4,
"metadata": {
"collapsed": false
},
@@ -309,6 +318,7 @@
}
],
"source": [
+ " \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 6\"\n",
@@ -346,7 +356,7 @@
"Q = (((0.4*k)*L)*(Ti-Tinfinity))/alpha;\n",
"print\"Heat transfer rate in MJ\"\n",
"Q = Q/(10**6)\n",
- "print\"Q=\",Q"
+ "print\"Q=\",Q\n"
]
},
{
@@ -358,7 +368,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 5,
"metadata": {
"collapsed": false
},
@@ -376,6 +386,7 @@
}
],
"source": [
+ " \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 7\"\n",
@@ -413,7 +424,7 @@
"Q = (((((0.4*k)*math.pi)*ro)*ro)*(Ti-Tinfinity))/alpha;\n",
"print\"Heat transfer rate per unit length in MJ/m\"\n",
"Q = Q/(10**6)\n",
- "print\"Q=\",Q"
+ "print\"Q=\",Q\n"
]
},
{
@@ -425,7 +436,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 6,
"metadata": {
"collapsed": false
},
@@ -441,6 +452,7 @@
}
],
"source": [
+ " \n",
"import math\n",
"\n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 8\"\n",
@@ -469,7 +481,7 @@
"t = ((Fo*ro)*ro)/alpha;\n",
"print\"Time required in minutes\"\n",
"t = t/60\n",
- "print\"t=\",t"
+ "print\"t=\",t\n"
]
},
{
@@ -481,7 +493,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 7,
"metadata": {
"collapsed": false
},
@@ -497,6 +509,7 @@
}
],
"source": [
+ " \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 9\"\n",
@@ -539,7 +552,7 @@
"#Temperature in °C\n",
"T = Tinfinity+z*(Ti-Tinfinity);\n",
"print\"Tempearture of bar in °C\"\n",
- "print\"T=\",T"
+ "print\"T=\",T\n"
]
},
{
@@ -551,7 +564,7 @@
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 8,
"metadata": {
"collapsed": false
},
@@ -576,6 +589,7 @@
}
],
"source": [
+ " \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 10\"\n",
@@ -645,7 +659,17 @@
"#Therefore ((To-Tinf)/(Ti-Tinf))plate1*((To-Tinf)/(Ti-Tinf))plate2=A*B\n",
"T=A*B\n",
"print\"The calculated value is very close to the required value of 0.6.Hence the time required for the centre of the beam to reach 310°C is nearly 1200s or 20 minutes.\" \n",
- "print\"T=\",T"
+ "print\"T=\",T\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n"
]
},
{
@@ -657,7 +681,7 @@
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 9,
"metadata": {
"collapsed": false
},
@@ -673,6 +697,7 @@
}
],
"source": [
+ " \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 11\"\n",
@@ -694,7 +719,22 @@
"#Therefore 10/t**0.5=0.38...this implies t=(10/0.38)**2\n",
"print\"The time required for the temprature to reach 255°C at a depth of 80mm, in minutes is\"\n",
"t=(10/0.38)**2/60\n",
- "print\"T=\",T"
+ "print\"T=\",T\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
]
},
{
@@ -724,6 +764,7 @@
}
],
"source": [
+ " \n",
"import math\n",
"import scipy \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 12\"\n",
@@ -747,7 +788,18 @@
"print\"The temprature at a depth(x) of 100mm after a time(t) of 100 seconds,in °C is\"\n",
"T=Ti+((2*qo*(alpha*t/math.pi)**0.5)/(k))*math.e**((-x**2.0)/(4*alpha*t))-((qo*x)/(k))*scipy.special.erf(x/(2*(alpha*t)**0.5))\n",
"print\"T=\",T\n",
- "#NOTE:The answer in the book is incorrect(Calculation mistake)"
+ "#NOTE:The answer in the book is incorrect(Calculation mistake)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
]
},
{
@@ -759,7 +811,7 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 17,
"metadata": {
"collapsed": false
},
@@ -770,7 +822,7 @@
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 14\n",
"Temperature distribution after 25 mins in °C\n",
- "T= [[ 2.29192547e+02 2.91925466e+00 1.11801242e+00 4.34782609e-01\n",
+ "[[ 2.29192547e+02 2.91925466e+00 1.11801242e+00 4.34782609e-01\n",
" 1.86335404e-01 6.21118012e-02]\n",
" [ 8.75776398e+01 8.75776398e+00 3.35403727e+00 1.30434783e+00\n",
" 5.59006211e-01 1.86335404e-01]\n",
@@ -786,6 +838,7 @@
}
],
"source": [
+ " \n",
"import math\n",
"import numpy\n",
" \n",
@@ -811,8 +864,10 @@
"#From Eq. 4.126\n",
"#Temperature distribution after one time step\n",
"T = numpy.linalg.inv(A)*B;\n",
+ "\n",
+ " \n",
"print\"Temperature distribution after 25 mins in °C\"\n",
- "print\"T=\",T"
+ "print T\n"
]
}
],