Liquid/Gas transport properties in Cantera

740 views
Skip to first unread message

Chris Neal

unread,
May 31, 2018, 1:41:40 PM5/31/18
to Cantera Users' Group
I currently have a data processing pipeline that does the following

1.) Have Cantera create a Solution() object using a reaction mechanism(say H2O2.cti for example)
2.) Set up mass fractions for each species in the reaction mechanism, and a temperature and pressure
3.) Query the mixture viscosity and thermal conductivity

I had the following questions:
1.) Where/how does Cantera set which transport property method is used?
2.) Does Cantera have a way to distinguish between liquid and vapor properties?

I did a quick comparison for hydrogen at 2MPa and 20K versus the NIST database, and the viscosity that Cantera gives is off by factor of 18(I'm assuming that it's because Hydrogen is liquid at those conditions, and Cantera is not accounting for the change is phase)

I stumbled upon CoolProp recently, and I'm curious about whether it might be easier to use that code for this part of my processing pipeline. 

Bryan W. Weber

unread,
Jun 1, 2018, 4:04:24 PM6/1/18
to Cantera Users' Group
Chris,

The h2o2.cti file implements the ideal_gas phase (https://github.com/Cantera/cantera/blob/master/data/inputs/h2o2.cti#L3) and ideal gases obviously can't liquify. So no, Cantera is not accounting for the phase change. The default transport model is set in the input file in the transport keyword of the ideal_gas phase: https://cantera.org/docs/sphinx/html/cti/classes.html#cantera.ctml_writer.ideal_gas and you can set it in a Python script (for example) with gas.transport_model = 'Mix' or gas.transport_model = 'Multi'

Cantera can do liquid and vapor phases, see for instance the substances in liquidvapor.cti (https://github.com/Cantera/cantera/blob/master/data/inputs/liquidvapor.cti) which get you instances of the PureFluid class (https://cantera.org/docs/sphinx/html/cython/examples/thermo_critical_properties.html). However, the support for the full range of liquid and vapor phases is not well implemented outside the substances available in liquidvapor.cti (you can use the R-K EOS if you want, see https://github.com/Cantera/wssci-2018-materials/blob/master/non-ideal-models/co2_RK_example.cti).

In your case, it seems like CoolProp might be a better bet since it has robust support for a lot of substances. That said, if you want to help implement it, we're considering adding an interface to CoolProp in Cantera: https://github.com/Cantera/cantera/wiki/GSoC-2018-Ideas#implement-an-interface-to-the-coolprop-library

Best,
Bryan

Christopher Neal

unread,
Jun 7, 2018, 6:07:30 PM6/7/18
to Cantera Users' Group
Thanks Bryan. Cantera's reaction mechanism parser is really nice to have because it stores data for all species in the reaction mechanism. The issue that I think might arise if trying to use CoolProp is that data for some of the species in the mechanism might not be tabulated in CoolProp's database.  For what I'm working on, there's likely just 1 or 2 species that would need to have special calculation of viscosity, and the rest could just be treated using whatever method Cantera uses for estimating species viscosities(some sort of ideal-gas-like estimation using kinetic theory I assume?)

I'm thinking of creating my own Wilke rule for the mixture & using Cantera to get data such as the molecular weight of the species and viscosities for most of the species & then using CoolProp to get the more detailed viscosity for the 1 or 2 species that might be supercritical. I believe Cantera uses the Wilke rule method for it's mixtures to get the viscosity and thermal conductivity.
Reply all
Reply to author
Forward
0 new messages