Sei sulla pagina 1di 24

!

"#$%$&"' )


















CHEG231-010 Chemical Engineering Thermodynamics
Semester Project: Thermodynamic Properties of Methanol
Jessica Fernandes


!"#$%$&"' *

"#$%&'(%

1hls ro[ecL conLaln some of Lhe Lhermodynamlc properLles of MeLhanol
descrlblng lLs behavlor conslderlng dlfferenL equaLlons of sLaLe. A brlef lnLroducLlon
abouL meLhanol descrlbes Lhe compound and how ls lL applled on Lhe markeL . Serles
of MA1LA8 codes were used Lo ploL known equaLlons LhaL descrlbe Lhe sLaLe of a
compound ln dlfferenL ranges and changlng dlfferenL properLles. 1he eng-8oblnson
equaLlon of sLaLe was chosen Lo descrlbe Lhe Lhermodynamlc funcLlons of Lhe
meLhanol. 1he dlagrams lnclude Lhe real subsLance behavlor for pressure, molar
volume, enLhalpy, speclflc heaL capaclLy and consLanL enLropy coefflclenL. 1he
resulLs are very slmllar Lo expecLed, wlLh a devlaLlon because of Lhe hlgh acenLrlc
facLor value.


!"#$%$&"' +
)*%&+,-(%.+*

MeLhanol, also known as meLhyl alcohol ls Lhe mosL slmple alcohol. lL ls llghL,
colorless, flammable llquld aL room LemperaLure and has a characLerlsLlc odor
sllghLly slmllar Lo eLhanol. lL can be easlly flnd ln Lhe envlronmenL as lL occurs
naLurally, and qulckly breaks down ln boLh aeroblc and anaeroblc condlLlons. lL can
be obLalned from planLs, fossll fuels, and renewable resources llke blomass, landflll
gas, and even power planL emlsslons and CC
2
from Lhe aLmosphere.
1
AL sea level
(101.323 ka), meLhanol bolls aL 64.6 C and solldlfles aL -97.6 C .

1he crlLlcal polnL ls
aL 239 C , 8.084 Ma and lL presenLs crlLlcal molar volume equal Lo 117 cm
3
/mol. AL
20 C , lL presenLs denslLy of 0.7914 g/cc and vlscoslLy 0.380 c. 1he sLrucLure ls:

WlLh chemlcal formula CP
3
CP or CP
4
C , Lhe molecular welghL ls 32.04
g/mol.
2
AL Lhe Lrlple polnL Lhe LemperaLure ls -97.34 C, Lhe pressure ls 0.1863 a
and Lhe denslLy ln llquld phase ls 904.33 kg/m
3
.
3
Consldered one of Lhe mosL versaLlle compounds developed, lL ls Lhe basls
for a large amounL of chemlcals , commodlLles and vlLal producLs LhaL we see on our
dally rouLlne. lL ls Lhe second mosL shlpped maLerlal all around Lhe globe every year.
MeLhanol ls used commonly as chemlcal solvenL, LransporLaLlon fuel as lL has a hlgh
ocLane raLlng LhaL allows for superlor vehlcle performance compared Lo gasollne, on
wasLewaLer denlLrlflcaLlon, on blodlesel LransesLerlflcaLon converLlng Lhe
Lrlglycerldes ln dlfferenL Lypes of olls lnLo usable blodlesel fuel, for energy
generaLlon as Lhe fuel source Lo creaLe sLeam Lo drlve Lurblnes, and ln Lhe
developmenL of dlfferenL Lypes of fuel cells because lL ls an ldeal hydrogen carrler. lL
ls ofLen converLed lnLo formaldehyde, aceLlc acld and oleflns LhaL are Lhe basls for
producLs such as plasLlcs, synLheLlc flbers, palnLs, solvenLs, refrlgeranLs, eLc.

Cur compound blodegrades easlly ln waLer and soll. osslble LreaLmenLs for
accldenL spllls lnclude blologlcal degradaLlon, reverse osmosls, carbon adsorpLlon,
sLeam sLrlpplng and alr sLrlpplng. MeLhanol occurs naLurally durlng Lhe
decomposlLlon of dlfferenL planL and anlmal llfe, and we come lnLo conLacL wlLh lL
!"#$%$&"' ,
every day ln frulLs, [ulces, and even wlne. 1hough larger quanLlLles of meLhanol can
be Loxlc lf lngesLed, Lhls naLurally occurlng molecule has a very low lmpacL when
released lnLo Lhe envlronmenL because of how qulckly lL blodegrades.
When meLhanol ls released lnLo Lhe envlronmenL lL rapldly breaks down lnLo
oLher compounds, ls compleLely mlsclble ln waLer, and serves as food for a number
of dlfferenL bacLerla.
1he lndusLry ls made up of large and small companles LhaL produce meLhanol
all over Lhe world and Lhousands of dlsLrlbuLors, Lechnology lnnovaLors, downsLream
manufacLurers and servlce provlders. Some companles LhaL are parL or Lhls lndusLry
parLlclpaLe from assoclaLlons llke: lnLernaLlonal MeLhanol roducers and Consumers
AssoclaLlon, naLlonal eLrochemlcal 8eflners AssoclaLlon, WaLer LnvlronmenL
lederaLlon, luel Cell & Pydrogen Lnergy AssoclaLlon, ueWlLL & Company lnc.,
Chemlcal MarkeL AssoclaLes, lnc., Culf eLrochemlcals and Chemlcals AssoclaLlon,
naLlonal 8lodlesel 8oard.
4

!"#$%$&"' -
/0%1+,+2+34

ln order Lo analyze Lhe behavlor of real subsLances Lo see Lhe changes ln
enLropy, enLhalpy and any oLher changes of sLaLe we need Lo conslder Lhelr real
pressure, LemperaLure and volume. 8eal subsLances have lnLermolecular
lnLeracLlons LhaL leL Lhelr sLaLe sllghLly dlfferenL, and we need Lo adapL Lhe equaLlon
we use Lo calculaLe properLles conslderlng Lhose devlaLlons from ldeallLy.
1he volumeLrlc equaLlons of sLaLe glve us an lnLerrelaLlonshlp beLween
pressure, LemperaLure and molar volume and descrlbe Lhe sLaLe of maLLer. WlLh
Lhem we can flnd our conLrol varlables LhaL lead Lo flnd enLhalpy, enLropy, Clbbs free
energy, heaL capaclLy, Lhe !oule-1hompson coefflclenL and oLher Lhermodynamlc
properLles. 1hose equaLlons of sLaLe are also a mean Lo calculaLe anoLher lnLenslve
varlable sLarLlng wlLh Lwo oLher known lnLenslve varlables.
1here are several equaLlon of sLaLe LhaL glve Lhe v1 correlaLlon, buL here we
wlll focus on only Lwo: eng-8oblnson and van der Waals equaLlons of sLaLe.

! !
!! !!
!! !!!
!
!
!!
!
!! ! ! !!
!
!


! !
!!!!"#$%& ! !
!
!"
!
!
!"
! !
!!!!"""#$% ! !"!
!"

! ! !! !!!!!"#$# !!!!"##$ !!!!!"##! !
!
! !! !
!
!"
! !
!


: pressure
v: molar volume
1: LemperaLure
1c: crlLlcal LemperaLure
c: crlLlcal pressure
u5 acenLrlc facLor
a: eng-8oblnson
consLanL a
b: eng-8oblnson
consLanL b
8: molar gas consLanL
1he a and b parameLers are relaLed Lo Lhe crlLlcal properLles. 1he ! pameLer
ls LemperaLure dependenL, and also conslder Lhe acenLrlc facLor (u), whlch ls
LabulaLed and speclflc for every compound.
!"#$%$&"' .
1he oLher equaLlon of sLaLe was developed by !. u. van der Waals ln 1873 Lo
descrlbe Lhe volumeLrlc v1 behavlor of boLh vapors and llqulds.

! !
!"
! !!
!
!
!
!


! !
!!"#$"
!"!"
! !
!"#
!!"


1he parameLers a and b are dlfferenL for every subsLance and Lhey are boLh
relaLed Lo c and 1c. 1he b parameLer lmplles LhaL aL very small speclflc volumes, Lhe
molecules begln Lo Louch each oLher, whlch causes Lhe pressure Lo sllghLly rlse. 1he a
parameLer conslders LhaL aL small speclflc volumes, Lhe aLLracLlon beLween Lhe
molecules ls slgnlflcanL. 1he van der Waals equaLlon ls noL very accuraLe buL ls one
of Lhe flrsL equaLlons Lo predlcL Lhe LranslLlon beLween llquld and vapor.
3,6


1he eng-8oblnson equaLlon of sLaLe ls much more accuraLe Lhen Lhe van
der Waals LCS because lL predlcLs beLLer Lhe behavlor of a real subsLance.
Conslderlng LhaL, ln Lhls reporL, we wlll use 8-LCS for Lhe calculaLlons needed.

lor MeLhanol, Lhe acenLrlc facLor ls u = 0.336 and Lhe eng-8oblnson
consLanLs a and b aL room LemperaLure (23 C) are calculaLed as follows:

! ! !! !!!!!"#$# !!!!"##$ !!!!!"! !!!!"##! !!!!!"!
!
! !! !
!"#
!"#!!
! !
!

! ! !!!"#$

! !
!!!"#$%& ! !!!"!# !!!"#$!"
!! !
!"#!!
!
!"!!
! !!!"#$
! !
!!!!"""#$% ! !!!"# !!"
!!
! !"#!!!
!"!!
! !!!" ! !"
!!


SomeLlmes we need speclflc equaLlons Lo analyze lnLerrelaLlonshlps beLween
!"#$%$&"' /
fluld properLles. Cne example of Lhem ls Lhe AnLolne LquaLlon, used Lo esLlmaLe Lhe
LemperaLure dependence of Lhe vapor pressure over small LemperaLure ranges. 1hls
equaLlon ls used Lo correlaLe preclsely Lhe vapor pressure over Lhe range from 1 Lo
200 ka.
!"!
!"#
! ! ! !
!
! !!


Where ls Lhe vapor pressure ln bar and 1 ls Lhe LemperaLure ln kelvln.
6
lor
MeLhanol we flnd on Lhe llLeraLure LhaL Lhe values for Lhe AnLolne consLanLs are:

60780&'%-&0 9'*30
:;<
" = > 90?0&0*(0
333.3 - 312.63 3.13833 1369.613 -34.846 Ambrose, Sprake, eL al., 1973
288.1 - 336.83 3.20409 1381.341 -33.30 Ambrose and Sprake, 1970
333. - 483. 3.31301 1676.369 -21.728 PlraLa and Suda, 1967



!"#$%$&"' 0
Cn Lhe followlng Lable are dlsplayed some of Lhe MeLhanol properLles from
experlmenLal daLa:
@&+80&%4 A'2-0
Molecular WelghL (Mr)

32.04 g/mol
CrlLlcal 1emperaLure (1
c
)

312.6 (k)
CrlLlcal ressure (
c
) 8.09 x10
6
a
CrlLlcal Molar volume (1/p) 1.8 x10
-4
m
3
/mol
normal 8olllng 1emperaLure
[sea level
64 C
normal MelLlng 1emperaLure
[sea level (101.323 ka)
-97.6 C
AcenLrlc facLor (u) 0.336
1rlple polnL 1emperaLure (1
Lrlple
)

173.6 k
1rlple polnL ressure (
Lrlple
) 0.1863 a
CrlLlcal compresslblllLy facLor Z
c
0.223900
!Pvap [298.13k and 101.3ka 1170 k!/kg
!Pfus aL 173.8k and 100ka 100.200 k!/kg

!"#$%$&"' 1
B.'3&'7$

lor all Lhe dlagrams, Lhe flrsL sLep was Lo deflne all Lhe speclflc properLles of
meLhanol LhaL should be used on Lhe equaLlons Lo calculaLe Lhe oLher deslred
varlables. 1hose varlables are mosL of Lhe Llme crlLlcal properLles, Lrlple polnL
properLles, acenLrlc facLor, Lhe gas consLanL, AnLolne parameLers, Cp parameLers,
and any oLhers requlred for Lhe dlagram. Also some equaLlons for cerLaln varlables
are deflned aL Lhe beglnnlng of Lhe codes as kappa and alfa values. 1he codes for
each dlagram are avallable aL Lhe appendlx of Lhls paper.

1. ressure vs Molar volume
1he dlagram shows how Lhe pressure changes wlLh varlaLlons on Lhe molar
volume keeplng consLanL LemperaLure. lor every lsoLherm below Lhe crlLlcal
LemperaLure, we have a loop LhaL leads us Lo Lhe splnodal reglon, where Lhe fugaclLy
value ls consLanL. 1hls was deflned wlLh Lhe help of Lhe eng-8oblnson LCS program
lncluded on SLanley l. Sandler LexLbook's Cu, varylng Lhe pressure ln order Lo flnd a
value wlLh equal values for vapor and llquld fugaclLy. 1he code conLalns an lf"
sLaLemenL LhaL should ploL an horlzonLal llne for Lhe reglon lnslde Lhe splnodal
reglon beLween Lhe llquld and vapor volume llmlLs. 1he lsoLherm above Lhe crlLlcal
LemperaLure we deflne a dlfferenL command as Lhey don'L dlsplay Lhe same
behavlor.

2. ressure vs 1emperaLure hase ulagram
1hls dlagram requlred Lhe deflnlLlon and calculaLlon of Lhe vapor pressure ln
a separaLed code, and Lhen Lhe funcLlon was plugged ln Lhe code LhaL wlll ploL Lhe
x1 dlagram. 1he vapor pressure funcLlon ls responslble for flndlng polnLs where Lhe
fugallLles of boLh llquld and vapor are equal. ln Lhose polnLs Lhe phase are ln
equlllbrlum and have Lhe same value for elLher Clbbs energy and fugaclLy. 8oLh
Clauslus and AnLolne equaLlons were used Lo make a comparlslon. 1he x1 code ls
used Lwlce, one Llme Lo ploL Lhe logarlLhmlc scale and Lhe oLher Lo ploL Lhe non-
logarlLhmlc scale.

!"#$%$&"' )2
3. ConsLanL ressure PeaL CapaclLy vs 1emperaLure
1he relaLlon beLween Cp and Cv need Lo be deflned and Lhe 8LCS ls
used Lo obLaln sLaLe varlables on parLlal derlvaLlves [usL as we worked durlng
classes and ln S.l.S problems. We need Lo flnd Cp as a funcLlon of 1 only, so we
plug Lhe r values glven and Lhe varlables are reduced Lo 1 and v only. 1he
degree of freedom can be reducwd lf we calculaLe Lhe molar volume speclfylng
one LemperaLure range. 1he molar volumes are obLalned agaln wlLh Lhe 8LCS
on Lhe S.l.S LexLbook's Cu. Cne for" funcLlon was lncluded Lo solve Lhe rooLs of
Lhe compresslblllLy facLor. 1he equaLlons are properly used Lo ploL a Cp vs 1
dlagram.

4. Molar LnLhalpy vs LemperaLure deslgn
A slmllar meLhodology was used Lo obLaln Lhls dlagram, buL we needed Lo
plug ln a dlfflrenL equaLlon Lo obLaln Lhe enLhalpy. 1he equaLlon used ln on Lhe
S.l.S LexLbook on page 196. 1he relaLlon for ldeal gas was used Lo obLaln P ln
Lherms of Cp for ldeal gas.

3. ConsLanL LnLropy coefflclenL vs LemperaLure
uslng Lhe same basls for ploLLlng Cp, we deflne uslng Lrlple producL rule
and subsLlLuLlng correcL Maxwell 8elaLlons, all presenL ln page 196 from Lhe S.l.S
LexLbook.
!"#$%$&"' ))
90$-2%$

llgure 1: ConsLanL pressure heaL capaclLy vs 1emperaLure for MeLhanol


llgure 2: Molar LnLhalpy vs 1emperaLure dlagram dor MeLhanol.

!"#$%$&"' )*


llgure 3: ressure vs LemperaLure dlagram for MeLhanol



llgure 4: ressure vs LemperaLure dlagram for MeLhanol

!"#$%$&"' )+


llgure 3: eng-8oblnson LCS ressure vs volume dlagram for MeLhanol.


llgure 6: 1he ConsLanL LnLropy coefflclenL vs 1emperaLure dlagram for
MeLhanol.
!"#$%$&"' ),
ulscusslons

llgure 1: ln Lhe Cp dlagram we can noLe Lwo clearly splkes LhaL
represenL Lhe phase LranslLlons of flrsL and second order. 1he area under Lhe
splke ls correspondenL Lo Lhe laLenL heaL of vaporlzaLlon, Lhe amounL of heaL
needed Lo make Lhe phase LranslLlon. 1he behavlor of Lhe dlagram was
slmllar Lo Lhe llLeraLure for oLher compounds, showlng good resulLs.

llgure 2: 1he ldeal gas llne ls well represenLed. 1he oLher llnes
descrlbe slmllarly Lo a real subsLance behavlor , buL Lhe splkes LhaL lndlcaLe
Lhe phase LranslLlon dldn'L come up very good. Changlng some of Lhe
compound properLles, l found ouL Lhls sLrange behavlor ls due Lo Lhe hlgh
value of Lhe acenLrlc facLor. CLher devlaLlons from Lhe expecLecLed occur for
oLher funcLlons, due Lo Lhe same problem.

llgures 3 and 4: 1he polnL locaLed on Lhe graphlc were obLalned from
llLeraLure, and Lhe curves represenL Lhe calculaLlons for Lhls funcLlons. We
can noLe Lhe approxlmaLlon of Lhe values calculaLed ln Lhe curves Lo Lhe
values ploLLed from known properLles, showlng a very good resulL.
1he flgure 4 shows how close Lhe Lhree meLhods of calculaLlng Lhe

vap
are, and Lhe devlaLlons are due Lo Lhe accuracy of each equaLlon.

llgure 3:ln Lhe flgure we can clearly noLe Lhe reglon of Lhe splnodal
and blmodal because lL's where Lhe fugaclLles are equal boLh Lo vapor and
llquld phases. 1he expecLed horlzonLal llnes were responslble for maklng Lhls
reglon clear Lo see. ln Lhls reglon we also have Lhe llquld-vapor coexlsLence
equlllbrlum. Conslderlng some sllghLly devlaLlons of fluLuaLlons due Lo deep
lnLermolecular lnLeracLlons, Lhe resulL obLalned was very good and
represenLs well our compound behavlor.

llgure 6: As we dlscussed before,Lhere ls a sLrange behavlor
represenLed by Lhe r=1 llne, whlch could be solved changlng Lhe hlgh
!"#$%$&"' )-
acenLrlc value of MeLhanol. Powever, Lhe Lrend of Lhe graphlc sLlll show an
expecLed behavlor for Lhe oLher lsobars, reachlng Lo a good represenLaLlon.

Concluslon

uslng an accuraLe equaLlon of sLaLe l could falrly represenL Lhe
behavlor of a real subsLance. Many funcLlons were used Lo see Lhe changes
when we vary oLher sLaLe properLy and could compare Lhls Lo Lhe ldeallLy
behavlor. WlLh Lhe curves ploLLed we found values LhaL are slmllar Lo Lhe
ones ln llLeraLure for experlmenLal daLa. 1he unexpecLed behavlor on some
on Lhe graphlcs ls due Lo Lhe hlgh value of Lhe MeLhanol acenLrlc facLor and
we can conslder Lhls elLher a parLlcularlLy of Lhls compound ln cerLaln ranges,
elLher [usL a mlsLake durlng Lhe calculaLlon.
1he overall resulL ls very good and Lhe ob[ecLlves of sLudy wlLh all Lhe
knowledge dlscussed ln class durlng Lhe semesLer could be well represenLed.

!"#$%$&"' ).
90?0&0*(0$

1) 1he Chemlcal Company: hLLp://www.Lhechemco.com/chemlcal/meLhanol/
2) MaLweb:
hLLp://www.maLweb.com/search/uaLaSheeL.aspx?MaLCulu=f2c9a3d8608e4f3aac1d
370d37a34ffc&ckck=1
3) Wolfram Alpha
hLLp://www.wolframalpha.com/lnpuL/?l=Lrlple20polnL20LemperaLure20of20
meLhanol&lk=2
4) MeLhanol: hLLp://www.meLhanol.org
3) Wolfram Alpha hLLp://www.wolframalpha.com/lnpuL/?l=meLhanol
6) SLanley l. Sandler 4
Lh
edlLlon Chemlcal, blochemlcal and englneerlng
1hermodynamlcs.
7) llz-Chemle www.flz-chemle.de/lnfoLherm/servleL/lnfoLhermSearch

!"#$%$&"' )/
Appendlx
llgure 1: ConsLanL pressure heaL capaclLy vs 1emperaLure for MeLhanol

clear all;
clc;

%Cp versus T

%Defining Methanol and other important constants%

R=8.314; %Gas constant [J/mol*K]
Tc=512.6; % Methanol Critical Temperature [K]
T=175.61:1200; % The temperature range goes between the triple point
and a value higher than the critical point [K]
Pc=80.9*100000; % Methanol Critical Pressure [Pa]
w=.556; % Methanol Acentric Factor
k=.37464+1.54226*w-.26992*w^2; % Kappa
a=(.45724.*R^2.*Tc^2)./Pc; %a(T) depends of Pc and Tc

% Specifying the desired isobars at Pr=0, Pr=0.02, Pr=0.5, Pr=1 and
Pr=2
P = [[0] [161800] [4045000] [8090000] [16180000]]

for h=1:5
for j=1:1:length(T)
alpha=(1+k.*(1-sqrt(T (j)./Tc))).^2;
b=(.07780.*R.*Tc)./Pc;
A=(a.*alpha.*P(h))./((R.*T(j)).^2);
B=(b.*P(h))./(R.*T(j));
alpha_cubic=B-1;
beta_cubic=A-(3.*B.^2)-(2.*B);
gamma_cubic=-(A.*B)+B.^2+B.^3;
r=[1,alpha_cubic,beta_cubic,gamma_cubic];
z=roots(r);
for i=1:3
if ((imag (z(i))~=0))
z(i)=0;
end
end
z=sort(z);
Zv=z(3);
if (z(1)~=0)
Zl=z(1);
elseif (z(2)~=0)
Zl=z(2);
else
Zl=z(3);
end
Cvap(j)=Zv;
V(j)=(Cvap (j).*R.*T(j))./P(h);
integrand= @(V)
((a.*((k^2+k)./(2.*sqrt(Tc))).*(1/T(j).^1.5))./(V.*(V+b)+b.*(V-b)));
Int=integral(integrand,Inf,V(j));

Cv_ideal=((21.15-R)+(7.092e-02.*T(j))+(2.587e-05.*T(j).^2)+(-
2.852e-08.*T(j).^3));
Cp_ideal(j)=Cv_ideal+R;
Cv_real=((T(j).*Int))+Cv_ideal;
Cv(j)=Cv_real;

!"#$%$&"' )0
alpha=(1+k.*(1-sqrt(T(j)./Tc))).^2;
a_prime=-a.*k.*sqrt(alpha./(T(j).*Tc));
dPdT=(R./(V(j)-b))+(a_prime./(V(j).*(V(j)+b)+b.*(V(j)-b)));
dPdV=(-R.*T (j)/(V(j)-
b).^2)+((2.*a.*alpha.*(V(j)+b))./((V(j).*(V(j)+b)+b.*(V(j)-b))).^2);

Cp_real=Cv(j)-(((T(j).*(dPdT.^2)))./(dPdV));
Cp(j)=Cp_real;
end
%
xlabel('Temperature (K)')
ylabel('Cp (J/(mol*K))')
title('Constant Pressure Heat Capacity vs Temperature for
Methanol')
plot(T,Cp)

hold all
end

plot(T,Cp_ideal, '--') % This line corresponds the ideal gas to check
how the behavior of the real substance is different


llgure 2: Molar LnLhalpy vs 1emperaLure dlagram dor MeLhanol.

% H vs T
R=8.314; % Gas constant (J/mol*K)
Tc=512.6; % Methanol Critical Temperature (K)
T=175.61:1000; % The temperature range goes between the triple point
and a value higher than the critical point [K]
Pc=80.9*100000; % Methanol Critical Pressure (Pascal)
w=.556; % Methanol acentric factor
k=.37464+1.54226*w-.26992*w^2; % Kappa (Constant)
a=(.45724.*R^2.*Tc^2)./Pc; % %a(T) depends of Pc and Tc

% Specifying the desired isobars at Pr=0, Pr=0.02, Pr=0.5, Pr=1 and
Pr=2
P = [[0] [161800] [4045000] [8090000] [16180000]]


for h=1:5
for j=1:1:length(T)
alpha=(1+k.*(1-sqrt(T (j)./Tc))).^2;
b=(.07780.*R.*Tc)./Pc;
A=(a.*alpha.*P(h))./((R.*T(j)).^2);
B=(b.*P(h))./(R.*T(j));
alpha_cubic=B-1;
beta_cubic=A-(3.*B.^2)-(2.*B);
gamma_cubic=-(A.*B)+B.^2+B.^3;
r=[1,alpha_cubic,beta_cubic,gamma_cubic];
z=roots(r);
for i=1:3
if ((imag (z(i))~=0))
z(i)=0;
end
end
z=sort(z);
Zv=z(3);
if (z(1)~=0)
Zl=z(1);
!"#$%$&"' )1
elseif (z(2)~=0)
Zl=z(2);
else
Zl=z(3);
end
Cvap(j)=Zv;
V(j)=(Cvap (j).*R.*T(j))./P(h);
integrand= @(V)
((a.*((k^2+k)./(2.*sqrt(Tc))).*(1/T(j).^1.5))./(V.*(V+b)+b.*(V-b)));
Int=integral(integrand,Inf,V(j));

Cv_ideal=((21.15-R)+(7.09e-02.*T(j))+(2.587e-05.*T(j).^2)+(-
2.852e-08.*T(j).^3));
Cv_real=((T(j).*Int))+Cv_ideal;
Cv(j)=Cv_real;

alpha=(1+k.*(1-sqrt(T(j)./Tc))).^2;
a_prime=-a.*k.*sqrt(alpha./(T(j).*Tc));
dPdT=(R./(V(j)-b))+(a_prime./(V(j).*(V(j)+b)+b.*(V(j)-b)));
dPdV=(-R.*T(j)/(V(j)-
b).^2)+((2.*a.*alpha.*(V(j)+b))./((V(j).*(V(j)+b)+b.*(V(j)-b))).^2);

Cp_real=Cv(j)-(((T(j).*(dPdT.^2)))./(dPdV));
Cp(j)=Cp_real;
enthalpy = Cp(j).*T(j)+ ((V(j)+(T(j).*dPdT./dPdV)).*P(h));
H(j) = enthalpy;
Hstar(j)=((21.15.*T(j))+(0.5*0.709e-01.*T(j).^2)+(0.0863e-
04.*T(j).^3)+(-0.7125e-08.*T(j).^4));
%this is to plot a graph of enthalpy of ideal gas vs. T
end
xlabel('Temperature (K)')
ylabel('Molar Enthalpy (J/mol)')
title('Molar Enthalpy vs Temperature for Methanol')
plot(T, H)
hold all
end

plot(T, Hstar, 'r')



llgure 3: ressure vs LemperaLure dlagram for MeLhanol
llgure 4: ressure vs LemperaLure dlagram for MeLhanol
%P vs T

% Declaring constants and speficic values for Methanol

R=8.314;
Tc=512.6; % Methanol Critical
Pc=80.9*100000; % Methanol Critical pressure to a high value
Tt=175.61; % Methanol Triple Point Temperature
Pt=0.1863; % Methanol Triple Ponit Pressure
Tb=337.75; % Methanol boiling point
Tm=175.55; % Methanol melting point
T=[Tt:0.01:Tc];
T_subline=[100:0.01:Tc];
w=0.556; % Methanol Acentric Factor
!"#$%$&"' *2
deltaHvap = 37440.000; % Methanol vaporization enthalpy
deltaHfus = 3206.0; % Methanol fusion enthalpy

% Antoine Constants for Methanol at the temperature range (353.5 -
512.63) K
Ant_A = 5.15853;
Ant_B = 1569.613;
Ant_C = -34.846;

P_vap_Antoine= 10.^(Ant_A-(Ant_B./(Ant_C+T)))*10^5

P_vap_TripPoint = 10.^((Ant_A-(Ant_B./(Ant_C+Tc))))*10^5; % P(vap) at
the triple point

ClausiusClap_Pvap = exp((-deltaHvap./R).*((1./T)-
(1./Tc))).*P_vap_TripPoint; %defining Clausius Clapyron for
P(vaporisation)
ClausiusClap_Psub = (P_vap_TripPoint).*exp((-
deltaHvap./R).*((1./T_subline)-(1./Tc))); %defining Clausius Clapyron
for P(sublimation)


semilogy(T,P_vap_Antoine,'k')
hold all
xlabel('Temperature (K)')
ylabel('Pressure (Pa)')
title('P-T Phase Diagram for Methanol')
semilogy(T,ClausiusClap_Pvap,'r')
semilogy(T_subline,ClausiusClap_Psub,'c')
semilogy(Tm,100000,'bo')
plot(512.6,8090000,'kd')
plot(175.61,0.1863,'kp')


llgure 3: eng-8oblnson LCS ressure vs volume dlagram for MeLhanol.


% Peng-Robinson EOS Pressure vs Volume for Methanol
% Using one command for each isotherm:


clear all;
clc ;

% For Tr=0.5

V=0.00003:0.0000001:0.5;
for i = 1:1:length(V);
if V(i)>4.58388e-05 & V(i)<2.12517;
f(i) = 0.010023e5;
else
Pc = 80.9*100000; % Methanol Critical Pressure (Pascal)
Tc = 512.6; % Methanol Critical Temperature (K)
Vc = 1.18e-04; % Methanol Critical Volume
t = 0.5*Tc;
R = 8.314; % Gas constant (J/mol*K)
b = 0.07780*(R*Tc/Pc);
!"#$%$&"' *)
w = .556; % Methanol Acentric Factor
k = .37464+1.54226*w-.26992*w.^2; % kappa
a1 = (1 + k*(1-sqrt(0.5))).^2;
a_1 = 0.45724*(R.^2*Tc.^2/Pc)*a1;
f(i)=(((R).*(t))./(V(i)-b)) - ((a_1)./(((V(i)).*(V(i) + b)) +
(b).*(V(i)-b)));
end
end

% For Tr=0.6

for i = 1:1:length(V);
if V(i)>=4.82041e-05 & V(i)<=9.60035e-02;
g(i) = 0.2647e5;
else
Pc = 80.9*100000; % Methanol Critical Pressure (Pascal)
Tc = 512.6; % Methanol Critical Temperature (K)
Vc = 1.18e-04; % Methanol Critical Volume
t=0.6*Tc;
R = 8.314; % Gas constant (J/mol*K)
b = 0.07780*(R*Tc/Pc);
w =.556; % Methanol Acentric Factor
k = .37464+1.54226*w-.26992*w.^2; % kappa
a2 = (1 + k*(1-sqrt(0.6))).^2;
a_2 = 0.45724*(R.^2*Tc.^2/Pc)*a2;
g(i)=(((R).*(t))./(V(i)-b)) - ((a_2)./(((V(i)).*(V(i) + b)) +
(b).*(V(i)-b)));
end
end

% For Tr=0.7

for i = 1:1:length(V);
if V(i)>5.17832e-05 & V(i)<1.26072e-02;
h(i) = 2.2835e5;
else
Pc = 80.9*100000; % Methanol Critical Pressure (Pascal)
Tc = 512.6; % Methanol Critical Temperature (K)
Vc = 1.18e-04; % Methanol Critical Volume
t=0.7*Tc;
R = 8.314; % Gas constant (J/mol*K)
b = 0.07780*(R*Tc/Pc);
w =.556; % Methanol Acentric Factor
k = .37464+1.54226*w-.26992*w.^2; % kappa
a2 = (1 + k*(1-sqrt(0.7))).^2;
a_2 = 0.45724*(R.^2*Tc.^2/Pc)*a2;
h(i)=(((R).*(t))./(V(i)-b)) - ((a_2)./(((V(i)).*(V(i) + b)) +
(b).*(V(i)-b)));
end
end

% For Tr=0.8

for i = 1:1:length(V);
if V(i)>5.77986e-05 & V(i)<2.89411e-03;
l(i) = 10.451e5;
else
Pc = 80.9*100000; % Methanol Critical Pressure (Pascal)
Tc = 512.6; % Methanol Critical Temperature (K)
Vc = 1.18e-04; % Methanol Critical Volume
t=0.8*Tc;
R = 8.314; % Gas constant (J/mol*K)
!"#$%$&"' **
b = 0.07780*(R*Tc/Pc);
w =.556; % Methanol Acentric Factor
k = .37464+1.54226*w-.26992*w.^2; % kappa
a2 = (1 + k*(1-sqrt(0.8))).^2;
a_2 = 0.45724*(R.^2*Tc.^2/Pc)*a2;
l(i)=(((R).*(t))./(V(i)-b)) - ((a_2)./(((V(i)).*(V(i) + b)) +
(b).*(V(i)-b)));
end
end



% For Tr=1
for i = 1:1:length(V);
Pc = 80.9*100000; % Methanol Critical Pressure (Pascal)
Tc = 512.6; % Methanol Critical Temperature (K)
Vc = 1.18e-04; % Methanol Critical Volume
t=Tc;
R = 8.314; % Gas constant (J/mol*K)
b = 0.07780*(R*Tc/Pc);
w =.556; %Methanol Acentric Factor
k = .37464+1.54226*w-.26992*w.^2; % kappa
a2 = (1 + k*(1-sqrt(1))).^2;
a_2 = 0.45724*(R.^2*Tc.^2/Pc)*a2;
s(i)=(((R).*(t))./(V(i)-b)) - ((a_2)./(((V(i)).*(V(i) + b)) +
(b).*(V(i)-b)));
end

% For Tr=2
for i = 1:1:length(V);
Pc = 80.9*100000; % Methanol Critical Pressure (Pascal)
Tc = 512.6; % Methanol Critical Temperature (K)
Vc = 1.18e-04; % Methanol Critical Volume
t=Tc*2;
R = 8.314; % Gas constant (J/mol*K)
b = 0.07780*(R*Tc/Pc);
w =.556; %Methanol Acentric Factor
k = .37464+1.54226*w-.26992*w.^2; % kappa
a2 = (1 + k*(1-sqrt(2))).^2;
a_2 = 0.45724*(R.^2*Tc.^2/Pc)*a2;
q(i)=(((R).*(t))./(V(i)-b)) - ((a_2)./(((V(i)).*(V(i) + b)) +
(b).*(V(i)-b)));
end

figure
loglog(V,f, 'r')
hold all;
loglog(V,g, 'g')
loglog(V,h, 'c')
loglog(V,l, 'b')
loglog(V,s, 'k')
loglog(V,q, '--')
xlabel('V (m^3/mol)'), ylabel('P (Pa)'), title('P vs. V for Peng-
Robinson EOS for Methanol')




!"#$%$&"' *+
llgure 6: 1he ConsLanL LnLropy coefflclenL vs 1emperaLure dlagram for
MeLhanol.

%Mu_S versus Temperature
clear all;
clc;

R=8.314; % Gas constant (J/mol*K)
Tc=512.6; % Methanol Critical Temperature (K)
T=175:800; % Temperature range between triple point to a value higher
than the critical point (K)
Pc=80.9*100000; % Methanol Critical Pressure (Pascal)
w=.556; % Methanol acentric factor
k=.37464+1.54226*w-.26992*w^2; %Kappa (Constant)
a=(.45724.*R^2.*Tc^2)./Pc; %a(T)values at critical temperature and
pressure

% Specifying the desired isobars at Pr=0, Pr=0.02, Pr=0.5, Pr=1,
Pr=1.25, Pr=1.75, and Pr=2
P = [[0] [161800] [4045000] [8090000] [10112500] [14157500]
[16180000]]


for h=1:7
for j=1:1:length(T)
alpha=(1+k.*(1-sqrt(T(j)./Tc))).^2;
b=(.07780.*R.*Tc)./Pc;
A=(a.*alpha.*P(h))./((R.*T(j)).^2);
B=(b.*P(h))./(R.*T(j));
alpha_cubic=B-1;
beta_cubic=A-(3.*B.^2)-(2.*B);
gamma_cubic=-(A.*B)+B.^2+B.^3;
r=[1,alpha_cubic,beta_cubic,gamma_cubic];
z=roots(r);
for i=1:3
if ((imag(z(i))~=0))
z(i)=0;
end
end
z=sort(z);
Zv=z(3);
if (z(1)~=0)
Zl=z(1);
elseif (z(2)~=0)
Zl=z(2);
else
Zl=z(3);
end
Cvap(j)=Zv;
V(j)=(Cvap(j).*R.*T(j))./P(h);
integrand= @(V)
((a.*((k^2+k)./(2.*sqrt(Tc))).*(1/T(j).^1.5))./(V.*(V+b)+b.*(V-b)));
Int=integral(integrand,Inf,V(j));

Cv_ideal=((21.15-R)+(7.092e-02.*T(j))+(2.587e-05.*T(j).^2)+(-
2.852e-08.*T(j).^3));
Cv_real=((T(j).*Int))+Cv_ideal;
Cv(j)=Cv_real;

!"#$%$&"' *,
alpha=(1+k.*(1-sqrt(T(j)./Tc))).^2;
a_prime=-a.*k.*sqrt(alpha./(T(j).*Tc));
dPdT=(R./(V(j)-b))+(a_prime./(V(j).*(V(j)+b)+b.*(V(j)-b)));
dPdT_squared=dPdT.^2;
dPdV=(-R.*T(j)/(V(j)-
b).^2)+((2.*a.*alpha.*(V(j)+b))./((V(j).*(V(j)+b)+b.*(V(j)-b))).^2);

Cp_real=Cv(j)-(((T(j).*dPdT_squared))./(dPdV));
Cp(j)=Cp_real;

mu_s_eq = (-T(j).*dPdT)./(Cp(j).*dPdV);
Mu_S(j) = mu_s_eq;
end
xlabel('Temperature (K)')
ylabel('Mu_S')
title('Constant Entropy Coefficient vs Temperature for Methanol')
semilogy(T, Mu_S)
hold all
end


vap luncLlon:

function[] = Pvap(P,T)
R=8.314;
Tc=512.6;
Pc=8.09e6;
w=0.556;

k = 0.37464 + 1.54226.*w - 0.26992.*w.^2;
aa = (1 + k.*(1 - (T./ Tc).^0.5)).^2;
b = 0.07780 .* ((R .* Tc)./Pc);
a = 0.45724 .* ((R^2 .* Tc^2)./Pc) .* aa;
A = (a.*P)./(R*T).^2;
B = (b.*P)./(R*T);
f = [1 B-1 A-3.*B.^2-2.*B B.^3+B.^2-A.*B];
r = roots(f);

r1 = real(r);
ZL = min(r1);
ZV = max(r1);
fL = P.*exp(ZL-1-log(ZL-B)-
(A./(2.*sqrt(2).*B)).*log((ZL+(1+sqrt(2)).*B)./(ZL+(1-sqrt(2)).*B)));
fV = P.*exp(ZV-1-log(ZV-B)-
(A./(2.*sqrt(2).*B)).*log((ZV+(1+sqrt(2)).*B)./(ZV+(1-sqrt(2)).*B)));
if abs(fV./fL-1)<0.0001
semilogy(T,P,'c')
hold all;
else
P = P .*(fL./fV);
Pvap(P,T);
end
end

Potrebbero piacerti anche