[Python] Set default constant property pair in Quantity.equilibrate

This commit is contained in:
Ray Speth 2015-08-05 19:38:20 -04:00
parent 8299646059
commit 25b1dc90f2

View file

@ -123,11 +123,14 @@ class Quantity(object):
"""
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):