diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3588/CH7/EX7.9/EX7_9.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3588/CH7/EX7.9/EX7_9.sce')
-rw-r--r-- | 3588/CH7/EX7.9/EX7_9.sce | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/3588/CH7/EX7.9/EX7_9.sce b/3588/CH7/EX7.9/EX7_9.sce new file mode 100644 index 000000000..8ce7692bb --- /dev/null +++ b/3588/CH7/EX7.9/EX7_9.sce @@ -0,0 +1,46 @@ +//Clearing console +clc +clear + +//Intializing Variables +d = 0.02 +L = 0.1 +k = 0.156 +c = 0.523 +h = 300 +m = 0.2*60 +Ta = 15 +T(1,1) = 50 + +//Calculating elemental conductance capcitance matrices +Kc = ((k*%pi*(d)^2)/(L))*[1 -1;-1 1] +Kh = (h*%pi*d*L/24)*[2 1;1 2] +Km = (m*c/2)*[-1 1;-1 1] + +//Calculating elemental stiffness matrice +K1 = Kc+Kh+Km + +//Calculating global stiffness matrice +K(1,1:5) = [K1(1,1:2) 0 0 0] +K(2,1:5) = [K1(2,1) K1(2,2)+K1(1,1) K1(1,2) 0 0] +K(3,1:5) = [0 K1(2,1) K1(2,2)+K1(1,1) K1(1,2) 0] +K(4,1:5) = [0 0 K1(2,1) K1(2,2)+K1(1,1) K1(1,2)] +K(5,1:5) = [0 0 0 K1(2,1) K1(2,2)] + + +f = (h*%pi*d*Ta*L/8)*[1;1] +F(2:5,1) = [f(1,1)+f(2,1);f(1,1)+f(2,1);f(1,1)+f(2,1);f(1,1)] + +Fd(2:5,1) = F(2:5,1)-K(2:5,1)*T(1,1) + +//Solving for Nodal temperatures +T(2:5,1)=linsolve(K(2:5,2:5),-Fd(2:5,1)) + +//Calculating qs +qm1 = m*c*T(1,1)*10 +qm5 = m*c*T(5,1)*10 + +printf('\nResults\n') +printf('\nNode-Temperatures \nT1=%fK \nT2=%fK \nT3=%fK \nT4=%fK \nT5=%fK',T(1,1),T(2,1),T(3,1),T(4,1),T(5,1)) +printf('\nHeat rate at node-1 \nq1=%fW',qm1) +printf('\nHeat rate at node-5 \nq5=%fW',qm5) |