mutationpp / Mutationpp

The MUlticomponent Thermodynamic And Transport library for IONized gases in C++
GNU Lesser General Public License v3.0
103 stars 58 forks source link

Liquid density #196

Open grgbellasvki opened 2 years ago

grgbellasvki commented 2 years ago

By running mppequil with a mixture containing liquid water, the returned density is ambiguous.

For example, in the mixture (water.xml):

<mixture thermo_db="NASA-9" state_model="EquilTP" mechanism="none">

<species>
     O H H2O H2O(L) H2O(cr)
</species>

<element_compositions default="water">
    <composition name="water"> H:2, O:1 </composition>
    </element_compositions>
</mixture>

mppequil mppequil -T 300 -P 101325 -m 0,1 -s 3 water returns:

Th[K]         P[Pa]        "rho_O[kg/m^3]"  "rho_H[kg/m^3]"  "rho_H2O[kg/m^3]"  "rho_H2O(L)[kg/m^3]"  "rho_H2O(cr)[kg/m^3]"
 300          101325       0                 0                 0                0.731816              0

while it should be in principle equal to 997 [kg/m^3].

In all the verification cases I ran, the multiphase equilibrium solver seems to working ok and consistent with literature. Same for all the other thermodynamics properties. The problem might just be that the perfect gas equation of state is applied for liquid species.

tdstoff commented 1 year ago

I noticed this issue as well. It does seem to be calculating the liquid density based on ideal gas law. I wonder if there have been any discussions about using the stiffened gas equation of state or some other variation?