summaryrefslogtreecommitdiff
path: root/3588/CH7/EX7.4/EX7_4.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3588/CH7/EX7.4/EX7_4.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-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.4/EX7_4.sce')
-rw-r--r--3588/CH7/EX7.4/EX7_4.sce58
1 files changed, 58 insertions, 0 deletions
diff --git a/3588/CH7/EX7.4/EX7_4.sce b/3588/CH7/EX7.4/EX7_4.sce
new file mode 100644
index 000000000..24ae49e04
--- /dev/null
+++ b/3588/CH7/EX7.4/EX7_4.sce
@@ -0,0 +1,58 @@
+//Clearing console
+clc
+clear
+
+//Intializing Variables
+a = 0.5/12
+b = 0.5/12
+t = 0.5/12
+kx = 20
+ky = 20
+h= 50
+
+r(1) = sqrt(3)/3
+r(2) = -sqrt(3)/3
+s(1) = sqrt(3)/3
+s(2) = -sqrt(3)/3
+K11 = 0
+
+//Gaussian quadrature Integration for calculating elements of stiffness matrix
+for j =1:2
+ for i =1:2
+ K11 = K11 + ((kx*t*(a/b)*(s(j)-1)^2)/16)+((ky*t*(b/a)*(r(i)-1)^2)/16)+((2*h*a*b*((1-r(i))^2)*((1-s(j))^2))/16)
+ end
+end
+
+K22 = 0
+for j =1:2
+ for i =1:2
+ K22 = K22 + ((kx*t*(a/b)*(s(j)-1)^2)/16)+((ky*t*(b/a)*(r(i)+1)^2)/16)+((2*h*a*b*((1+r(i))^2)*((1-s(j))^2))/16)
+ end
+end
+
+K12 = 0
+for j =1:2
+ for i =1:2
+ K12 = K12 + (-(kx*t*(a/b)*(s(j)-1)^2)/16)+((ky*t*(b/a)*(r(i)+1)*(1-r(i)))/16)+((2*h*a*b*(1-r(i))*(1+r(i))*((1-s(j))^2))/16)
+ end
+end
+
+K13 = 0
+for j =1:2
+ for i =1:2
+ K13 = K13 + ((kx*t*(a/b)*(s(j)-1)*(s(j)+1))/16)+((ky*t*(b/a)*(r(i)+1)*(r(i)-1))/16)+((2*h*a*b*(1-r(i))*(1+r(i))*(1-s(j))*(1+s(j)))/16)
+ end
+end
+
+K14 = 0
+for j =1:2
+ for i =1:2
+ K14 = K14 + (-(kx*t*(a/b)*(s(j)-1)*(1+s(j)))/16)+(-(ky*t*(b/a)*(1-r(i))^2)/16)+((2*h*a*b*(1-s(j))*(1+s(j))*((1-r(i))^2))/16)
+ end
+end
+
+//Similarly Calculating other elements
+K = [K11 K12 K13 K14;K12 K22 K12 K13;K13 K12 K22 K12;K14 K13 K12 K22]
+
+printf('\nComplete Element Conductance Matrix in Btu/(hr-◦F )\n')
+disp(K)