TransWikia.com

PV diagram from cubic equation of state

Engineering Asked by user53681 on December 10, 2020

I want to calculate the density of CO2 using a cubic equation of state in order to plot the P-v diagram. From theory I know that I get one real root when the substance is in single-phase region and two when it is in two-phase region. In the latter case the smaller volume is associated to liquid while the other to vapor. I’m using Matlab to solve the cubic eos, incrementing the pressure and the temperature at fixed intervals. How can I merge the two solutions to represent the actual Pv plot?

One Answer

Set temperature as constant, make P change and find V solutions (if V(P,T) which according to what he is saying it is what he is doing...)

You HAVE to set one constant, since you want to plot PV you need to set T as constant.

In case it is P(V,T) you change the Volume and calculate the Pressure.

... I would recommend you do a loop to print out all the values then plot them in either Origin, Excel, by hand or whatever you want to use.

In case you don't know how to use loops (completely OK with that this is a place to learn) https://www.mathworks.com/help/matlab/ref/for.html

My recommendation? Use Fortran because Matlab takes AGES to solve but that is just personal preferrence.

Answered by Media on December 10, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP