IdealSolution: Molar volume not specified

25 views
Skip to first unread message

Ismael Wouters

unread,
Jul 12, 2024, 8:47:06 AM (10 days ago) Jul 12
to Cantera Users' Group
Hello,

I am trying to equilibrate a mixture with a liquid and gaseous phase. The gasses are set to ideal gas and the liquids ideal-condensed. 

My input YAML contains a condensed phase and a gaseous phase. For the species in the condensed phase, I added a molar-volume: xxx line to the input file. 

However, when I run the code I get the following: 
CanteraError thrown by IdealSolidSolnPhase::addSpecies:
Molar volume not specified for species XXX

What I don't quite understand is that I do NOT get this error if I set the condensed phase to: Ideal-solution-VPSS which also requires molar-volumes. 

I can't immediately find an explanation, as far as I can see in the documentation,  both ideal-condensed and ideal-solution-VPSS require the same kind of molar-volume input? 

Maybe someone has an explanation on how molar-volume is to be declared in theYAML file for ideal-condensed? 

p.s. I have attached my input file and python code. Condensed species from the input file that  I want to consider are: C8H18(L)n-octa, Jet-A(L), C6H6(L)

Thanks in advance!

cheers,
Ismael 



combined_gas_cond_NASA.yaml
test.py

Ray Speth

unread,
Jul 17, 2024, 8:14:31 PM (5 days ago) Jul 17
to Cantera Users' Group

Hi Ismael,

The molar volume should be specified as part of the equation-of-state field, not the thermo field, as described here. A full definition for a condensed phase species with a constant volume should look something like:

- name: C6H6(L) composition: {C: 6, H: 6} thermo: model: NASA7 temperature-ranges: [278.68, 500.0] data: - [63.6690229, -0.600534398, 2.6679281e-03, -5.06308828e-06, 3.63955562e-09, -1670.85472, -243.891797] note: X10/86 equation-of-state: model: constant-volume molar-volume: 0.08910

Setting the molar volume this way, I am able to run your test script with either the ideal-condensed or ideal-solution-VPSS thermo model.

Regards,
Ray

Ismael Wouters

unread,
Jul 19, 2024, 4:24:18 AM (3 days ago) Jul 19
to Cantera Users' Group
Hi Ray,

Thanks for the help!

kr,
Ismael 

Op donderdag 18 juli 2024 om 02:14:31 UTC+2 schreef Ray Speth:
Reply all
Reply to author
Forward
0 new messages