From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1919/CH2/EX2.7/Ex2_7.sce | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 1919/CH2/EX2.7/Ex2_7.sce (limited to '1919/CH2/EX2.7') diff --git a/1919/CH2/EX2.7/Ex2_7.sce b/1919/CH2/EX2.7/Ex2_7.sce new file mode 100755 index 000000000..0f57b2e59 --- /dev/null +++ b/1919/CH2/EX2.7/Ex2_7.sce @@ -0,0 +1,27 @@ +// Theory and Problems of Thermodynamics +// Chapter 2 +// First Law of Thermodynamics +// Example 7 + +clear ;clc; + +//Given data +T1 = 300 // initial temperature in K +P1 = 100 // initial pressure in kPa +P2 = 1.5 // initial pressure in MPa +r = 1.4 // r = CP/CV +n = 1.2 //P(V^1.2) = constant +R = 8.314 // gas constant in J/K + +// determine work done and energy transferred as heat +P2 = P2 * 1000 // units conversion MPa to kPa +V_12 = (P2/P1)^(1/1.2) //ratio of V1 and V2 +T2 = P2 * T1 / (P1 * V_12) // final temperature in K + +W = R * (T1 - T2)/(n-1); // work done on gas +W = W/1000; // units conversion J to kJ +Q = (R * (T1-T2)/(r-1))/1000 + W // energy transferred as heat + +// Results +mprintf('Work done on gas = %5.4f kJ', W) +mprintf('\n Energy transfered as heat = %5.3f kJ', Q) -- cgit