summaryrefslogtreecommitdiff
path: root/1919/CH5/EX5.13
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1919/CH5/EX5.13
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1919/CH5/EX5.13')
-rwxr-xr-x1919/CH5/EX5.13/Ex5_13.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/1919/CH5/EX5.13/Ex5_13.sce b/1919/CH5/EX5.13/Ex5_13.sce
new file mode 100755
index 000000000..f0d98174e
--- /dev/null
+++ b/1919/CH5/EX5.13/Ex5_13.sce
@@ -0,0 +1,24 @@
+
+// Theory and Problems of Thermodynamics
+// Chapter 5
+//Second Law of Thermodynamcis
+// Example 13
+
+clear ;clc;
+
+//Given data
+N = 1 // number of moles of nitrogen
+r = 1.4 // ratio of specific heats of nitrogen at 0.1 MPa and 300 K
+P1 = 0.1 // initial state pressure in MPa
+T1 = 300 // initial state temperature in K
+P2 = 0.5 // final state pressure in MPa
+T2 = 600 // final state temperature in K
+R = 8.314 // universal gas constant J/mol/K
+
+// Calculation for determining the change in the entrophy of nitrogen
+// del_S = N{Cp ln(T2/T1) - R ln(P2/P1)}
+del_S = N*{(R*r/(r -1))*log(T2/T1) - R*log(P2/P1)}
+
+// Output Results
+mprintf('The change in entrophy of nitrogen = %5.3f kJ/mol K' ,del_S)
+