SLE#

class SLE(imol=None, thermal_condition=None, thermo=None, activity_coefficient=None)[source]#

Create an SLE object that performs solid-liquid equilibrium for a given solute when called with a temperature and pressure.

Parameters:
  • imol=None (MaterialIndexer, optional) – Molar chemical phase data is stored here.

  • thermal_condition=None (ThermalCondition, optional) – The temperature and pressure used in calculations are stored here.

  • thermo=None (Thermo, optional) – Themodynamic property package for equilibrium calculations. Defaults to thermosteam.settings.get_thermo().

  • activity_coefficient=None (float) – Activity coefficient of solute in the liquid; only valid if thermo.Gamma is IdealActivityCoefficients.

Examples

Solve SLE of glucose in water:

>>> from thermosteam import Chemical, indexer, equilibrium, settings
>>> Glucose = Chemical('Glucose', Tm=419.15, Hfus=19930)
>>> Glucose.Cn.s.add_model(224.114064, top_priority=True)
>>> Glucose.Cn.l.add_model(360.312, top_priority=True) # More or less in solution
>>> settings.set_thermo(['Water', Glucose], cache=True)
>>> imol = indexer.MolarFlowIndexer(l=[('Water', 10), ('Glucose', 1)], phases=('s', 'l'))
>>> sle = equilibrium.SLE(imol)
>>> sle('Glucose', T=298.15) # Given T
>>> sle
SLE(imol=MolarFlowIndexer(
        l=[('Water', 10), ('Glucose', 0.01308)],
        s=[('Glucose', 0.9869)]),
    thermal_condition=ThermalCondition(T=298.15, P=101325))
>>> sle('Glucose', H=0.) # Given H
>>> sle
SLE(imol=MolarFlowIndexer(
        l=[('Water', 10), ('Glucose', 0.01306)],
        s=[('Glucose', 0.9869)]),
    thermal_condition=ThermalCondition(T=298.06, P=101325))

Results may not be too accurate sometimes, but the solubility (mol fraction of solute in solvent) may be specified:

>>> sle('Glucose', T=298.15, solubility=0.0833) # Given T
>>> sle
SLE(imol=MolarFlowIndexer(
        l=[('Water', 10), ('Glucose', 0.9087)],
        s=[('Glucose', 0.09131)]),
    thermal_condition=ThermalCondition(T=298.15, P=101325))
>>> sle('Glucose', H=90, solubility=0.0833) # Given H
>>> sle
SLE(imol=MolarFlowIndexer(
        l=[('Water', 10), ('Glucose', 0.9087)],
        s=[('Glucose', 0.09131)]),
    thermal_condition=ThermalCondition(T=292.41, P=101325))

Solve SLE of tetradecanol in octanol:

>>> from thermosteam import indexer, equilibrium, settings
>>> settings.set_thermo(['Methanol', 'Tetradecanol'], cache=True)
>>> imol = indexer.MolarFlowIndexer(l=[('Methanol', 10), ('Tetradecanol', 30)], phases=('s', 'l'))
>>> sle = equilibrium.SLE(imol)
>>> sle('Tetradecanol', T=300) # Given T
>>> sle
SLE(imol=MolarFlowIndexer(
        l=[('Methanol', 10), ('Tetradecanol', 19.07)],
        s=[('Tetradecanol', 10.93)]),
    thermal_condition=ThermalCondition(T=300.00, P=101325))
>>> sle('Tetradecanol', H=0.) # Given H
>>> sle
SLE(imol=MolarFlowIndexer(
        l=[('Methanol', 10), ('Tetradecanol', 6.116)],
        s=[('Tetradecanol', 23.88)]),
    thermal_condition=ThermalCondition(T=287.31, P=101325))

Solve SLE of pure tetradecanol:

>>> from thermosteam import indexer, equilibrium, settings
>>> settings.set_thermo(['Octanol', 'Tetradecanol'], cache=True)
>>> imol = indexer.MolarFlowIndexer(l=[('Tetradecanol', 30)], phases=('s', 'l'))
>>> sle = equilibrium.SLE(imol)
>>> sle('Tetradecanol', T=300) # Under melting point given T
>>> sle
SLE(imol=MolarFlowIndexer(phases=('l', 's'),
        s=[('Tetradecanol', 30)]),
    thermal_condition=ThermalCondition(T=300.00, P=101325))
>>> sle('Tetradecanol', T=320) # Over melting point given T
>>> sle
SLE(imol=MolarFlowIndexer(phases=('l', 's'),
        l=[('Tetradecanol', 30)]),
    thermal_condition=ThermalCondition(T=320.00, P=101325))
>>> sle('Tetradecanol', H=0.) # Under melting point given H
>>> sle
SLE(imol=MolarFlowIndexer(phases=('l', 's'),
        s=[('Tetradecanol', 30)]),
    thermal_condition=ThermalCondition(T=298.15, P=101325))
>>> sle('Tetradecanol', H=1000000) # Over melting point given H
>>> sle
SLE(imol=MolarFlowIndexer(phases=('l', 's'),
        l=[('Tetradecanol', 30)]),
    thermal_condition=ThermalCondition(T=317.59, P=101325))
>>> sle('Tetradecanol', H=500000) # At melting point given H
>>> sle
SLE(imol=MolarFlowIndexer(
        l=[('Tetradecanol', 13.2)],
        s=[('Tetradecanol', 16.8)]),
    thermal_condition=ThermalCondition(T=312.65, P=101325))
__call__(solute, T=None, P=None, H=None, solubility=None)[source]#

Perform solid-liquid equilibrium.

Parameters:
  • T (float, optional) – Operating temperature [K].

  • P (float, optional) – Operating pressure [Pa].

  • H (float, optional) – Operating enthalpy [kJ]

  • solubility (float, optional) – Mol fraction of solute at maximum solubility.