VLE#
- class 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 (
Cache
, optional) – Cache to retrieve bubble point object.dew_point_cache=None (
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.38), ('Methanol', 33.49), ('Propanol', 0.8958)], l=[('Water', 177.3), ('Ethanol', 3.622), ('Methanol', 6.509), ('Propanol', 0.1042)]), thermal_condition=ThermalCondition(T=363.85, P=101325))
Equilibrium given temperature and pressure:
>>> vle(T=363.88, P=101325) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 127.4), ('Ethanol', 26.41), ('Methanol', 33.54), ('Propanol', 0.8968)], l=[('Water', 176.6), ('Ethanol', 3.59), ('Methanol', 6.456), ('Propanol', 0.1032)]), 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', 127.4), ('Ethanol', 26.41), ('Methanol', 33.54), ('Propanol', 0.8968)], l=[('Water', 176.6), ('Ethanol', 3.59), ('Methanol', 6.456), ('Propanol', 0.1032)]), thermal_condition=ThermalCondition(T=363.88, P=101325))
Equilibrium given entropy and pressure:
>>> S = vle.thermo.mixture.xS(vle.imol, T=363.88, P=101325) >>> vle(S=S, P=101325) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 127.4), ('Ethanol', 26.41), ('Methanol', 33.54), ('Propanol', 0.8968)], l=[('Water', 176.6), ('Ethanol', 3.59), ('Methanol', 6.456), ('Propanol', 0.1032)]), 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.38), ('Methanol', 33.49), ('Propanol', 0.8958)], l=[('Water', 177.3), ('Ethanol', 3.622), ('Methanol', 6.509), ('Propanol', 0.1042)]), thermal_condition=ThermalCondition(T=363.88, P=101431))
Equilibrium given enthalpy and temperature:
>>> vle(H=H, T=363.88) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 127.4), ('Ethanol', 26.41), ('Methanol', 33.54), ('Propanol', 0.8968)], l=[('Water', 176.6), ('Ethanol', 3.59), ('Methanol', 6.456), ('Propanol', 0.1032)]), thermal_condition=ThermalCondition(T=363.88, P=101325))
Non-partitioning heavy and gaseous chemicals also affect VLE. Calculation are repeated with non-partitioning chemicals:
>>> from thermosteam import indexer, equilibrium, settings, Chemical >>> O2 = Chemical('O2', phase='g') >>> Glucose = Chemical('Glucose', phase='l', default=True) >>> settings.set_thermo(['Water', 'Ethanol', 'Methanol', 'Propanol', O2, Glucose], cache=True) >>> imol = indexer.MolarFlowIndexer( ... l=[('Water', 304), ('Ethanol', 30), ('Glucose', 5)], ... g=[('Methanol', 40), ('Propanol', 1), ('O2', 10)]) >>> vle = equilibrium.VLE(imol) >>> vle(T=363.88, P=101325) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 159.5), ('Ethanol', 27.65), ('Methanol', 35.63), ('Propanol', 0.9337), ('O2', 10)], l=[('Water', 144.5), ('Ethanol', 2.352), ('Methanol', 4.369), ('Propanol', 0.0663), ('Glucose', 5)]), thermal_condition=ThermalCondition(T=363.88, P=101325))
>>> vle(V=0.5, P=101325) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 126.7), ('Ethanol', 26.38), ('Methanol', 33.52), ('Propanol', 0.8957), ('O2', 10)], l=[('Water', 177.3), ('Ethanol', 3.618), ('Methanol', 6.478), ('Propanol', 0.1043), ('Glucose', 5)]), thermal_condition=ThermalCondition(T=362.47, P=101325))
>>> H = vle.thermo.mixture.xH(vle.imol, T=363.88, P=101325) >>> vle(H=H, P=101325) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 127.4), ('Ethanol', 26.42), ('Methanol', 33.58), ('Propanol', 0.8968), ('O2', 10)], l=[('Water', 176.6), ('Ethanol', 3.583), ('Methanol', 6.421), ('Propanol', 0.1032), ('Glucose', 5)]), thermal_condition=ThermalCondition(T=362.51, P=101325))
>>> S = vle.thermo.mixture.xS(vle.imol, T=363.88, P=101325) >>> vle(S=S, P=101325) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 128.2), ('Ethanol', 26.45), ('Methanol', 33.63), ('Propanol', 0.8979), ('O2', 10)], l=[('Water', 175.8), ('Ethanol', 3.548), ('Methanol', 6.365), ('Propanol', 0.1021), ('Glucose', 5)]), thermal_condition=ThermalCondition(T=362.54, P=101325))
>>> vle(V=0.5, T=363.88) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 126.7), ('Ethanol', 26.38), ('Methanol', 33.49), ('Propanol', 0.8958), ('O2', 10)], l=[('Water', 177.3), ('Ethanol', 3.622), ('Methanol', 6.509), ('Propanol', 0.1042), ('Glucose', 5)]), thermal_condition=ThermalCondition(T=363.88, P=106841))
>>> vle(H=H, T=363.88) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 126.7), ('Ethanol', 26.38), ('Methanol', 33.49), ('Propanol', 0.8958), ('O2', 10)], l=[('Water', 177.3), ('Ethanol', 3.622), ('Methanol', 6.51), ('Propanol', 0.1042), ('Glucose', 5)]), thermal_condition=ThermalCondition(T=363.88, P=106842))
>>> vle(S=S, T=363.88) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 128.1), ('Ethanol', 26.45), ('Methanol', 33.6), ('Propanol', 0.8978), ('O2', 10)], l=[('Water', 175.9), ('Ethanol', 3.555), ('Methanol', 6.399), ('Propanol', 0.1022), ('Glucose', 5)]), thermal_condition=ThermalCondition(T=363.88, P=106562))
The presence of a non-partitioning gaseous chemical will result in some evaporation, even if the tempeture is below the saturated bubble point:
>>> from thermosteam import indexer, equilibrium, settings, Chemical >>> O2 = Chemical('O2', phase='g') >>> settings.set_thermo(['Water', O2], cache=True) >>> imol = indexer.MolarFlowIndexer( ... l=[('Water', 30)], ... g=[('O2', 10)]) >>> vle = equilibrium.VLE(imol) >>> vle(T=300., P=101325) >>> vle VLE(imol=MolarFlowIndexer( g=[('Water', 0.3617), ('O2', 10)], l=[('Water', 29.64)]), thermal_condition=ThermalCondition(T=300.00, P=101325))
- __call__(*, T=None, P=None, V=None, H=None, S=None, x=None, y=None)[source]#
Perform vapor-liquid equilibrium.
- Parameters:
T (float, optional) – Operating temperature [K].
P (float, optional) – Operating pressure [Pa].
V (float, optional) – Molar vapor fraction.
H (float, optional) – Enthalpy [kJ/hr].
S (float, optional) – Entropy [kJ/hr/K]
x (float, optional) – Molar composition of liquid (for binary mixtures).
y (float, optional) – 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.