Peng-Robinson EoS

Calculates the compressibility factor, fugacity coefficient and density of a pure component.
12.4K Downloads
Updated 4 Apr 2016

View License

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 (2024). Peng-Robinson EoS (https://www.mathworks.com/matlabcentral/fileexchange/4519-peng-robinson-eos), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Thermal Analysis in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Updated