VLE
- class thermosteam.equilibrium.VLE(imol=None, thermal_condition=None, thermo=None, bubble_point_cache=None, dew_point_cache=None)[source]
Create a VLE object that performs vapor-liquid equilibrium when called.
- Parameters
imol=None (MaterialIndexer, optional) – Molar chemical phase data is stored here.
thermal_condition=None (ThermalCondition, optional) – Temperature and pressure results are stored here.
thermo=None (Thermo, optional) – Themodynamic property package for equilibrium calculations. Defaults to thermosteam.settings.get_thermo().
bubble_point_cache=None (thermosteam.utils.Cache, optional) – Cache to retrieve bubble point object.
dew_point_cache=None (thermosteam.utils.Cache, optional) – Cache to retrieve dew point object
Examples
First create a VLE object:
>>> from thermosteam import indexer, equilibrium, settings >>> settings.set_thermo(['Water', 'Ethanol', 'Methanol', 'Propanol'], cache=True) >>> imol = indexer.MolarFlowIndexer( ... l=[('Water', 304), ('Ethanol', 30)], ... g=[('Methanol', 40), ('Propanol', 1)]) >>> vle = equilibrium.VLE(imol) >>> vle VLE(imol=MolarFlowIndexer( g=[('Methanol', 40), ('Propanol', 1)], l=[('Water', 304), ('Ethanol', 30)]), thermal_condition=ThermalCondition(T=298.15, P=101325))
Equilibrium given vapor fraction and pressure:
>>> vle(V=0.5, P=101325) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 126.7), ('Ethanol', 26.4), ('Methanol', 33.49), ('Propanol', 0.896)], l=[('Water', 177.3), ('Ethanol', 3.598), ('Methanol', 6.509), ('Propanol', 0.104)]), thermal_condition=ThermalCondition(T=363.88, P=101325))
Equilibrium given temperature and pressure:
>>> vle(T=363.88, P=101325) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 126.7), ('Ethanol', 26.4), ('Methanol', 33.49), ('Propanol', 0.8959)], l=[('Water', 177.3), ('Ethanol', 3.601), ('Methanol', 6.513), ('Propanol', 0.1041)]), thermal_condition=ThermalCondition(T=363.88, P=101325))
Equilibrium given enthalpy and pressure:
>>> H = vle.thermo.mixture.xH(vle.imol, T=363.88, P=101325) >>> vle(H=H, P=101325) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 126.7), ('Ethanol', 26.4), ('Methanol', 33.49), ('Propanol', 0.8959)], l=[('Water', 177.3), ('Ethanol', 3.601), ('Methanol', 6.513), ('Propanol', 0.1041)]), thermal_condition=ThermalCondition(T=363.88, P=101325))
Equilibrium given vapor fraction and temperature:
>>> vle(V=0.5, T=363.88) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 126.7), ('Ethanol', 26.4), ('Methanol', 33.49), ('Propanol', 0.896)], l=[('Water', 177.3), ('Ethanol', 3.598), ('Methanol', 6.509), ('Propanol', 0.104)]), thermal_condition=ThermalCondition(T=363.88, P=101317))
Equilibrium given enthalpy and temperature:
>>> vle(H=H, T=363.88) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 126.7), ('Ethanol', 26.4), ('Methanol', 33.49), ('Propanol', 0.8959)], l=[('Water', 177.3), ('Ethanol', 3.601), ('Methanol', 6.513), ('Propanol', 0.1041)]), thermal_condition=ThermalCondition(T=363.88, P=101325))
- __call__(P=None, H=None, T=None, V=None, x=None, y=None)[source]
Perform vapor-liquid equilibrium.
- Parameters
P=None (float) – Operating pressure [Pa].
H=None (float) – Enthalpy [kJ/hr].
T=None (float) – Operating temperature [K].
V=None (float) – Molar vapor fraction.
x=None (float) – Molar composition of liquid (for binary mixtures).
y=None (float) – Molar composition of vapor (for binary mixtures).
Notes
You may only specify two of the following parameters: P, H, T, V, x, and y. Additionally, If x or y is specified, the other parameter must be either P or T (e.g., x and V is invalid).
- property imol
[MaterialIndexer] Chemical phase data.
- property thermal_condition
[ThermalCondition] Temperature and pressure data.