diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1910/CH3 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1910/CH3')
-rwxr-xr-x | 1910/CH3/EX3.1/Chapter31.sce | 26 | ||||
-rwxr-xr-x | 1910/CH3/EX3.2/Chapter32.sce | 27 | ||||
-rwxr-xr-x | 1910/CH3/EX3.3/Chapter33.sce | 55 | ||||
-rwxr-xr-x | 1910/CH3/EX3.5/Chapter35.sce | 82 | ||||
-rwxr-xr-x | 1910/CH3/EX3.6/Chapter36.sce | 69 |
5 files changed, 259 insertions, 0 deletions
diff --git a/1910/CH3/EX3.1/Chapter31.sce b/1910/CH3/EX3.1/Chapter31.sce new file mode 100755 index 000000000..fb58c68a5 --- /dev/null +++ b/1910/CH3/EX3.1/Chapter31.sce @@ -0,0 +1,26 @@ +// Display mode
+mode(0);
+// Display warning for floating point exception
+ieee(1);
+clear;
+clc;
+disp("Introduction to heat transfer by S.K.Som, Chapter 1, Example 1")
+//Length and breadth is given as 1 unit (Gemoetry is Square)
+L = 1;//length
+//Problem can be divided into two modules
+//Solution to module 1 is given by Eq. 3.21, considering the first three terms
+//n is the looping parameter
+//theta is the non dimensional temperature defined as ((T-100)/100) where T is actual temperature in degree Celcius.
+//Initialising theta as zero
+theta = 0;
+for n = 1:3
+ theta = theta+((2/%pi)*((sin((n*%pi)/2)*sinh((n*%pi)/2))*((-1)^(n+1)+1)))/(n*sinh(n*%pi));
+end;
+//Solution to module 2 is given by Eq. 3.24, considering the first three terms
+for n = 1:3
+ theta = theta+(((3*2)/%pi)*((sin((n*%pi)/2)*sinh((n*%pi)/2))*((-1)^(n+1)+1)))/(n*sinh(n*%pi));
+end;
+//Calculating value of temperature from the value of theta
+//Temperature in degree celcius
+disp("Temperature at the centre in Degree C is")
+T = theta*100+100
diff --git a/1910/CH3/EX3.2/Chapter32.sce b/1910/CH3/EX3.2/Chapter32.sce new file mode 100755 index 000000000..bb97630ef --- /dev/null +++ b/1910/CH3/EX3.2/Chapter32.sce @@ -0,0 +1,27 @@ +// Display mode
+mode(0);
+// Display warning for floating point exception
+ieee(1);
+clear;
+clc;
+disp("Introduction to heat transfer by S.K.Som, Chapter 3, Example 2")
+//Temperature in K at four edges are given
+//Theta is non dimensional temperature defined as ((T-300)/100) where T is actual temperature in K.
+//Given length as well as the breadth of square plate is ''a''
+//Problem can be divided into two modules
+//Solution to module 1 is given by Eq. 3.23
+//Solution of first module is non dimensional temperature theta1
+//theta1=2*sinh(pi*y/a)*sin(pi*x/a)/(sinh(pi))
+//Solution to module 2 is given by Eq. 3.24
+//Solution of second module is non dimensional temperature theta2
+//theta2=sinh(pi*x/a)*sin(pi*y/a)/(sinh(pi))
+//Therefore
+disp("Steady state non dimensional temperature is")
+disp("theta=2*sinh(pi*y/a)*sin(pi*x/a)/(sinh(pi)) + sinh(pi*x/a)*sin(pi*y/a)/(sinh(pi))")
+//At the centre, x coordinate and y coordinate in unit are
+//x=a/2, y=a/2
+//Non dimensional temperature at centre point
+theta = (2*sinh(%pi/2))/sinh(%pi)+sinh(%pi/2)/sinh(%pi);
+//Temperature in K at centre point
+disp("Temperature in K at centre point")
+T = theta*100+300
diff --git a/1910/CH3/EX3.3/Chapter33.sce b/1910/CH3/EX3.3/Chapter33.sce new file mode 100755 index 000000000..da29f28db --- /dev/null +++ b/1910/CH3/EX3.3/Chapter33.sce @@ -0,0 +1,55 @@ +// Display mode
+mode(0);
+// Display warning for floating point exception
+ieee(1);
+clear;
+clc;
+disp("Introduction to heat transfer by S.K.Som, Chapter 3, Example 3")
+//internodal distance in x direction in m
+deltax = 1/4;
+//internodal distance in y direction in m
+deltay = 1/4;
+//Air temperature in degree K
+Tinfinity = 400;
+//Heat transfer coefficient in W/(m^2*K)
+h = 10;
+//T1, T2, T3, T4, T5, T6, T7, T8 are nodal temperatures in degree K.
+//T is the temperature matrix and is transpose of [T1 T2 T3 T4 T5 T6 T7 T8]
+//using Nodal Equations, we have Coefficeint Matrix A as
+A = [-4,1,0,0,1,0,0,0;
+ 1,-4,1,0,0,1,0,0;
+ 0,1,-4,1,0,0,1,0;
+ 2,0,0,0,-4,1,0,0;
+ 0,2,0,0,1,-4,1,0;
+ 0,0,2,0,0,1,-4,1;
+ 0,0,2,-6,0,0,0,1;
+ 0,0,0,2,0,0,2,-6];
+//Coefficient matrix B
+B = [-1200;
+ -600;
+ -600;
+ -600;
+ 0;
+ 0;
+ -1400;
+ -800];
+//Therefore the temperature matrix is
+T = (A^(-1))*B;
+//Temperature at nodal points in degree K
+disp("Temperatures at nodal points in degree K")
+disp("T1 in degree K")
+T1 = T(1)
+disp("T2 in degree K")
+T2 = T(2)
+disp("T3 in degree K")
+T3 = T(3)
+disp("T4 in degree K")
+T4 = T(4)
+disp("T5 in degree K")
+T5 = T(5)
+disp("T6 in degree K")
+T6 = T(6)
+disp("T7 in degree K")
+T7 = T(7)
+disp("T8 in degree K")
+T8 = T(8)
diff --git a/1910/CH3/EX3.5/Chapter35.sce b/1910/CH3/EX3.5/Chapter35.sce new file mode 100755 index 000000000..9ed47e37f --- /dev/null +++ b/1910/CH3/EX3.5/Chapter35.sce @@ -0,0 +1,82 @@ +// Display mode
+mode(0);
+// Display warning for floating point exception
+ieee(1);
+clear;
+clc;
+disp("Introduction to heat transfer by S.K.Som, Chapter 3, Example 5")
+//Thermal conductivity of aluminium in W/(m*K)
+k = 200;
+//Diameter in m
+d = 20*(10^(-3));
+//Length of fin in m
+L = 0.2;
+//Wall temperature in degree C
+Tw = 400;
+//Air temperature in degree C
+Tinfinity = 30;
+//Heat transfer coefficient in W/(m^2*K)
+h = 40;
+//internodal distance in x direction in m
+deltax = L/5;
+//Node 1 temperature is equal to wall temperature in degree C
+T1 = Tw;
+//using Nodal Equations, we have Coefficeint Matrix A as
+A = [2.064,-1,0,0,0;
+ -1,2.064,-1,0,0;
+ 0,-1,2.064,-1,0;
+ 0,0,-1,2.064,-1;
+ 0,0,0,-1,1.032];
+//Coefficient matrix B
+B = [401.92;
+ 1.92;
+ 1.92;
+ 1.92;
+ 0.96];
+//T2, T3, T4, T5, T6 are nodal temperature in degree C
+//T is the temperature matrix and is transpose of [T2 T3 T4 T5 T6]
+//Therefore the temperature matrix is
+T = (A^(-1))*B;
+//Temperature at nodal points in degree C
+disp("Temperatures at nodal points in degree C")
+disp("T2 in degree C")
+T2 = T(1)
+disp("T3 in degree C")
+T3 = T(2)
+disp("T4 in degree C")
+T4 = T(3)
+disp("T5 in degree C")
+T5 = T(4)
+disp("T6 in degree C")
+T6 = T(5)
+//Heat transfer rate in W
+disp("Heat loss from fin in W")
+Q = -((((k*%pi)*d)*d)*(T2-T1))/(4*deltax)
+//Using eq. 2.67
+//Parameter m in meter inverse
+m = (((h*%pi)*d)/((((k*%pi)*d)*d)/4))^0.5;
+//Generalised eq. of temperature is eq. 2.67
+//T=30+193.61*cosh(m*(L-x))
+//Calculating analytical temperatures in degree C
+//i is the looping parameter
+for i = 1:5
+ //Distance in m
+ x = 0.04*i;
+ //Ta is the matrix of actual temperatures in degree C
+ Ta(1,i) = 30+193.61*cosh(m*(L-x));
+end;
+//Heat loss in W as in eq. 2.68
+Qa = (((((((((h*%pi)*d)*k)*%pi)*d)*d)/4)^0.5)*370)*tanh(m*L);
+disp("Comparison between actual and numerical values")
+// L.69: No simple equivalent, so mtlb_fprintf() is called.
+mtlb_fprintf("Actual heat transfer is %5.2f W while predicted numerically is %5.2f W\n",Qa,Q)
+// L.71: No simple equivalent, so mtlb_fprintf() is called.
+mtlb_fprintf("At nodal point 2, actual temperature is %5.2f C while predicted numerically is %5.2f C\n",Ta(1),T(1))
+// L.72: No simple equivalent, so mtlb_fprintf() is called.
+mtlb_fprintf("At nodal point 3, actual temperature is %5.2f C while predicted numerically is %5.2f C\n",Ta(2),T(2))
+// L.73: No simple equivalent, so mtlb_fprintf() is called.
+mtlb_fprintf("At nodal point 4, actual temperature is %5.2f C while predicted numerically is %5.2f C\n",Ta(3),T(3))
+// L.74: No simple equivalent, so mtlb_fprintf() is called.
+mtlb_fprintf("At nodal point 5, actual temperature is %5.2f C while predicted numerically is %5.2f C\n",Ta(4),T(4))
+// L.75: No simple equivalent, so mtlb_fprintf() is called.
+mtlb_fprintf("At nodal point 6, actual temperature is %5.2f C while predicted numerically is %5.2f C\n",Ta(5),T(5))
diff --git a/1910/CH3/EX3.6/Chapter36.sce b/1910/CH3/EX3.6/Chapter36.sce new file mode 100755 index 000000000..ca2a089b0 --- /dev/null +++ b/1910/CH3/EX3.6/Chapter36.sce @@ -0,0 +1,69 @@ +// Display mode
+mode(0);
+// Display warning for floating point exception
+ieee(1);
+clear;
+clc;
+disp("Introduction to heat transfer by S.K.Som, Chapter 3, Example 6")
+//Thermal conductivity of concrete in W/mK
+k = 2;
+//Length in m
+L = 0.2;
+//Breadth in m
+b = 0.2;
+//Depth in m
+d = 0.2;
+//Temperature of hot gas in chimney in degree C
+Tg = 400;
+//Air temperature in degree C
+Tinfinity = 20;
+//internodal distance in x direction in m
+deltax = 0.1;
+//internodal distance in y direction in m
+deltay = 0.1;
+//Heat transfer coefficient in W/(m^2*K)
+h = 20;
+//T1, T2, T3, T4, T5, T6, T7, T8, T9 are nodal temperatures in degree K.
+//T is the temperature matrix and is transpose of [T1 T2 T3 T4 T5 T6 T7 T8 T9]
+//using Nodal Equations, we have Coefficeint Matrix A as
+A = [1,0,-4,2,0,1,0,0,0;
+ 0,1,1,-4,1,0,1,0,0;
+ 0,0,0,2,-4,0,0,2,0;
+ -3,1,1,0,0,0,0,0,0;
+ 0,0,1,0,0,-3,1,0,0;
+ 0,0,0,2,0,1,-6,1,0;
+ 0,0,0,0,2,0,1,-6,1;
+ 0,0,0,0,0,0,0,1,-2;
+ 1,-4,0,2,0,0,0,0,0];
+//Coefficient matrix B
+B = [0;
+ 0;
+ 0;
+ -400;
+ -20;
+ -40;
+ -40;
+ -20;
+ -400];
+//Therefore the temperature matrix is
+T = (A^(-1))*B;
+//Temperature at nodal points in degree C
+disp("Temperatures at nodal points in degree C")
+disp("T1 in degree C")
+T1 = T(1)
+disp("T2 in degree C")
+T2 = T(2)
+disp("T3 in degree C")
+T3 = T(3)
+disp("T4 in degree C")
+T4 = T(4)
+disp("T5 in degree C")
+T5 = T(5)
+disp("T6 in degree C")
+T6 = T(6)
+disp("T7 in degree C")
+T7 = T(7)
+disp("T8 in degree C")
+T8 = T(8)
+disp("T9 in degree C")
+T9 = T(9)
|