van der Waal's P-V diagram (using numerical methods)

This code calculates the critical temperature and phase transformation pressure for a given temperature using van der Waal's EoS.
Updated 6 Feb 2021

View License

Van der Waal's equation of state is one of the most well-known real equations of state. This script numerically calculates the points of inflection of the P-V isotherms and then finds the critical temperature of a given substance (i.e. when the points of inflection coincide).
Also, it calculates the pressure at which the phase transformation will occur, i.e. when the area enclosed by P-V isotherm and that constant pressure line above and below the constant P line is the same. This code is based on numerical methods so it may not give results in the shortest possible time.
*Please rate it if you like it !!!*

Cite As

Rohit Jangir (2024). van der Waal's P-V diagram (using numerical methods) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

Bug fixes.


Minor code improvements.


Inclusion of compressibility factor.


Minor code improvements.


Use of while loop instead of for loop to be able to change the loop increment to increase accuracy.