diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /647/CH9/EX9.18 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '647/CH9/EX9.18')
-rwxr-xr-x | 647/CH9/EX9.18/Example9_18.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/647/CH9/EX9.18/Example9_18.sce b/647/CH9/EX9.18/Example9_18.sce new file mode 100755 index 000000000..66c6a0b23 --- /dev/null +++ b/647/CH9/EX9.18/Example9_18.sce @@ -0,0 +1,26 @@ +clear;
+clc;
+
+// Example: 9.18
+// Page: 364
+
+printf("Example: 9.18 - Page: 364\n\n");
+
+// Solution
+
+//*****Data******//
+n1 = 0.7;// [moles of helium]
+n2 = 0.3;// [moles of argon]
+R = 8.314;// [J/mol K]
+T = 273 + 25;// [K]
+//******************//
+
+n = n1 + n2;// [total moles]
+x1 = n1/n;// [mole fraction of helium]
+x2 = n2/n;// [mole fraction of argon]
+deltaG_mix = n*R*T*(x1*log(x1) + x2*log(x2));// [J]
+printf("The free energy change of mixing is %.2f J\n",deltaG_mix);
+
+// Since the gases are ideal:
+deltaH_mix = 0;// [J]
+printf("The enthalpy change of mixing is %d J\n",deltaH_mix);
\ No newline at end of file |