diff options
Diffstat (limited to '557/CH2/EX2.5')
-rwxr-xr-x | 557/CH2/EX2.5/5.sce | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/557/CH2/EX2.5/5.sce b/557/CH2/EX2.5/5.sce new file mode 100755 index 000000000..e20c9c94d --- /dev/null +++ b/557/CH2/EX2.5/5.sce @@ -0,0 +1,18 @@ +clc ;funcprot(0);
+//Example 2.5
+
+//Initializing the variables
+p = 350*10^3; //Gauge Pressure
+pAtm = 101.3*10^3; //Atmospheric Pressure
+rhoW = 1000; //Density of Water
+sigma = 13.6; //Relative Density of Mercury
+g = 9.81;//Acceleration due to gravity
+
+//Calculations
+function[head]=Head(rho)
+ head = p/(rho*g);
+endfunction
+rhoM = sigma*rhoW;
+pAbs = p + pAtm;
+
+disp(pAbs/1000,"Absolute pressure(kN/m2)",Head(rhoM),"Equivalent head of water (m):","Part (b)",Head(rhoW),"Equivalent head of water (m) :","Part (a)" );
|