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 --- 647/CH9/EX9.18/Example9_18.sce | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 647/CH9/EX9.18/Example9_18.sce (limited to '647/CH9/EX9.18') 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 -- cgit