Question: Please compute python code for the following problem: ( b ) Generate a new plot of P vs V ? for 4 5 0 K

Please compute python code for the following problem:
(b) Generate a new plot of P vs V? for 450K(for the PR EOS). Add to this plot a horizontal line at
Pvap(450K) as predicted from the Antoine equation. Confirm that this value of Pvap crosses the
P vs V? plot at 3 points. You might need to tweak the range of your x-axis to see this. Then, using
the equal-area construction show that the Pvap obtained from the Antoine equation satisfies the
thermodynamic criteria for phase equilibrium TL=TV,PL=PV, and G??(L)=G??(V).
Hints:
Be careful with your units. You might also need to tweak the range of V? to see the three
intersections.
As discussed in class, you will want to divide your P vs V? curve into two regions, one part of
the "loop" that is less than Pvap and another part of the "loop" that is greater than Pvap.
To calculate the area of each region numerically use the numpy. trapz() function. Note that
this function takes the y-values as the 1st argument, and the x-values as then 2nd. If you're
having trouble with numpy.trapz try using it to calculate the area beneath a simple curve
(i.e.y=x or y=sin(x) and then move onto calculating the area within the "loop".
Don't forget to add/subtract the value of Pvap prior to performing the integration. The "height"
of your trapezoids in the integration step should be relative to Pvap,notP=0.Generate a new plot of P vs V for 450K (for the PR EOS). Add to this plot a horizontal line at
P
vap(450K) as predicted from the Antoine equation. Confirm that this value of P
vap crosses the
P vs V plot at 3 points. You might need to tweak the range of your x-axis to see this. Then, using
the equal-area construction show that the P
vap obtained from the Antoine equation satisfies the
thermodynamic criteria for phase equilibrium T
L = T
V , P
L = P
V , and G
L = G
V
.
 Please compute python code for the following problem: (b) Generate a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Chemical Engineering Questions!