summaryrefslogtreecommitdiff
path: root/542/CH3/EX3.4/Example_3_4.sci
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /542/CH3/EX3.4/Example_3_4.sci
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '542/CH3/EX3.4/Example_3_4.sci')
-rwxr-xr-x542/CH3/EX3.4/Example_3_4.sci51
1 files changed, 51 insertions, 0 deletions
diff --git a/542/CH3/EX3.4/Example_3_4.sci b/542/CH3/EX3.4/Example_3_4.sci
new file mode 100755
index 000000000..d44290385
--- /dev/null
+++ b/542/CH3/EX3.4/Example_3_4.sci
@@ -0,0 +1,51 @@
+clear;
+clc;
+printf("\n Example 3.4");
+v_particle = 6; //velocity of the particle in m/sec
+v_water = 1.2; //veloicity of the water in m/sec
+v_rel = v_particle - v_water;//relative velocity of particles relative to the fluid in m/sec
+Re1 = 6*10^(-3)*v_rel*1000/(1*10^(-3));//Re1 is the reynold's no.
+printf("\nReynold no. is %d",Re1);
+
+//When the particle has been retarded to a velocity such that Re=500
+ydot = (v_rel*500)/Re1;
+printf("\nParticle velocity is %.3f m/sec\n",ydot);
+c = 0.33/(6*10^(-3))*(1000/2500);
+f = sqrt((3*6*10^(-3)*(2500-1000)*9.81)/1000);
+function[y]=Fa(t)
+ y = (-1/22)*(log(cos(0.517*22*t) + 4.8/0.517*sin(0.517*22*t)));
+ funcprot(0);
+endfunction
+
+function[yd]=deriv(t)
+ yd= -0.083+(0.517*(9.28*cos(11.37*t) - sin(11.37*t))/(cos(11.37*t) + 9.28*sin(11.37*t)));
+ funcprot(0);
+endfunction
+
+function[ydd]=double_deriv(t)
+ ydd = -0.517*(11.37)^2*(9.28*cos(11.37*t) - sin(11.37*t))/(cos(11.37*t) + 9.28*sin(11.37*t));
+ funcprot(0);
+endfunction
+
+
+told = 0;
+while 1
+ tnew = told - deriv(told)/double_deriv(told);
+ if (tnew == told) then
+ y = Fa(told);
+ d = y;
+ printf("\nThe distance moved with speed less than 0.083m/sec is %.3fm",d);
+ t=told;
+ printf("\n The time taken by particle to move this distance is %.3fsec",t);
+ break;
+ end
+ told = tnew;
+end
+
+
+printf("\nThe distance moved by the particle relative to the walls of the plant %.3fm",1.2*t - d);
+
+
+
+
+