[Python] Add ThermoPhase._native_mode

This commit is contained in:
Ingmar Schoegl 2023-03-24 11:50:17 -05:00 committed by Ray Speth
parent 124048f87b
commit 9b872641a7
2 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,7 @@ cdef extern from "cantera/thermo/ThermoPhase.h" namespace "Cantera":
cbool hasPhaseTransition()
cbool isPure()
cbool isCompressible()
string nativeMode()
stdmap[string, size_t] nativeState() except +translate_exception
vector[string] fullStates()
vector[string] partialStates()

View File

@ -331,6 +331,11 @@ cdef class ThermoPhase(_SolutionBase):
def __get__(self):
return self.thermo.isCompressible()
@property
def _native_mode(self):
""" Return string acronym representing native state """
return pystr(self.thermo.nativeMode())
property _native_state:
"""
Default properties defining a state