[Python] Set default constant property pair in Quantity.equilibrate
This commit is contained in:
parent
8299646059
commit
25b1dc90f2
1 changed files with 6 additions and 3 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue