Peng-Robinson EoS
This function allows calculating the compressibility factor, the fugacity coefficient and density of a pure compound for both liquid and vapour phases by means of the Peng-Robinson equation of state (PR EOS). Temperature, pressure, molar weigth, and supercritical properties of the selected compound are needed to be specified as parameters.
It is a Beta version, full version will include multicomponent systems and other equations of state.
function [Z,fhi,density] = PengRobinson(T,P,Tc,Pc,w,MW,Liquido)
Parameters: T,P,w,Tc,Pc,w,MW,Liquido
T: Temperature [=]K
P: Presure [=] Pa
Tc: critical temperature [=] K
Pc: critical presure [=] Pa
w: accentic factor
MW: molar weigth [=] kg /mol
Liquido: if Liquido = 1, liquid fugacity;
if Liquido = 0 vapor fugacity
Example:
[Z fhi density] = PengRobinson(273,2*1.013*1e5,304.21,7.382*1e6,0.225,0.044,1)
This MATLAB function provides an educational tool to predict fluid phase equilibrium and can be easily extended to a multicomponent system.
Cite As
Juan Garcia Serna (2026). Peng-Robinson EoS (https://www.mathworks.com/matlabcentral/fileexchange/4519-peng-robinson-eos), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 | Updated |
