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 | |
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')
23 files changed, 406 insertions, 0 deletions
diff --git a/1019/CH5/EX5.1/Example_5_1.sce b/1019/CH5/EX5.1/Example_5_1.sce new file mode 100644 index 000000000..1730cf510 --- /dev/null +++ b/1019/CH5/EX5.1/Example_5_1.sce @@ -0,0 +1,15 @@ +//Example 5.1
+clear;
+clc;
+
+//Given
+n=4;//moles of gas
+P1=2.02;//initial pressure in 10^5 N m^-2
+P2=4.04;//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 the free energy change delG
+delG=n*R*T*log(P2/P1);//the free energy change in J
+mprintf('Free energy change = %f J',delG);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.10/Example_5_10.sce b/1019/CH5/EX5.10/Example_5_10.sce new file mode 100644 index 000000000..81e44af29 --- /dev/null +++ b/1019/CH5/EX5.10/Example_5_10.sce @@ -0,0 +1,16 @@ +//Example 5.10
+clear;
+clc;
+
+//Given
+delG=18660-(14.4*T*log10(T))-(6.07*T)+(8.24*(10^(-3))*(T^2));//delGo in J mol^-1 in terms of temperature T in K
+T1=298//temperature in K
+
+//To determine delGo delSo and delHo
+delGo=18660-(14.4*T1*log10(T1))-(6.07*T1)+(8.24*(10^(-3))*(T^2));
+delHo=18660+(6.25*T1)-(8.24*10^(-3)*(T1^2));
+delSo=(delHo-delGo)/T1;
+mprintf('(i) delGo = %f J mol^-1',delGo);
+mprintf('\n (ii) delSo = %f J K^-1 mol^-1',delSo);
+mprintf('\n (iii) delHo = %f J mol^-1',delHo);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.11/Example_5_11.sce b/1019/CH5/EX5.11/Example_5_11.sce new file mode 100644 index 000000000..190934397 --- /dev/null +++ b/1019/CH5/EX5.11/Example_5_11.sce @@ -0,0 +1,19 @@ +//Example 5.11
+clear;
+clc;
+
+//Given
+DHoHH=435;//Bond dissociation energy of H-H bond in kJ mol^-1
+DHoClCl=240;//Bond dissociation energy of Cl-Cl bond in kJ mol^-1
+DHoHCl=430;//Bond dissociation energy of H-Cl bond in kJ mol^-1
+SoH2=130.59;//Standard entropy of hydrogen molecule in J K^- mol^-1
+SoCl2=222.95;//Standard entropy of chlorine molecule J K^- mol^-1
+SoHCl=186.68;//Standard entropy of HCl molecule J K^- mol^-1
+T=298;//Temperature in K
+
+//To determine the free energy change
+delHo=DHoHH+DHoClCl-(2*DHoHCl);
+delSo=(SoHCl*2)-SoCl2-SoH2;
+delGo=delHo-(T*delSo*10^(-3));
+mprintf('Free energy change = %f kJ',delGo);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.12/Example_5_12.sce b/1019/CH5/EX5.12/Example_5_12.sce new file mode 100644 index 000000000..056a5a6f0 --- /dev/null +++ b/1019/CH5/EX5.12/Example_5_12.sce @@ -0,0 +1,21 @@ +//Example 5.12
+clear;
+clc;
+
+//Given
+HfNH4NO3=-365;//enthalpy of formation of NH4OH in kJ mol^-1
+HfH2=0;//enthalpy of formation of H2 in kJ mol^-1
+HfH2O=-242;//enthalpy of formation of H2O in kJ mol^-1
+HfN2H4=50;//enthalpy of formation of N2H4 in kJ mol^-1
+SoNH4NO3=150;//Standard entropy of NH4NO3 molecule in J K^- mol^-1
+SoH2=130;//Standard entropy of Hydrogen molecule J K^- mol^-1
+SoH2O=189;//Standard entropy of H2O molecule J K^- mol^-1
+SoN2H4=120;//Standard entropy of N2H4 molecule J K^- mol^-1
+T=298;//Temperature in K
+
+//To determine the free energy change
+delHo=(3*HfH2O)+HfN2H4-HfNH4NO3-(3*HfH2);
+delSo=(SoH2O*3)+SoN2H4-SoNH4NO3-(3*SoH2);
+delGo=delHo-(T*delSo*10^(-3));
+mprintf('Free energy change = %f kJ',delGo);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.13/Example_5_13.sce b/1019/CH5/EX5.13/Example_5_13.sce new file mode 100644 index 000000000..fdc678ded --- /dev/null +++ b/1019/CH5/EX5.13/Example_5_13.sce @@ -0,0 +1,14 @@ +//Example 5.13
+clear;
+clc;
+
+//Given
+T=300;//temperature in K
+delVg=-1.5;//moles of gaseous product-moles of gaseous reactant
+R=8.314;//gas constant in J K^-1 mol^-1
+
+//To determine the difference between delG and delA
+a=delG-delA;//assume
+a=delVg*R*T;//difference between delG and delA in J
+mprintf('delG - delA = %f J mol^-1',a);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.14/Example_5_14.sce b/1019/CH5/EX5.14/Example_5_14.sce new file mode 100644 index 000000000..1d1b03ce6 --- /dev/null +++ b/1019/CH5/EX5.14/Example_5_14.sce @@ -0,0 +1,12 @@ +//Example 5.14
+clear;
+clc;
+
+//Given
+delGo1=-29.2;//delGo value for hydrolysis of creatine phosphate in kJ
+delGo2=-12.4;//delGo value for hydrolysis of glucose phosphate in kJ
+
+//To determine delGo for given reaction
+delGo3=delGo2-delGo1;//gibbs free energy in kJ
+mprintf('delGo for the given reaction = %f kJ',delGo3);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.16/Example_5_16.sce b/1019/CH5/EX5.16/Example_5_16.sce new file mode 100644 index 000000000..7f59ba985 --- /dev/null +++ b/1019/CH5/EX5.16/Example_5_16.sce @@ -0,0 +1,13 @@ +//Example 5.16
+clear;
+clc;
+
+//Given
+delE=-2880;//internal energy in kJ mol^-1
+delS=182.4;//Entropy in J K^-1 mol^-1
+T=298;//Temperature in K
+
+//To determine delA
+delA=delE-(T*delS*0.001);//helmoltz free energy in kJ mol^-1
+mprintf('The amount of energy that can be extracted as heat = %f kJ mol^-1',delA);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.17/Example_5_17.sce b/1019/CH5/EX5.17/Example_5_17.sce new file mode 100644 index 000000000..f8ddc53d2 --- /dev/null +++ b/1019/CH5/EX5.17/Example_5_17.sce @@ -0,0 +1,12 @@ +//Example 5.17
+clear;
+clc;
+
+//Given
+delGo1=3.0;//delGo value for conversion of malate to fumarate in kJ
+delGo2=-15.5;//delGo value for conversion of fumarate to asparate in kJ
+
+//To determine delGo for given reaction
+delGo3=delGo2+delGo1;//net free energy change for the required reaction in kJ
+mprintf('delGo for the conversion of malate to asparate = %f kJ',delGo3);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.18/Example_5_18.sce b/1019/CH5/EX5.18/Example_5_18.sce new file mode 100644 index 000000000..5e0b4581c --- /dev/null +++ b/1019/CH5/EX5.18/Example_5_18.sce @@ -0,0 +1,16 @@ +//Example 5.18
+clear;
+clc;
+
+//Given
+delHv=40820;//latent heat of vapourization of water in J mol^-1
+Vv=30.199;//volume of vapour in dm^3 mol^-1
+Vl=0.019;//volume of liquid in dm^3 mol^-1
+T=373;//temperature in K
+
+//To determine the change in boiling point with change in 1 mm pressure
+delVm=Vv-Vl;
+a=(delHv*760)/(T*delVm*0.001*101325);//a=(dP/dT)
+b=a^(-1);//b=(dT/dP)
+mprintf('change in boiling point of water per mm change in pressure=%f K mm^-1',b);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.19/Example_5_19.sce b/1019/CH5/EX5.19/Example_5_19.sce new file mode 100644 index 000000000..e6d9dafee --- /dev/null +++ b/1019/CH5/EX5.19/Example_5_19.sce @@ -0,0 +1,15 @@ +//Example 5.19
+clear;
+clc;
+
+//Given
+delHf=128.6;//latent heat of fusion of benzene in J g^-1
+Vs=1.06;//volume of solid in cm^3 g^-1
+Vl=1.119;//volume of liquid in cm^3 g^-1
+T=278;//temperature in K
+
+//To determine the pressure to bring about a change in melting point by 1 K
+delVm=Vl-Vs;//change in volume in cm^3 g^-1
+a=(delHf*10)/(T*delVm*1.01325);//a=(dP/dT)
+mprintf('To cause an increase of 1K in melting point of benzene,atmospheric pressure change required=%f atm K^-1',a);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.2/Example_5_2.sce b/1019/CH5/EX5.2/Example_5_2.sce new file mode 100644 index 000000000..f13075a95 --- /dev/null +++ b/1019/CH5/EX5.2/Example_5_2.sce @@ -0,0 +1,13 @@ +//Example 5.2
+clear;
+clc;
+
+//Given
+n=2;//number of electrons transferred
+E=1.1;//cell potential in volt
+F=96500;//Farady charge in C
+
+//To determine the free energy change delG
+delG=-n*F*E;//the free energy change in J
+mprintf('Free energy change for Daniell Cell = %f J',delG);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.20/Example_5_20.sce b/1019/CH5/EX5.20/Example_5_20.sce new file mode 100644 index 000000000..5a49afdc4 --- /dev/null +++ b/1019/CH5/EX5.20/Example_5_20.sce @@ -0,0 +1,16 @@ +//Example 5.20
+clear;
+clc;
+
+//Given
+delHf=335;//latent heat of fusion in J g^-1
+Vs=1.0908;//volume of solid in cm^3 g^-1
+Vl=1.0002;//volume of liquid in cm^3 g^-1
+T=273;//temperature in K
+
+//To determine the decrease in melting point with increase in pressure
+delVm=Vl-Vs;//volume change in cm^3 g^-1
+a=(delHf*10)/(T*delVm*1.01325);//a=(delP/delT)
+b=a^(-1);//b=(delT/delP)
+mprintf('An increase in pressure of 1 atm lowers the freezing point by %f K atm^-1',b);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.21/Example_5_21.sce b/1019/CH5/EX5.21/Example_5_21.sce new file mode 100644 index 000000000..80ce60377 --- /dev/null +++ b/1019/CH5/EX5.21/Example_5_21.sce @@ -0,0 +1,14 @@ +//Example 5.21
+clear;
+clc;
+
+//Given
+delHtrans=13.4;//latent heat of fusion in J g^-1
+delVm=0.0126;//change in volume due to transition in cm^3 g^-1
+T=368.5;//temperature in K
+
+//To determine the increase in the transition point between 2 forms of sulphur for increase in atmospheric pressure
+a=(delHtrans*10)/(T*delVm*1.01325);//a=(delP/delT)
+b=a^(-1);//b=(delT/delP)
+mprintf('The transition point between 2 forms of sulphur should be increased by %f K atm^-1',b);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.22/Example_5_22.sce b/1019/CH5/EX5.22/Example_5_22.sce new file mode 100644 index 000000000..226a97a82 --- /dev/null +++ b/1019/CH5/EX5.22/Example_5_22.sce @@ -0,0 +1,14 @@ +//Example 5.22
+clear;
+clc;
+
+//Given
+//log10(P)=(-834.13/T)+(1.75*log(T))-(8.375*0.001*T)+5.3234 pressure in mm of Hg as a function og temperature in K
+Tb=169.25;//boiling point of ethylene in K
+R=8.314;//gas constant in J K^-1 mol^-1
+
+//To determine latent heat of vapourization delHv
+//delHv=R*(T^2)*(dlogP/dT) by clausius clapeyron equation
+delHv=((-R*834.13*2.303)+(1.75*R*Tb*2.303)-(8.375*2.303*0.001*R*(Tb^2)))*0.001;//latent heat of vapourization in kJ
+mprintf('The latent heat of vapourization delHv of ethylene = %f kJ mol^-1',delHv);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.23/Example_5_23.sce b/1019/CH5/EX5.23/Example_5_23.sce new file mode 100644 index 000000000..b47aa79b1 --- /dev/null +++ b/1019/CH5/EX5.23/Example_5_23.sce @@ -0,0 +1,13 @@ +//Example 5.23
+clear;
+clc;
+
+//Given
+//log10(P)=-(1246.038/(t+221.354))+6.95926 vapour pressure in mm Hg as a function of temperature in oC
+T=298;//temperature in K
+
+//To determine the delHv
+//delHv=R*(T^2)*(dlogP/dT) by clausius clapeyron equation
+delHv=((2.303*1246.038*R*(T^2))/((T-51.796)^2))*0.001;//latent heat of vapourization in kJ mol^-1
+mprintf('The latent heat of vapourization delHv of thiophene = %f kJ mol^-1',delHv);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.24/Example_5_24.sce b/1019/CH5/EX5.24/Example_5_24.sce new file mode 100644 index 000000000..4f8c46e1d --- /dev/null +++ b/1019/CH5/EX5.24/Example_5_24.sce @@ -0,0 +1,20 @@ +//Example 5.24
+clear;
+clc;
+
+//Given
+p1=10;//vapour pressure of decane in Torr at temperature T1 K
+p2=400;//vapour pressure of decane in Torr at temperature T2 K
+T1=328.85;//initial temperature in K
+T2=423.75;//final temperature in K
+T=373;//temperature in K
+R=8.314;//gas constant in J K^-1 mol^-1
+
+//To determine the delHv,Tb,delSv
+delHv=(T1*T2*R*log(p2/p1))/94.9;//integrated form of clausius clapeyron equation
+delSv=delHv/T;//entrpoy change during vapourization in J K^-1 mol^-1
+Tb=((((R*2.303*log10(76))/delHv)+(1/T1))^(-1))+186;//boiling temperature in K
+mprintf('delHv = %f J mol^-1',delHv);
+mprintf('\n delSv = %f J K^-1 mol^-1',delSv);
+mprintf('\n Tb = %f K',Tb);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.25/Example_5_25.sce b/1019/CH5/EX5.25/Example_5_25.sce new file mode 100644 index 000000000..a3c473480 --- /dev/null +++ b/1019/CH5/EX5.25/Example_5_25.sce @@ -0,0 +1,20 @@ +//Example 5.25
+clear;
+clc;
+
+//Given
+p1=10;//vapour pressure in mm Hg at temperature T1 K
+p2=40;//vapour pressure in mm Hg at temperature T2 K
+T1=358.95;//initial temperature in K
+T2=392.45;//final temperature in K
+Ts=325.75;//surrounding temperature in K
+R=8.314;//gas constant in J K^-1 mol^-1
+ps=1;//
+//To determine the delHv,Tb,delSv
+delHv=(T1*T2*R*log(p2/p1))/33.5;//integrated form of clausius clapeyron equation
+Tb=((1/T1)-(19.147*log10(76)/delHv))^(-1);//boiling temperature in K
+delSv=delHv/Tb;//entropy in vapourization in J K^-1 mol^-1
+mprintf('(i) delHv = %f J mol^-1',delHv);
+mprintf('\n (ii) Tb = %f K',Tb);
+mprintf('\n (iii) delSv = %f J K^-1 mol^-1',delSv);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.3/Example_5_3.sce b/1019/CH5/EX5.3/Example_5_3.sce new file mode 100644 index 000000000..d1d639158 --- /dev/null +++ b/1019/CH5/EX5.3/Example_5_3.sce @@ -0,0 +1,19 @@ +//Example 5.3
+clear;
+clc;
+
+//Given
+n=2;//number of electrons transferred
+E=1.01463;//cell potential in V
+F=96500;//Farady charge in C
+T=298;//temperature in K
+p=-5*(10^(-5));//p=(delE/delT)p in V K^-1
+
+//To determine the free energy change delG
+delG=-n*F*E;//the free energy change in J
+mprintf('delG for Westron Cell = %f J',delG);
+delS=n*F*(p);//entropy change in J mol^-1
+mprintf('\n delS for Westron Cell = %f J K^-1',delS);
+delH=delG+(T*delS);//enthalpy change in J
+mprintf('\n delH for Westron Cell = %f J',delH);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.4/Example_5_4.sce b/1019/CH5/EX5.4/Example_5_4.sce new file mode 100644 index 000000000..fe910cd37 --- /dev/null +++ b/1019/CH5/EX5.4/Example_5_4.sce @@ -0,0 +1,27 @@ +//Example 5.4
+clear;
+clc;
+
+//Given
+n=1;//moles of gas
+V1=2;//initial volume in dm^3
+V2=20;//final volume in dm^3
+R=8.314;//gas constant in J K^-1 mol^-1
+T=300//temperature in K
+
+//To determine q,w,delE,delA,delG and delS
+w=-R*T*log(V2/V1);//work done 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(V2/V1);//helmoltz free energy in J
+delG=n*R*T*log(V1/V2);//Gibbs free energy in J
+delS=q/T;//entropy change in J K^-1
+mprintf('(i) w = %f J mol^-1',w);
+mprintf('\n (ii) delE = %f J since it is isothermal expansion of an ideal gas',delE);
+mprintf('\n (iii) q = %f J mol^-1',q);
+mprintf('\n (iv) delH = %f J mol^-1',delH);
+mprintf('\n (v) delA = %f J mol^-1',delA);
+mprintf('\n (vi) delG = %f J mol^-1',delG);
+mprintf('\n (vii) delS = %f J K^-1 mol^-1',delS);
+//end
\ No newline at end of file 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 diff --git a/1019/CH5/EX5.6/Example_5_6.sce b/1019/CH5/EX5.6/Example_5_6.sce new file mode 100644 index 000000000..e1f1a8b55 --- /dev/null +++ b/1019/CH5/EX5.6/Example_5_6.sce @@ -0,0 +1,24 @@ +//Example 5.6
+clear;
+clc;
+
+//Given
+n=1;//moles of toluene
+P=1;//pressure in atm
+R=8.314;//gas constant in J K^-1 mol^-1
+T=384//temperature in K
+delHv=363.3;//latent heat of vapourization in J g^-1
+
+//To determine q,delH,delG,delE and delS
+w=R*T;// work done in J
+qp=delHv*(n*92);
+delE=qp-w;//internal energy change in J
+delH=qp;//enthalpy change in J
+delG=0;//gibbs free energy in J
+delS=delH/T;//entropy change in J K^-1
+mprintf('(i) delE = %f J mol^-1 ',delE);
+mprintf('\n (ii) q = %f J mol^-1',qp);
+mprintf('\n (iii) delH = %f J mol^-1',delH);
+mprintf('\n (iv) delG = %f J mol^-1',delG);
+mprintf('\n (v) delS of system = %f J K^-1 mol^-1',delS);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.7/Example_5_7.sce b/1019/CH5/EX5.7/Example_5_7.sce new file mode 100644 index 000000000..4a82bb5ca --- /dev/null +++ b/1019/CH5/EX5.7/Example_5_7.sce @@ -0,0 +1,16 @@ +//Example 5.7
+clear;
+clc;
+
+//Given
+P1=2.15;//vapour pressure of water in mm of Hg
+P2=1.95;//vapour pressure of ice in mm of Hg
+R=8.314;//gas constant in J K^-1 mol^-1
+T=263//temperature in K
+
+//To determine the free energy change delG
+delG=R*T*log(P2/P1);//gibbs free energy in J mol^-1
+mprintf('(i) Free energy change = 0 J mol^-1');
+mprintf('\n (ii) Free energy change = %f J mol^-1',delG);
+mprintf('\n (iii) Total Free energy change = %f J mol^-1',delG);
+//end
\ No newline at end of file diff --git a/1019/CH5/EX5.9/Example_5_9.sce b/1019/CH5/EX5.9/Example_5_9.sce new file mode 100644 index 000000000..f4923f89c --- /dev/null +++ b/1019/CH5/EX5.9/Example_5_9.sce @@ -0,0 +1,28 @@ +//Example 5.9
+clear;
+clc;
+
+//Given
+Cpl=75.4;//heat capacity of water in J K^-1 mol^-1
+Cpv=33.2;//heat capacity of water vapour in J K^-1 mol^-1
+R=8.314;//gas constant in J K^-1 mol^-1
+T=300//temperature in K
+delHv=40850;//latent heat of vapourization in J mol^-1
+Tb=373;//boiling point of water in K
+P1=101325;//initial pressure in Pa
+P2=10132.5;//final pressure in Pa
+
+//To determine the free energy change delG
+delH1=Cpl*(Tb-T);//enthalpy change during 1st step in J
+delS1=Cpl*log(Tb/T);//entropy change during 1st step in J K^-1
+delH2=delHv;//enthalpy change during 2nd step in J
+delS2=delHv/Tb;//entropy change during 2nd step in J K^-1
+delH3=Cpv*(T-Tb);//enthalpy change during 3rd step in J
+delS3=Cpv*log(T/Tb);//entropy change during 3rd step in J K^-1
+delH4=0;//enthalpy change during final step in J
+delS4=R*log(P1/P2);//entropy change during final step in J K^-1
+delH=delH1+delH2+delH3+delH4;//total enthalpy in J
+delS=delS1+delS2+delS3+delS4;//total entropy change in J
+delG=delH-(T*delS);//gibbs free energy change in J
+mprintf('Free energy change = %f J mol^-1',delG);
+//end
\ No newline at end of file |