summaryrefslogtreecommitdiff
path: root/3685/CH10/EX10.7/Ex10_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '3685/CH10/EX10.7/Ex10_7.sce')
-rw-r--r--3685/CH10/EX10.7/Ex10_7.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/3685/CH10/EX10.7/Ex10_7.sce b/3685/CH10/EX10.7/Ex10_7.sce
new file mode 100644
index 000000000..45b16133b
--- /dev/null
+++ b/3685/CH10/EX10.7/Ex10_7.sce
@@ -0,0 +1,19 @@
+clc
+P1 = 300 // Initial gas pressure in kPa
+V1 = 0.07 // Initial volume of gas in m^3
+m = 0.25 // Mass of gas in kg
+T1 = 80 // Initial temperature of gas in degree Celsius
+R = (P1*V1)/(m*(T1+273)) // constant
+P2 = P1 // process condition
+V2 = 0.1 // Final volume in m^3
+T2 = (P2*V2)/(m*R) // Final temperature in K
+W = -25 //Work done in kJ
+cv = -W/(m*(T2-T1-273)) // Constant volume heat capacity in kJ/kg
+cp = R+cv //Constant pressure heat capacity in kJ/kg
+S21 = m*cp*log(V2/V1) // Entropy change
+printf("\n Example 10.7")
+printf("\n Cv of the gas is %f kJ/kg K",cv)
+printf("\n Cp of the gas is %f kJ/kg K",cp)
+printf("\n Increase in the entropy of the gas is %f kJ/kg K",S21)
+//The answers vary due to round off error
+