diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3685/CH7/EX7.7/Ex7_7.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3685/CH7/EX7.7/Ex7_7.sce')
-rw-r--r-- | 3685/CH7/EX7.7/Ex7_7.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/3685/CH7/EX7.7/Ex7_7.sce b/3685/CH7/EX7.7/Ex7_7.sce new file mode 100644 index 000000000..89200fe6a --- /dev/null +++ b/3685/CH7/EX7.7/Ex7_7.sce @@ -0,0 +1,21 @@ +clc
+P1 = 0.5 // Initial pressure in MPa
+V1 = 0.2 // Initial volume in m^3
+V2 = 0.05 // Final volume in m^3
+n = 1.3 // Polytropic index
+
+
+printf("\n Example 7.7")
+P2 = P1*(V1/V2)^n
+function y = f(p)
+ y = ((P1*V1^n)/p)^(1/n)
+endfunction
+H = integrate('f','p',P1,P2) // H = H2-H1
+U = H-(P2*V2-P1*V1)
+W12 = -U
+printf("\n Change in enthalpy is %f kJ",H*1e3)
+printf("\n Change in internal energy is %f kJ",U*1000)
+printf("\n The change in entropy and heat transfer are is %d kJ",0)
+printf("\n The work transfer during the process is %f kJ",W12*1000)
+//The answers vary due to round off error
+
|