Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a python oror matlab program code for this project. I need code , gather requirement information from NIST and Chat GPT . Project -

Develop a python oror matlab program code for this project.
I need code , gather requirement information from NIST and Chat GPT.Project-P4
A. Constructing Phase Diagrams from Equation of State: Pure substance
In this project, you will learn how to construct phase diagrams for pure substances from cubic Equation of State (EOS), in this case, Peng-Robinson (PR) EOS. The systems to use are the same as those in Project P1, i.e., pure hydrogen sulfide. Therefore, you will need the data in Project P1 for reference.
You will use MathCad to perform your calculation. With a slight modification, the program for binary mixture you made in project P3 can be used for pure-component calculations. The modification will be discussed in the instructions below.
For pure substance, the requirement for phase equilibrium is:
fL=fV,or equivalently ,L=V
where the superscripts are for phases V (vapor) and L (liquid).
Reproducing P-T diagrams of pure carbon dioxide
Save your MathCad program for BP/DP calculation as a different file, and use this new file for modification specifically to calculate the properties of pure components.
Delete the equifugacity equations all the way down to the end. Then write some additional simple statements to show densities and fugacity coefficients of the phases (liquid and vapor), and importantly to calculate the vapor pressure.
Before we start the calculations, set the values x1=1 and y1=0. This way the program will give you simultaneous access to each component. We can use the variable x1 to calculate the properties of pure carbon dioxide, and use the variable y1 to calculate the properties of pure hydrogen sulfide.
For each temperature of the saturation data you used in Project P1(from NIST website), calculate the vapor pressure of pure hydrogen sulfide. The condition to be met in this case is that the fugacity coefficients in both phases (liquid and vapor) are equal. Implement this condition in your program. Print out the modified program and include it in your report.
Record the saturated pressures and the densities of both phases (for later use).
Plot simultaneously your NIST data and your calculation on a P-T diagram. Use "symbols" for NIST data and "lines" for your calculation. Comment on the accuracy of the calculation results.
Reproducing P- diagram of pure hydrogen sulfide
7. To calculate the density in one-phase region, ignore the part that calculates the vapor pressure. Calculate the density of hydrogen sulfide along its isotherms at each temperature and pressure you used in Project P1. For each temperature, be sure to include the saturated densities (i.e., the density of phases at the vapor pressure). If two possible phases appear in your calculation at pressures other than the vapor pressure, then you have to pick the density of the physical phase. Explain how you determine the physical phase.
8. Plot simultaneously your NIST isothermal data and your calculation on a P- diagram. Then superimpose the NIST saturation data and its calculated values recorded in #5 on the same diagram.
9. Give comments on how PR EOS represents the whole P- phase diagram.
Flow charts of calculations:
P-T diagram of pure substance
P- diagram of pure substance
Saturation curve
One-phase region
B. Relationship between EOS and excess Gibbs energy model
10. Use your program for pure components to calculate the liquid-phase fugacity coefficients of both components at all pressures you used in the flash calculation for P-xy diagram at T=277.6 K in Project P3(#9), even if the pure component is physically in its vapor phase (in this case, the component is in a hypothetical liquid phase).
11. You can build an excess Gibbs energy (GE) model representing the liquid phase of this mixture at T=277.6K using your record of fugacity coefficients in Project P3 and #10 above. Calculate the natural logarithm of the activity coefficients of both components and the dimensionless excess Gibbs energy of the mixture (GERT) at T=277.6K in the whole range of composition, and plot them with respect to the liquid mole fraction of carbon dioxide.
Hints: The activity coefficients can be calculated using the fugacity coefficients (see Eq 11.52 and Eq 11.90), then use the procedure described in Chapter 12(12.1 and 12.2).
12. P
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

=+ (d) Show that a cyclic permutation is ergodic but not mixing.

Answered: 1 week ago

Question

Prepare a constructive performance appraisal.

Answered: 1 week ago

Question

List the advantages of correct report formatting.

Answered: 1 week ago