summaryrefslogtreecommitdiff
path: root/555/CH1/EX1.1/1.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /555/CH1/EX1.1/1.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '555/CH1/EX1.1/1.sce')
-rw-r--r--555/CH1/EX1.1/1.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/555/CH1/EX1.1/1.sce b/555/CH1/EX1.1/1.sce
new file mode 100644
index 000000000..725617258
--- /dev/null
+++ b/555/CH1/EX1.1/1.sce
@@ -0,0 +1,16 @@
+// Implementation of example 1.1
+// Basic and Applied Thermodynamics by P.K.Nag
+// page 20
+clc
+clear
+
+z=562 // (difference in height of mercury in two limbs in mm)
+g=9.79 // (acceleration due to gravity in m/s^2)
+z0=761 // (barometer reading in mm Hg)
+d=13640 // (density of mercury in kg/m^3)
+
+// p= p0 + (d*g*z) & p0=(d*g*z)so
+p=(d*g)*(z+z0)/1000; // division by 1000 is done to convert mm to m
+p=(p/100000); // here division by 100000 is done to convert kPa to atm
+printf("The gas pressure = %.2f bar",p);
+// end \ No newline at end of file