{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Helvetica" 1 9 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 1 10 101 47 115 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 256 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 26 136 9 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 251 135 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 269 "Courier" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 271 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 0 14 0 0 1 0 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 16 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 6 6 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -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1 {CSTYLE "" -1 -1 "Courier" 0 14 0 0 0 0 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 \+ Font 6" -1 261 1 {CSTYLE "" -1 -1 "Courier" 0 14 0 0 0 0 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 7" -1 262 1 {CSTYLE "" -1 -1 "Courier" 0 14 0 0 0 0 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 8" -1 263 1 {CSTYLE "" -1 -1 "Courier" 0 14 0 0 0 0 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 0" -1 264 1 {CSTYLE "" -1 -1 "Helvetica" 0 10 16 0 0 0 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE " R3 Font 2" -1 265 1 {CSTYLE "" -1 -1 "Courier" 0 12 0 0 1 0 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 18 "" 0 "" {TEXT -1 35 "The Van der Waals Equation of St ate" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 311 "In 1873 Van der Waals prop osed an equation of state that serves as an inspiration to thermodynam icists more than 100 years after it was proposed. While the equation h as several shortcomings from a theoretical and practical standpoint it remains useful as a starting point for studying cubic equations of st ate.\n" }}{PARA 0 "" 0 "" {TEXT -1 58 "The Van der Waals equation of s tate has the following form" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "VDWConsts := [R,a,b]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "EOS[VDW]:=P=R*T/(v-b)-a/v^2: EOS[VDW];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/%\"PG,&*(%\"RG\"\"\"%\"TGF(,&%\"vGF(%\"bG!\"\"F-F(*&% \"aGF(F+!\"#F-" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 6 "where " }{TEXT 256 1 "P" }{TEXT -1 18 " is the pressure, " }{TEXT 257 1 "v" }{TEXT -1 28 " is the specific volume and " }{TEXT 258 1 "T" }{TEXT -1 22 " i s the temperature. " }{TEXT 259 1 "a" }{TEXT -1 5 " and " }{TEXT 260 1 "b" }{TEXT -1 56 " are parameters in the model (yet to be determined ) and " }{TEXT 261 1 "R" }{TEXT -1 183 " is the gas constant. The fir st term on the right hand side is the attractive term, the second term accounts for repulsion forces that attempt to keep the individual mol ecules apart." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "VDWparams: =\{b = 1/8*R*T[c]/P[c], a = 27/64/P[c]*R^2*T[c]^2\}: VDWparams;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#<$/%\"bG,$*(%\"RG\"\"\"&%\"TG6#%\"cGF) &%\"PGF,!\"\"#F)\"\")/%\"aG,$*(F.F0F(\"\"#F*F7#\"#F\"#k" }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 36 "Polynomial Forms of the VDW Equation" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "We can write the VDW EOS as a poly nomial in volume as follows:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "numer(lhs(EOS[VDW])-rhs(EOS[VDW]))=0:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "polyv:=expand(\"/coeff(lhs(\"),v,3)): polyv; #Divi de by leading coefficient" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/,,*$%\"v G\"\"$\"\"\"*&F&\"\"#%\"bGF(!\"\"**%\"PGF,%\"RGF(%\"TGF(F&F*F,*(F.F,% \"aGF(F&F(F(*(F.F,F2F(F+F(F,\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "We may also express the VDW equation in terms of the compressibili ty as follows" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "subs(v=z*R *T/P,polyv):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "polyz:=coll ect(expand(\"/coeff(lhs(\"),z,3)),z): polyz;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/,**$%\"zG\"\"$\"\"\"*&,&**%\"RG!\"\"%\"TGF-%\"PGF(%\"b GF(F-F-F(F(F&\"\"#F(*,F,!\"#F.F3F/F(%\"aGF(F&F(F(*,F,!\"$F.F6F/F1F4F(F 0F(F-\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 160 "Both polynomial fo rms of the VDW equation are useful but the compressibility form is, pe rhaps, the most useful. We solve the compressibility polynomial to giv e " }{TEXT 264 1 "z" }{TEXT -1 28 " in terms of the parameters:" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "zroots[VDW]:=solve(polyz,z): zroots [VDW];" }}{PARA 12 "" 1 "" {XPPMATH 20 "6%*(,**$,0*(%\"PG\"\"#%\"aG\" \"\"%\"bGF+\"#s**F(F+F*F+%\"RGF+%\"TGF+!#O*&F(\"\"$F,F3\"\")**F(F)F,F) F/F+F0F+\"#C**F/F)F0F)F(F+F,F+F6*&F/F3F0F3F4*$,2*(F(\"\"&F*F+F,\"\"%\" #7*(F(F=F*F)F,F)F6*&F(F3F*F3F>*,F(F3F*F)F/F+F0F+F,F+!#g**F(F)F*F)F/F)F 0F)!\"$*,F(F=F*F+F,F3F/F+F0F+\"#O*,F(F3F*F+F,F)F/F)F0F)FF*,F(F)F*F+F,F +F/F3F0F3F>#F+F)F>#F+F3#F+\"\"'*&,**&F(F+F*F+FJ*&F(F)F,F)#!\"\"\"\"*** F(F+F,F+F/F+F0F+#!\"#FS*&F/F)F0F)FQF+F&#FRF3!\"'*&F(F+F,F+FJ*&F/F+F0F+ FJF+F0FRF/FR*(,,F%#FRF>FMF3FZFJFenFJ*(%\"IGF+F3FI,&F%FKFMFLF+FIF+F0FRF /FR*(,,F%FhnFMF3FZFJFenFJFin#FRF)F+F0FRF/FR" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 142 "Note that there are three solutions (as we should have anticipated since the polynomial is a cubic). The other two solutions include the term " }{TEXT 265 1 "I" }{TEXT -1 763 " (the square root \+ of -1). However, this does not mean that the other two roots are compl ex. Under certain conditions all three roots are real and under other \+ conditions only one root is real as we shall demonstrate below. \n\nIt is worth noting here that even though explicit analytical expressions for the roots may be obtained, these formulae are rarely used in engi neering computations and iterative methods are employed instead. The r eason is that thermodynamic computations often involve the repeated ev aluation of the compressibility under slightly varying conditions and \+ under these circumstances it proves to be more efficient (from a compu tational perspective) to use an iterative method. We shall illustrate \+ the use of iterative methods in later examples." }}}}{SECT 0 {PARA 4 " " 0 "" {TEXT -1 53 "Dimensionless (Reduced) form of the Equation of St ate" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 171 "It is sometimes useful to \+ represent thermodynamic functions in terms of so-called reduced proper ties. The reduced pressure, volume and temperature are defined as fol lows:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "Prdef := P[r]=P/P[ c]: Vrdef := v[r]=v/v[c]: Trdef := T[r]=T/T[c]: Prdef, Vrdef, Trdef;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6%/&%\"PG6#%\"rG*&F%\"\"\"&F%6#%\"cG! \"\"/&%\"vGF&*&F0F)&F0F+F-/&%\"TGF&*&F5F)&F5F+F-" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 55 "The critcial compressibility is, therefore, define d by " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "zcrit := Subs(Stat e(c),z=z[c],zdef): zcrit;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/&%\"zG6# %\"cG**&%\"PGF&\"\"\"&%\"vGF&F+%\"RG!\"\"&%\"TGF&F/" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 40 "For the VDW EOS this has a special value" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "Subs(EOSParams[VDW],zcrit); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/&%\"zG6#%\"cG#\"\"$\"\")" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 425 "suggesting that all fluids have t he same critical compressibility with a value of 0.375. In fact, the c ritical compressibilities of a great many fluids have almost the same \+ value. However, that value is closer to 0.25. This means that the VDW EOS will not be all that succesful at predicting densities in the cri tical region even though it does provide a qualitatively accurate mode l of the PVT behavior of many real fluids." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 153 "In what follows we use the abo ve definitions of the reduced properties to rewrite the VDW EOS in dim ensionless form (in terms of the reduced properties)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "Solve([Prdef,Vrdef,Trdef],[P,v,T]): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "Subs(\",EOSParams[VDW], EOSp[VDW]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "\"/P[c]:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "EOSr[VDW]:=collect(\",[P[c], T[r],T[c],R]): EOSr[VDW];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/&%\"PG6# %\"rG,&*&,&&%\"vGF&#\"\"$\"\")#!\"\"F/\"\"\"F1&%\"TGF&F2F2*$F+!\"#!\"$ " }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 9 "Example 1" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 188 "Calculate the molar volume and compressibility o f ammonia at a pressure of 56 atm and a temperature of 450 K.\n\nFirst we need to know the critical properties of ammonia. They are as follo ws" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "CriticalProps[NH3]:= \{T[c] = 405.649994, P[c] = 11280000.0\}: CriticalProps[NH3];" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#<$/&%\"TG6#%\"cG$\"*%**\\cS!\"'/&%\"PG F'$\"*++!G6!\"\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "where the tem perature is in kelvin and the pressure in pascals." }}{PARA 0 "" 0 "" {TEXT -1 64 "The temperature and pressure of interest (in the same uni ts) are" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "Specs:=\{P=56*10 1325,T=450\};" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&SpecsG<$/%\"PG\"(+ Un&/%\"TG\"$]%" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 49 "We use the volu me polynomial form of the VDW EOS." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "Veqn:=subs(VDWparams,CriticalProps[NH3],Specs,R=8314. 3,polyv): Veqn;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/,**$%\"vG\"\"$\"\" \"*$F&\"\"#$!+MQ^np!#5F&$\"+*[Ow\\(!#6$!+&[@A!G!#7F(\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "We may now invoke fsolve to obtain a nume rical answer." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "result :=f solve(Veqn,v);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'resultG$\"+\"GAzu &!#5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 88 "Note that Maple found onl y one root. To find the others we need to use fsolve as follows" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "result :=fsolve(Veqn,v,compl ex);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'resultG6%,&$\"+kx&z4'!#6\" \"\"%\"IG$!+,>+,MF),&F'F*F+$\"+,>+,MF)$\"+\"GAzu&!#5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 92 "which shows that the one root found earlier was the only real root (under these conditions)." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "Before we leav e this example let us examine the compressibility polynomial. " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "zeqn:=subs(VDWparams,Critica lProps[NH3],Specs,polyz): zeqn;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/,* *$%\"zG\"\"$\"\"\"*$F&\"\"#$!+:>oc5!\"*F&$\"+!QwWs\"!#5$!+@Bmu(*!#7F( \"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 39 "We can solve this polyno mial using the " }{TEXT 269 6 "fsolve" }{TEXT -1 9 " command." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "result:=fsolve(zeqn,z,comple x): result;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6%,&$\"+KW1[#*!#6\"\"\"% \"IG$!+\\Y!z:&F&,&F$F'F($\"+\\Y!z:&F&$\"+ki?<()!#5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 144 "where the three compressibilities correspond to \+ the three volumes computed before. A plot of the compressibility polyn omial shows the real root." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "plot(lhs(zeqn),z=0..1,-0.1..0.02);" }}{PARA 13 "" 1 "" {INLPLOT "6 %-%'CURVESG6$7W7$\"\"!$!1,++@Bmu(*!#=7$$\"1nmm;arz@!#<$!1%))z^![[2lF+7 $$\"1LL$e9ui2%F/$!1)[KaCwKV%F+7$$\"1nmm\"z_\"4iF/$!1-;UPoi,HF+7$$\"1mm mT&phN)F/$!13(4Fm7&f@F+7$$\"1LLe*=)H\\5!#;$!1t(HA\\2)e@F+7$$\"1nm\"z/3 uC\"FD$!1pDsh*eYw#F+7$$\"1++DJ$RDX\"FD$!1BC%yn:O\"F/7$$\"1+++D.&4]#FD$!1^va6yj4Y2aFD$!1o..#*)=(QnF/7$$\"1mm;zXu9cFD$!1u\"Q`ajl!pF/7$$\"1++ +]y))GeFD$!1@G!Hs]K-(F/7$$\"1****\\i_QQgFD$!1f21\\G.wqF/7$$\"1***\\7y% 3TiFD$!12/U:64kqF/7$$\"1****\\P![hY'FD$!1YQiY:4spF/7$$\"1LLL$Qx$omFD$! 1f?x1\"3L\"oF/7$$\"1+++v.I%)oFD$!1XeN]>VelF/7$$\"1mm\"zpe*zqFD$!1,!='Q pTYiF/7$$\"1+++D\\'QH(FD$!1NZ\\(HP;\"eF/7$$\"1KLe9S8&\\(FD$!1rQ?c153`F /7$$\"1***\\i?=bq(FD$!1,_;T&f%yYF/7$$\"1LLL3s?6zFD$!106+,x]bRF/7$$\"1+ +DJXaE\")FD$!1@5f()G=zIF/7$$\"1nmmm*RRL)FD$!1!>MTpYT6#F/7$$\"1mm;a<.Y& )FD$!1TSRS6)y)**F+7$$\"1LLe9tOc()FD$\"1N%)zymH7CF+7$$\"1+++]Qk\\*)FD$ \"1)H*H#pNI]\"F/7$$\"1LL$3dg6<*FD$\"1k;s]K2*4$F/7$$\"1++voTAq#*FD$\"1< y!\\\"3EmQF/7$$\"1mmmmxGp$*FD$\"1:)[EA$HnYF/7$$\"1L$eRA5\\Z*FD$\"1>(pY y(HfbF/7$$\"1++D\"oK0e*FD$\"1D5[)GZ6\\'F/7$$\"1+++]oi\"o*FD$\"1Uw)Q2=5 U(F/7$$\"1++v=5s#y*FD$\"1uW>J\"e')Q)F/7$$\"1+]P40O\"*)*FD$\"1tPvy1Lr%* F/7$$\"\"\"F($\"1++z11\"*f5FD-%'COLOURG6&%$RGBG$\"#5!\"\"F(F(-%+AXESLA BELSG6$%\"zG%!G-%%VIEWG6$;F(Fh[l;$Fb\\lFb\\l$\"\"#!\"#" 2 173 174 174 2 0 1 0 2 9 0 4 2 1.000000 45.000000 45.000000 10030 10061 10056 10074 0 0 0 20030 0 12020 0 0 0 0 0 0 0 1 1 0 0 0 170 125 0 0 0 0 0 0 }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 228 "This illustration clearly show s the only real root; the two complex roots are near the maximum in th e curve. Under slightly different conditions the curve will cross the \+ z axis in three places and we would have three real roots." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 15 "Exampl e 2 and 3" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 153 "Calculate the compre ssibility of ammonia at a reduced pressures of 1, 2, 4, 10, and 20 at \+ a temperature of 450 K.\n\nThe critical properties of ammonia are" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "CriticalProps[NH3]:=\{T[c] = 405.649994, P[c] = 11280000.0\}: CriticalProps[NH3];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#<$/&%\"TG6#%\"cG$\"*%**\\cS!\"'/&%\"PGF'$\"*++!G6! \"\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "where the temperature is \+ in kelvin and the pressure in pascals." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 57 "The reduced press ure is related to the actual pressure by" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "prdef:= P[c]=P[r]/P: prdef;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/&%\"PG6#%\"cG*&&F%6#%\"rG\"\"\"F%!\"\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 55 "We will use this relation in the substitu tion to follow" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "The temperature and pressure of interest \+ (in the same units) are" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 " Tspec:=T=450: Tspec;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/%\"TG\"$]%" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "The desired dimensionless pressu res are given in a list as" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "prlist := [1,2,4,10,20]: prlist;" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#7'\"\"\"\"\"#\"\"%\"#5\"#?" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "W e compute the compressibility at all reduced pressures in one loop " } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 207 "for Pr in prlist do\n lprint(`Reduced pressure i s `, Pr);\n zeqn:=subs(VDWparams,CriticalProps[NH3],P=P[r]*P[c],Criti calProps[NH3],Tspec,P[r]=Pr,polyz):\n result:=fsolve(zeqn,z,complex); \n print(result);\nod:" }}{PARA 6 "" 1 "" {TEXT -1 24 "Reduced pressu re is 1" }}{PARA 11 "" 1 "" {XPPMATH 20 "6%,&$\"+:abY?!#5\"\"\"%\"I G$!+B#R<9\"F&,&F$F'F($\"+B#R<9\"F&$\"+5ZpLqF&" }}{PARA 6 "" 1 "" {TEXT -1 24 "Reduced pressure is 2" }}{PARA 11 "" 1 "" {XPPMATH 20 "6%,&$\"+lq6*z$!#5\"\"\"%\"IG$!+ " 0 "" {MPLTEXT 1 0 90 "zeqn:=subs(VDWparam s,CriticalProps[NH3],P=P[r]*P[c],CriticalProps[NH3],Tspec,polyz): zeqn ;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/,**$%\"zG\"\"$\"\"\"*&,&&%\"PG6# %\"rG$!+Rb!o7\"!#5!\"\"F(F(F&\"\"#F(*&F+F(F&F($\"+^\\;GMF1*$F+F3$!+b_( G'Q!#6\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 114 "We can plot the r oots of this equation as a function of reduced pressure as follows. Fi rst we solve the polynomial" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "zroots := solve(zeqn,z);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%'zro otsG6%,**$,,*$&%\"PG6#%\"rG\"\"#\"?++++]7a:(Rh%\\\\dQF*!@+++++++++]icK Y?\"*$F*\"\"$\"=>e!y7$oE!z\"RXpI9\"@+++++++++++++++\"\"\"\"*$,*F1!I+++ ++AmG_,P6'H@Y\"R!Ra\"*$F*\"\"%\"HPsrFR2)=X\\-.J^SI(4pM&F)\"I++++++++++ (z-b?m#ev46*$F*\"\"&\"F918#z?D&p3F#[*H%RM\">j'#F5F.\",++++]\"#F5F2#F5 \",+++++$*&,(F*#\"*^`B@$\"+++++OF)#!4@03@Fs!pp7\"6++++++++++*#!\"\"\" \"*F5F5F(#FNF2!,+++++$F*#\"+Rb!o7\"FDFBF5,,F'#FN\",+++++'FEFAF*FRFBF5* (%\"IGF5F2F@,&F'FCFEFDF5F@,,F'FUFEFAF*FRFBF5FW#FNF." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "and plot the first root as a function of reduce d pressure." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "plot(zroots[ 1],P[r]=0.5..4,labels=[`P*`,`z`]);" }}{PARA 13 "" 1 "" {INLPLOT "6%-%' CURVESG6$7V7$$\"1+++++++]!#;$\"1d$oW'o'es)F*7$$\"1ML$eR+Hw&F*$\"16k!4T \"[.&)F*7$$\"1n;/^fpEkF*$\"1%yI=%\\!=I)F*7$$\"1LL3xM?trF*$\"1pvo&*>nk! )F*7$$\"1LLeR$fY#zF*$\"1=S+(*3J8yF*7$$\"1o;ajOas')F*$\"1n:VS^X[vF*7$$ \"1L$3x;GfO*F*$\"1*3yc8FvG(F*7$$\"1+v$fw)Q35!#:$\"1xj?kF*))*pF*7$$\"1L 3FR-k#3\"FN$\"1)o!yFU$on'F*7$$\"1+v=(e`m:\"FN$\"1i:bUM[FjF*7$$\"1nm\"H T&yK7FN$\"1mVvI+!\\$fF*7$$\"1L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#RFN$\"1#>WW!)\\t?(F*7$$\"\"%\"\"!$\"1 ji]%3+IJ(F*-%'COLOURG6&%$RGBG$\"#5!\"\"Fe[lFe[l-%+AXESLABELSG6$%#P*G% \"zG-%%VIEWG6$;$\"\"&F^\\lFc[l%(DEFAULTG" 2 161 157 157 2 0 1 0 2 9 0 4 2 1.000000 45.000000 45.000000 10030 10061 10056 10074 0 0 0 20030 0 12020 0 0 0 0 0 0 0 1 1 0 0 0 98 187 0 0 0 0 0 0 }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 23 "where we use the label " }{TEXT 271 1 "P" }{TEXT -1 33 "* to denote the reduced pressure." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 182 "We can obtain a \+ standard compressibility plot by repeating these calculations for othe r temperatures and displaying the results together. We leave this as a n exercise for the reader." }}}}}{MARK "0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }