summaryrefslogtreecommitdiff
path: root/3588/CH5
diff options
context:
space:
mode:
Diffstat (limited to '3588/CH5')
-rw-r--r--3588/CH5/EX5.1/EX5_1.pngbin0 -> 13261 bytes
-rw-r--r--3588/CH5/EX5.1/EX5_1.savbin0 -> 81720 bytes
-rw-r--r--3588/CH5/EX5.1/EX5_1.sce27
-rw-r--r--3588/CH5/EX5.2/EX5_2.pngbin0 -> 13439 bytes
-rw-r--r--3588/CH5/EX5.2/EX5_2.savbin0 -> 86264 bytes
-rw-r--r--3588/CH5/EX5.2/EX5_2.sce37
-rw-r--r--3588/CH5/EX5.3/EX5_3.pngbin0 -> 13272 bytes
-rw-r--r--3588/CH5/EX5.3/EX5_3.savbin0 -> 82224 bytes
-rw-r--r--3588/CH5/EX5.3/EX5_3.sce33
-rw-r--r--3588/CH5/EX5.4/EX5_4.savbin0 -> 34128 bytes
-rw-r--r--3588/CH5/EX5.4/EX5_4.sce35
-rw-r--r--3588/CH5/EX5.6/EX5_6.savbin0 -> 26264 bytes
-rw-r--r--3588/CH5/EX5.6/EX5_6.sce40
13 files changed, 172 insertions, 0 deletions
diff --git a/3588/CH5/EX5.1/EX5_1.png b/3588/CH5/EX5.1/EX5_1.png
new file mode 100644
index 000000000..4daf259dd
--- /dev/null
+++ b/3588/CH5/EX5.1/EX5_1.png
Binary files differ
diff --git a/3588/CH5/EX5.1/EX5_1.sav b/3588/CH5/EX5.1/EX5_1.sav
new file mode 100644
index 000000000..e1a5f3b41
--- /dev/null
+++ b/3588/CH5/EX5.1/EX5_1.sav
Binary files differ
diff --git a/3588/CH5/EX5.1/EX5_1.sce b/3588/CH5/EX5.1/EX5_1.sce
new file mode 100644
index 000000000..3a39983bf
--- /dev/null
+++ b/3588/CH5/EX5.1/EX5_1.sce
@@ -0,0 +1,27 @@
+//Clearing console
+clc
+clear
+
+x = poly(0,"x")
+//Intializing variables
+x0 = 0
+x1 = 1
+
+//Calculating constants in solution (Y = c*X) X-trial function
+c = integrate('x*(x-1)*(10*x^2+5)','x',x0,x1)/integrate('x*(x-1)*2','x',x0,x1)
+
+//Calculating solution for given differntial equation
+for t =1:11
+ F(1,t) = c*(t-1)*(t-11)/100
+end
+S = c*x*(x-1)
+//Constructing x matrix
+t = 0:0.1:1;
+
+//plotting solution
+plot(t,F);
+xtitle('solution','x','y(x)')
+
+printf('\nResults\n')
+printf('\nSolution of the Differential Equation y(x) =')
+disp(S)
diff --git a/3588/CH5/EX5.2/EX5_2.png b/3588/CH5/EX5.2/EX5_2.png
new file mode 100644
index 000000000..11bcebcc0
--- /dev/null
+++ b/3588/CH5/EX5.2/EX5_2.png
Binary files differ
diff --git a/3588/CH5/EX5.2/EX5_2.sav b/3588/CH5/EX5.2/EX5_2.sav
new file mode 100644
index 000000000..2704c4fd0
--- /dev/null
+++ b/3588/CH5/EX5.2/EX5_2.sav
Binary files differ
diff --git a/3588/CH5/EX5.2/EX5_2.sce b/3588/CH5/EX5.2/EX5_2.sce
new file mode 100644
index 000000000..1c31c63cf
--- /dev/null
+++ b/3588/CH5/EX5.2/EX5_2.sce
@@ -0,0 +1,37 @@
+//Clearing console
+clc
+clear
+
+x = poly(0,"x")
+
+//Intializing variables
+x0 = 0
+x1 = 1
+
+//Consrtucting K and F matrices to solve the residual equations
+K(1,1:2) = [integrate('x*(x-1)*2','x',x0,x1) integrate('x*(x-1)*2*(3*x-1)','x',x0,x1)]
+K(2,1:2) = [integrate('x^2*(x-1)*2','x',x0,x1) integrate('x^2*(x-1)*2*(3*x-1)','x',x0,x1)]
+
+F = [integrate('x*(x-1)*(10*(x^2)+5)','x',x0,x1); integrate('x^2*(x-1)*(10*(x^2)+5)','x',x0,x1)]
+
+//Solving for constants in assumed solution
+U(1:2,1)=linsolve(K,-F)
+
+S = U(1,1)*x*(x-1)+U(2,1)*x^2*(x-1)
+
+//Calculating solution for given differntial equation
+for t =1:11
+ P(1,t) = (U(1,1)*(t-1)*(t-11)/100)+(U(2,1)*(t-1)^2*(t-11)/1000)
+end
+
+//Constructing x matrix
+k = 0:0.1:1;
+
+//plotting solution
+plot(k,P);
+xtitle('solution','x','y(x)')
+
+printf('\nResults\n')
+printf('\nSolution of the Differential Equation y(x) =')
+disp(S)
+
diff --git a/3588/CH5/EX5.3/EX5_3.png b/3588/CH5/EX5.3/EX5_3.png
new file mode 100644
index 000000000..3abc6b7ed
--- /dev/null
+++ b/3588/CH5/EX5.3/EX5_3.png
Binary files differ
diff --git a/3588/CH5/EX5.3/EX5_3.sav b/3588/CH5/EX5.3/EX5_3.sav
new file mode 100644
index 000000000..ddfa0d959
--- /dev/null
+++ b/3588/CH5/EX5.3/EX5_3.sav
Binary files differ
diff --git a/3588/CH5/EX5.3/EX5_3.sce b/3588/CH5/EX5.3/EX5_3.sce
new file mode 100644
index 000000000..2a52fad7a
--- /dev/null
+++ b/3588/CH5/EX5.3/EX5_3.sce
@@ -0,0 +1,33 @@
+//Clearing console
+clc
+clear
+
+x = poly(0,"x")
+
+//Intializing variables
+x0 = 0
+x1 = 1
+
+K = [integrate('x*(x-1)*(x^2-x+2)','x',x0,x1)]
+
+F = [integrate('x*(x-1)*3*x','x',x0,x1)]
+
+c = F/K
+
+S = c*x*(x-1)+x
+
+//Calculating solution for given differntial equation
+for t =1:11
+ P(1,t) = (c*(t-1)*(t-11)/100)+(t-1)/10
+end
+
+//Constructing x matrix
+t = 0:0.1:1;
+
+//plotting solution
+plot(t,P);
+xtitle('solution','x','y(x)')
+
+printf('\nResults\n')
+printf('\nSolution of the Differential Equation y(x) =')
+disp(S)
diff --git a/3588/CH5/EX5.4/EX5_4.sav b/3588/CH5/EX5.4/EX5_4.sav
new file mode 100644
index 000000000..3765bc3ed
--- /dev/null
+++ b/3588/CH5/EX5.4/EX5_4.sav
Binary files differ
diff --git a/3588/CH5/EX5.4/EX5_4.sce b/3588/CH5/EX5.4/EX5_4.sce
new file mode 100644
index 000000000..eb1a1e597
--- /dev/null
+++ b/3588/CH5/EX5.4/EX5_4.sce
@@ -0,0 +1,35 @@
+//Clearing console
+clc
+clear
+
+x = poly(0,"x")
+//Intializing variables
+x0 = 0
+x1 = 1
+
+//Calculating constants in solution (Y = c*X) X-trial function
+c = integrate('x*(x-1)*(10*x^2+5)','x',x0,x1)/integrate('x*(x-1)*2','x',x0,x1)
+
+S1 = c*x*(x-1)
+
+//2nd part of problem
+
+//Consrtucting K and F matrices to solve the residual equations
+K(1,1:3) = [integrate('-x*(1-x^3)*12*x^2','x',x0,x1) integrate('x*(1-x^3)*(2-12*x^2)','x',x0,x1) integrate('x*(1-x^3)*(6*x-12*x^2)','x',x0,x1)]
+K(2,1:3) = [integrate('-x^2*(1-x^2)*12*x^2','x',x0,x1) integrate('x^2*(1-x^2)*(2-12*x^2)','x',x0,x1) integrate('x^2*(1-x^2)*(6*x-12*x^2)','x',x0,x1)]
+K(3,1:3) = [integrate('-x^3*(1-x)*12*x^2','x',x0,x1) integrate('x^3*(1-x)*(2-12*x^2)','x',x0,x1) integrate('x^3*(1-x)*(6*x-12*x^2)','x',x0,x1)]
+
+F = [integrate('x*(1-x^3)*(10*(x^2)+5)','x',x0,x1); integrate('x^2*(1-x^2)*(10*(x^2)+5)','x',x0,x1);integrate('x^3*(1-x)*(10*(x^2)+5)','x',x0,x1)]
+
+//Solving for constants in assumed solution
+U(1:3,1)=(linsolve(K,-F))
+
+c4 = -(U(1,1)+U(2,1)+U(3,1))
+S2 = U(1,1)*x +U(2,1)*x^2 +U(3,1)*x^3 +c4*x^4
+
+printf('\nResults\n')
+printf('\nSolution of the Differential Equation')
+printf('\nPart-1 y(x) = ')
+disp(S1)
+printf('\nPart-2 y(x) = ')
+disp(S2)
diff --git a/3588/CH5/EX5.6/EX5_6.sav b/3588/CH5/EX5.6/EX5_6.sav
new file mode 100644
index 000000000..a2bacc540
--- /dev/null
+++ b/3588/CH5/EX5.6/EX5_6.sav
Binary files differ
diff --git a/3588/CH5/EX5.6/EX5_6.sce b/3588/CH5/EX5.6/EX5_6.sce
new file mode 100644
index 000000000..74d570fed
--- /dev/null
+++ b/3588/CH5/EX5.6/EX5_6.sce
@@ -0,0 +1,40 @@
+//Clearing console
+clc
+clear
+
+//Intializing Variables
+d = 0.06
+k1 = 200
+k2 = 389
+L1 = 0.25
+T(5,1) = 80
+Q(1:4,1) = ((%pi*d^2)/4)*[4000;0;0;0]
+
+//Calculating elemental conductance matrices
+K1 = ((k1*%pi*(d^2))/(4*L1))*[1 -1;-1 1]
+K2 = ((k2*%pi*(d^2))/(4*L1))*[1 -1;-1 1]
+
+//Calculating conductance matrices
+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)+K2(1,1) K2(1,2) 0 ]
+K(4,1:5) = [0 0 K2(2,1) K2(2,2)+K2(1,1) K2(1,2)]
+K(5,1:5) = [0 0 0 K2(2,1) K2(2,2)]
+
+//Accounting for the known temperature at node 5, and modifying Q matrix for solving
+q(1:4,1) = Q(1:4,1) - T(5,1)*K(1:4,5)
+
+//Solving for Temperatures
+T(1:4,1)=linsolve(K(1:4,1:4),-q(1:4,1))
+
+//Sovling for heat at node 5
+Q(5,1) = K(5,1:5)*T
+
+//Sovling for heat flux at node 5
+q5 = - Q(5,1)/((%pi*d^2)/4)
+
+//Printing Results
+printf('\nResults\n')
+printf('\nNode-Temperatures \nT1=%f◦C \nT2=%f◦C \nT3=%f◦C \nT4=%f◦C \nT5=%f◦C',T(1,1),T(2,1),T(3,1),T(4,1),T(5,1))
+printf('\nHeat flow at node-5 \nq5=%fW/m^2',q5)
+