summaryrefslogtreecommitdiff
path: root/557/CH2/EX2.5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /557/CH2/EX2.5
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 '557/CH2/EX2.5')
-rwxr-xr-x557/CH2/EX2.5/5.sce18
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)" );