Answered step by step
Verified Expert Solution
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 GPTProjectP
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, PengRobinson PR EOS. The systems to use are the same as those in Project P ie pure hydrogen sulfide. Therefore, you will need the data in Project P for reference.
You will use MathCad to perform your calculation. With a slight modification, the program for binary mixture you made in project P can be used for purecomponent calculations. The modification will be discussed in the instructions below.
For pure substance, the requirement for phase equilibrium is:
equivalently
where the superscripts are for phases V vapor and L liquid
Reproducing T diagrams of pure carbon dioxide
Save your MathCad program for BPDP 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 and This way the program will give you simultaneous access to each component. We can use the variable to calculate the properties of pure carbon dioxide, and use the variable to calculate the properties of pure hydrogen sulfide.
For each temperature of the saturation data you used in Project Pfrom 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 diagram. Use "symbols" for NIST data and "lines" for your calculation. Comment on the accuracy of the calculation results.
Reproducing diagram of pure hydrogen sulfide
To calculate the density in onephase 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 P For each temperature, be sure to include the saturated densities ie 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.
Plot simultaneously your NIST isothermal data and your calculation on a diagram. Then superimpose the NIST saturation data and its calculated values recorded in # on the same diagram.
Give comments on how PR EOS represents the whole phase diagram.
Flow charts of calculations:
diagram of pure substance
diagram of pure substance
Saturation curve
Onephase region
B Relationship between EOS and excess Gibbs energy model
Use your program for pure components to calculate the liquidphase fugacity coefficients of both components at all pressures you used in the flash calculation for diagram at K in Project P# even if the pure component is physically in its vapor phase in this case, the component is in a hypothetical liquid phase
You can build an excess Gibbs energy model representing the liquid phase of this mixture at using your record of fugacity coefficients in Project P and # above. Calculate the natural logarithm of the activity coefficients of both components and the dimensionless excess Gibbs energy of the mixture at 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 and Eq then use the procedure described in Chapter and
P
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started