Skip to content

Commit

Permalink
[Python] Set default constant property pair in Quantity.equilibrate
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Aug 24, 2015
1 parent 8299646 commit 25b1dc9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions interfaces/cython/cantera/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,14 @@ def gibbs(self):
"""
return self.mass * self.phase.gibbs_mass

def equilibrate(self, *args, **kwargs):
def equilibrate(self, XY=None, *args, **kwargs):
"""
Set the state to equilibrium. See `ThermoPhase.equilibrate`.
Set the state to equilibrium. By default, the property pair
`self.constant` is held constant. See `ThermoPhase.equilibrate`.
"""
self.phase.equilibrate(*args, **kwargs)
if XY is None:
XY = self.constant
self.phase.equilibrate(XY, *args, **kwargs)
self.state = self._phase.TDY

def __imul__(self, other):
Expand Down

0 comments on commit 25b1dc9

Please sign in to comment.