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 /611/CH9/EX9.12/Chap9_Ex12_R1.sce | |
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 '611/CH9/EX9.12/Chap9_Ex12_R1.sce')
-rwxr-xr-x | 611/CH9/EX9.12/Chap9_Ex12_R1.sce | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/611/CH9/EX9.12/Chap9_Ex12_R1.sce b/611/CH9/EX9.12/Chap9_Ex12_R1.sce new file mode 100755 index 000000000..fd383d6c1 --- /dev/null +++ b/611/CH9/EX9.12/Chap9_Ex12_R1.sce @@ -0,0 +1,51 @@ +// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
+
+//Chapter-9,Example 12,Page 335
+//Title: Molar volume of mixture using van der Waals equation of state
+//================================================================================================================
+clear
+clc
+
+//INPUT
+T=600;//temperature of the equimolar n-butane and n-octane mixture in K
+P=16;//pressure of the equimolar n-butane and n-octane mixture in bar
+a_m=2.4405;//van der Waals constant for the mixture as determined in Example 9.8 in Pa(m^3/mol)^2
+b_m=0.1767*10^-3;//van der Waals constant for the mixture as determined in Example 9.8 in m^3/mol
+R=8.314;//universal gas constant in J/molK
+
+//CALCULATION
+//The problem is solved by using the Cardan's method
+A=(a_m*P*10^5)/(R*T)^2;//calculation of A to determine alpha,beeta and gaamma by using Eq.(3.25)
+B=(b_m*P*10^5)/(R*T);//calculation of B to determine alpha,beeta and gaamma by using Eq.(3.26)
+alpha=-1-B;//calculation of alpha for van der Waals equation of state using Table (3.2)
+beeta=A;//calculation of beeta for van der Waals equation of state using Table (3.2)
+gaamma=-(A*B);//calculation of gaamma for van der Waals equation of state using Table (3.2)
+p=beeta-((alpha^2)/3);//calculation of p to determine the roots of the cubic equaton using Eq.(3.29)
+q=((2*alpha^3)/27)-((alpha*beeta)/3)+gaamma;//calculation of q to determine the roots of the cubic equaton using Eq.(3.30)
+D=(((q)^2)/4)+(((p)^3)/27);//calculation of D to determine the nature of roots using Eq.(3.31)
+
+if D>0 then
+ Z=(((-(q)/2)+(sqrt(D)))^(1/3))+(((-(q)/2)-(sqrt(D)))^(1/3))-(alpha/3);//One real root given by Eq.(3.32)
+else if D==0 then
+ Z1=((-2*(q/2))^(1/3))-(alpha/3);//Three real roots and two equal given by Eq.(3.33)
+ Z2=((q/2)^(1/3))-(alpha/3);
+ Z3=((q/2)^(1/3))-(alpha/3);
+ Za=[Z1 Z2 Z3];
+ Z=max(Za);
+ else
+ r=sqrt((-(p^3)/27));//calculation of r using Eq.(3.38)
+ theta=acos((-(q)/2)*(1/r));//calculation of theta in radians using Eq.(3.37)
+ Z1=(2*(r^(1/3))*cos(theta/3))-(alpha/3);
+ Z2=(2*(r^(1/3))*cos(((2*%pi)+theta)/3))-(alpha/3);//Three unequal real roots given by Eqs.(3.34,3.35 and 3.36)
+ Z3=(2*(r^(1/3))*cos(((4*%pi)+theta)/3))-(alpha/3);
+ Za=[Z1 Z2 Z3];
+ Z=max(Za);
+ end
+end
+vm=(Z*R*T)/(P*10^5);//calculation of the molar volume of the equimolar mixture in m^3/mol
+
+//OUTPUT
+mprintf("\n The molar volume of an equimolar mixture of n-butane and n-octane at 600K and 16bar found using the van der Waals equation of state = %e m^3/mol\n",vm);
+
+//===============================================END OF PROGRAM===================================================
+// DISCLAIMER: VALUE OF Z COMPUTED IN PROGRAM IS NOT AS THAT REPORTED IN THE TEXTBOOK. HOWEVER, VALUES OF ALL OTHER PERTINENT VARIABLES A, B, alpha, beeta, p, q etc. AGREE WELL WITH THE TEXTBOOK ANSWER. COMPUTATION WAS ALSO VERIFIED MANUALLY AND GAVE THE ANSWER AS COMPUTED IN PROGRAM. ONE POSSIBLE REASON FOR DEVIATION COULD BE ROUND OFF ERROR.
|