summaryrefslogtreecommitdiff
path: root/1052/CH31
diff options
context:
space:
mode:
Diffstat (limited to '1052/CH31')
-rwxr-xr-x1052/CH31/EX31.1/311.sce12
-rwxr-xr-x1052/CH31/EX31.2/312.sce18
-rwxr-xr-x1052/CH31/EX31.3/313.sce21
-rwxr-xr-x1052/CH31/EX31.4/314.sce7
4 files changed, 58 insertions, 0 deletions
diff --git a/1052/CH31/EX31.1/311.sce b/1052/CH31/EX31.1/311.sce
new file mode 100755
index 000000000..0d7bde4e4
--- /dev/null
+++ b/1052/CH31/EX31.1/311.sce
@@ -0,0 +1,12 @@
+clc;
+//Example 31.1 page no 486
+printf("Example 31.1 page no 486\n\n ");
+//set of linear algebric equation using gauss elimination
+A=[3,-2,1;1,4,-2;2,-3,-4]//matrix A
+B=[7;21;9]//matrix B
+X=inv(A)*B
+printf("\n X=%f",X);
+X1=X(1,1)//value of X1
+X2=X(2,1)//value of X2
+X3=X(3,1)//value of X3
+printf("\n X1=%f\nX2=%f \nX3=%f",X1,X2,X3);
diff --git a/1052/CH31/EX31.2/312.sce b/1052/CH31/EX31.2/312.sce
new file mode 100755
index 000000000..52a8bd756
--- /dev/null
+++ b/1052/CH31/EX31.2/312.sce
@@ -0,0 +1,18 @@
+clc;
+//Example 31.2
+//page no 492
+printf("Example 31.2 page no 492\n\n");
+//the vapor pressure p' for a new synthetic chemical at a given temperature
+t1=1100//assume intial actual temperature,k
+T1=t1*1e-3//temperature,k
+printf("\n T1=%f k",T1);
+f1=T1^3 -2*T1^2 + 2*T1 -1//function of T,f(T)
+f_d1=3*T1^2 -4*T1 + 2//derivative of f(T)
+//using newton rapson formula to estimate T2
+T2=T1 -(f1/f_d1)//temperature T2
+printf("\n T2=%f k",T2);
+f2=T2^3 -2*T2^2 + 2*T2 -1
+f_d2=3*T2^2 -4*T2 + 2
+T3=T2 -(f2/f_d2)//temperature T3
+printf("\n T3=%f k",T3);
+//finally the best estimate is T3,t=1.000095
diff --git a/1052/CH31/EX31.3/313.sce b/1052/CH31/EX31.3/313.sce
new file mode 100755
index 000000000..a23b540b4
--- /dev/null
+++ b/1052/CH31/EX31.3/313.sce
@@ -0,0 +1,21 @@
+clc;
+//Example 31.3
+//page no 493
+printf("Example 31.3 page no 493\n\n");
+//friction factor for smooth tubes can be approximated by
+//f = 0.079*R_e^(-1/4),if 2000< R_e<2e-5
+// average velocity in the system ,involving the flow of water at 60 deg F is given by
+//v =sqrt(2180/(213.4R_e^(-1/4) + 10), flow of water at 60 deg F
+//R_e=12168v,putting this value and by simplifying we get
+v=poly(0,'v');
+f=213.5*v^2 +105.03*v- 22896.08*v
+//df=derivat(213.5*v^2 +105.03*v- 22896.08*v)
+df=- 22791.05 + 427*v
+v1=5
+f1=213.5*v1^2 +105.03*v1- 22896.08*v1// value of f at v=5
+df1=- 22791.05 + 427*v1//value of df at v=5
+v2=v1-(f1/df1)
+//by iteration we get values of v3,v4,v5,v6
+//at v6 result converges
+v6=10.09
+printf("\n v6=%f ft/s ",v6);
diff --git a/1052/CH31/EX31.4/314.sce b/1052/CH31/EX31.4/314.sce
new file mode 100755
index 000000000..a3302e40d
--- /dev/null
+++ b/1052/CH31/EX31.4/314.sce
@@ -0,0 +1,7 @@
+clc;
+//Example 31.4
+//page no 497
+printf("Example 31.4 page no 497\n\n")
+//integration
+I=integrate('(1-0.4*x^2)/((1-x)*(1-0.4*x)-1.19*x^2)','x',0,0.468)
+printf("\n I=%f ",I);