summaryrefslogtreecommitdiff
path: root/2873/CH3/EX3.20/Ex3_20.sce
diff options
context:
space:
mode:
Diffstat (limited to '2873/CH3/EX3.20/Ex3_20.sce')
-rwxr-xr-x2873/CH3/EX3.20/Ex3_20.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/2873/CH3/EX3.20/Ex3_20.sce b/2873/CH3/EX3.20/Ex3_20.sce
new file mode 100755
index 000000000..2d7abfd56
--- /dev/null
+++ b/2873/CH3/EX3.20/Ex3_20.sce
@@ -0,0 +1,15 @@
+// Display mode
+mode(0);
+// Display warning for floating point exception
+ieee(1);
+clear;
+clc;
+disp("Engineering Thermodynamics by Onkar Singh Chapter 3 Example 20")
+v1=0;//initial volume of air inside bottle in m^3
+v2=0.5;//final volume of air inside bottle in m^3
+p=1.0135*10^5;//atmospheric pressure in pa
+disp("displacement work,W=p*(v1-v2)in N.m")
+W=p*(v1-v2)
+disp("so heat transfer(Q)in N.m")
+disp("Q=-W")
+Q=-W