Cantera / cantera

Chemical kinetics, thermodynamics, and transport tool suite
https://cantera.org
Other
581 stars 342 forks source link

NotImplementedError thrown by ThermoPhase::satPressure: #1646

Closed pjohn71 closed 7 months ago

pjohn71 commented 7 months ago

Problem description Calling cantera.Solution.P_sat throws NotImplementedError thrown by ThermoPhase::satPressure:

I might not be calling the P_sat property very well. I will be glad if I can be directed on how to used the P_sat property from the Solution Class in cantera

Steps to reproduce Run the code below:

import cantera as ct fuel_obj = ct.Solution("gri30.yaml") fuel_obj.TPX = 300, 101325, 'CH4:1.0' print(fuel_obj.P_sat)

Behavior I got the following error File cantera/thermo.pyx:1392, in cantera._cantera.ThermoPhase.P_sat.get()

CanteraError:


NotImplementedError thrown by ThermoPhase::satPressure: Not implemented.


System information

Attachments

Additional context

bryanwweber commented 7 months ago

Hi, this is because gri30.yaml is an ideal gas phase, which doesn't have a saturation pressure by definition. Currently in Cantera, you can create https://cantera.org/documentation/docs-3.0/sphinx/html/cython/importing.html#pure-fluid-phases that support the saturation pressure.

If you want to provide more details about your use case and ask further questions, can you please post on the Users' Group https://groups.google.com/g/cantera-users since this is not an issue with Cantera itself? Thanks 😄

pjohn71 commented 7 months ago

I have posted the question on the google groups