summaryrefslogtreecommitdiff
path: root/2510/CH3/EX3.12/Ex3_12.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2510/CH3/EX3.12/Ex3_12.sce
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 '2510/CH3/EX3.12/Ex3_12.sce')
-rwxr-xr-x2510/CH3/EX3.12/Ex3_12.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/2510/CH3/EX3.12/Ex3_12.sce b/2510/CH3/EX3.12/Ex3_12.sce
new file mode 100755
index 000000000..b6522f3d2
--- /dev/null
+++ b/2510/CH3/EX3.12/Ex3_12.sce
@@ -0,0 +1,16 @@
+//Variable declaration:
+//For the problem at hand, take as a basis 1 kilogram of water and assume the potential energy to be zero at ground level conditions.
+z1 = 0 //Intial height from ground level (m)
+z2 = 10 //Final height from ground level (m)
+PE1 = 0 //Initial potential energy at z1 (J)
+m = 1 //Mass of water (kg)
+g = 9.8 //Gravitational acceleration (m/s^2)
+gc = 1 //Conversion factor
+
+//Calculations:
+PE2 = m*(g/gc)*z2 //Final potential energy at z2 (J)
+
+//Result:
+disp("The potential energy of water is :")
+disp(PE2)
+disp("J ")