diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1019/CH5/EX5.5/Example_5_5.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '1019/CH5/EX5.5/Example_5_5.sce')
-rw-r--r-- | 1019/CH5/EX5.5/Example_5_5.sce | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/1019/CH5/EX5.5/Example_5_5.sce b/1019/CH5/EX5.5/Example_5_5.sce new file mode 100644 index 000000000..9dee08ec8 --- /dev/null +++ b/1019/CH5/EX5.5/Example_5_5.sce @@ -0,0 +1,29 @@ +//Example 5.5
+clear;
+clc;
+
+//Given
+n=1;//moles of gas
+P1=10.1;//initial pressure in 10^5 N m^-2
+P2=1.01;//final pressure in 10^5 N m^-2
+R=8.314;//gas constant in J K^-1 mol^-1
+T=300//temperature in K
+
+//To determine delE,delH,delA;delG and delS
+w=0;//since the gas expands against zero pressure
+delG=n*R*T*log(P2/P1);//gibbs free energy in J
+delE=0;//isothermal expansion of ideal gas
+q=delE-w;//by 1st Law of thermodynamics
+delH=0;//delH=delE+del(n*R*T) and both are 0
+delA=n*R*T*log(P2/P1);//Helmoltz free energy in J
+delS=R*log(P2/P1);//entropy change in J K^-1
+delSsurr=0;//entropy of the surrounding
+delSuniv=delS+delSsurr;//entropy of the universe in J K^-1
+mprintf('(i) delE = %f J mol^-1 since it is isothermal expansion of an ideal gas',delE);
+mprintf('\n (ii) q = %f J mol^-1',q);
+mprintf('\n (iii) delH = %f J mol^-1',delH);
+mprintf('\n (iv) delA = %f J mol^-1',delA);
+mprintf('\n (v) delG = %f J mol^-1',delG);
+mprintf('\n (vi) delS of system = %f J K^-1 mol^-1',delS);
+mprintf('\n (vii) delS of universe = %f J K^-1 mol^-1',delSuniv);
+//end
\ No newline at end of file |