diff options
author | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:38:01 +0530 |
commit | f35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch) | |
tree | eb72842d800ac1233e9d890e020eac5fd41b0b1b /557 | |
parent | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff) | |
download | Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2 Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip |
updated the code
Diffstat (limited to '557')
-rwxr-xr-x | 557/CH2/EX2.10/10.sce | 46 | ||||
-rwxr-xr-x | 557/CH24/EX24.2/2.sce | 42 |
2 files changed, 44 insertions, 44 deletions
diff --git a/557/CH2/EX2.10/10.sce b/557/CH2/EX2.10/10.sce index 7756eae0d..68ce7f130 100755 --- a/557/CH2/EX2.10/10.sce +++ b/557/CH2/EX2.10/10.sce @@ -1,24 +1,24 @@ -clc ;funcprot(0);
-//Example 2.10
-
-//Initializing the variables
-phi = 30; //30 degree
-h = 1.2 ; // Height of tank
-l = 2; // Length of tank
-
-//Calculations
-function[Theta]=SurfaceAngle(a,phi)
- Theta = atand(-a*cosd(phi)/(g+a*sind(phi)));
-endfunction
-
-//case (a) a = 4
-disp(tand(SurfaceAngle(4,phi)),"Tan of Angle between surface of fluid and horizontal :");
-disp(180 + SurfaceAngle(4,phi),"ThetaA (degree):");
-
-//Case (b) a = - 4.5
-tanThetaR = tand(SurfaceAngle(-4.5,phi));
-disp(tanThetaR,"Tan of Angle between surface of fluid and horizontal :");
-disp(SurfaceAngle(-4.5,phi),"ThetaR (degree):");
-
-Depth = h - l*tanThetaR/2;
+clc ;funcprot(0); +//Example 2.10 + +//Initializing the variables +phi = 30; //30 degree +h = 1.2 ; // Height of tank +l = 2; // Length of tank +g = 9.81; +//Calculations +function[Theta]=SurfaceAngle(a,phi) + Theta = atand(-a*cosd(phi)/(g+a*sind(phi))); +endfunction + +//case (a) a = 4 +disp(tand(SurfaceAngle(4,phi)),"Tan of Angle between surface of fluid and horizontal :"); +disp(180 + SurfaceAngle(4,phi),"ThetaA (degree):"); + +//Case (b) a = - 4.5 +tanThetaR = tand(SurfaceAngle(-4.5,phi)); +disp(tanThetaR,"Tan of Angle between surface of fluid and horizontal :"); +disp(SurfaceAngle(-4.5,phi),"ThetaR (degree):"); + +Depth = h - l*tanThetaR/2; disp(Depth,"Maximum Depth of tank (m):");
\ No newline at end of file diff --git a/557/CH24/EX24.2/2.sce b/557/CH24/EX24.2/2.sce index f10793fdc..ff1777747 100755 --- a/557/CH24/EX24.2/2.sce +++ b/557/CH24/EX24.2/2.sce @@ -1,22 +1,22 @@ -clc; funcprot(0);
-//Example 24.2
-
-//Initializing the variables
-H_friction = 2.4;
-H_at = 10.3;
-Hs = 1.5;
-L =2;
-f = 0.01;
-d = 0.05;
-g = 9.81;
-Ds = 0.4; // Diameter of stroke
-Db = 0.15; // Diameter of bore
-r = 0.2;
-
-//Calculations
-A = %pi*(Db)^2/4;
-a = %pi*(Dd)^2/4;
-W= sqrt((H_at - Hs - H_friction )*(2*d*g/(4*f*L)))*(a/A)*(%pi/r);
-W_rev = W/(2*%pi)*60; // maximum rotation speed in rev/min
-
+clc; funcprot(0); +//Example 24.2 + +//Initializing the variables +H_friction = 2.4; +H_at = 10.3; +Hs = 1.5; +L =2; +f = 0.01; +d = 0.05; +g = 9.81; +Ds = 0.4; // Diameter of stroke +Db = 0.15; // Diameter of bore +r = 0.2; + +//Calculations +A = %pi*(Db)^2/4; +a = %pi*(Ds)^2/4; +W= sqrt((H_at - Hs - H_friction )*(2*d*g/(4*f*L)))*(a/A)*(%pi/r); +W_rev = W/(2*%pi)*60; // maximum rotation speed in rev/min + disp(W_rev-40, "Increase in speed (rev/min):");
\ No newline at end of file |