Mixture#

class Mixture(rule, Cn, H, S, H_excess, S_excess, mu, V, kappa, Hvap, sigma, epsilon, MWs, include_excess_energies=False)[source]#

Create an Mixture object for estimating mixture properties.

Parameters:
  • rule (str) – Description of mixing rules used.

  • Cn (function(phase, mol, T)) – Molar isobaric heat capacity mixture model [J/mol/K].

  • H (function(phase, mol, T)) – Enthalpy mixture model [J/mol].

  • S (function(phase, mol, T, P)) – Entropy mixture model [J/mol].

  • H_excess (function(phase, mol, T, P)) – Excess enthalpy mixture model [J/mol].

  • S_excess (function(phase, mol, T, P)) – Excess entropy mixture model [J/mol].

  • mu (function(phase, mol, T, P)) – Dynamic viscosity mixture model [Pa*s].

  • V (function(phase, mol, T, P)) – Molar volume mixture model [m^3/mol].

  • kappa (function(phase, mol, T, P)) – Thermal conductivity mixture model [W/m/K].

  • Hvap (function(mol, T)) – Heat of vaporization mixture model [J/mol]

  • sigma (function(mol, T, P)) – Surface tension mixture model [N/m].

  • epsilon (function(mol, T, P)) – Relative permitivity mixture model [-]

  • MWs (1d array[float]) – Component molecular weights [g/mol].

  • include_excess_energies=False (bool) – Whether to include excess energies in enthalpy and entropy calculations.

Notes

Although the mixture models are on a molar basis, this is only if the molar data is normalized before the calculation (i.e. the mol parameter is normalized before being passed to the model).

rule#

Description of mixing rules used.

Type:

str

include_excess_energies#

Whether to include excess energies in enthalpy and entropy calculations.

Type:

bool

Cn(phase, mol, T)#

Mixture molar isobaric heat capacity [J/mol/K].

mu(phase, mol, T, P)#

Mixture dynamic viscosity [Pa*s].

V(phase, mol, T, P)#

Mixture molar volume [m^3/mol].

kappa(phase, mol, T, P)#

Mixture thermal conductivity [W/m/K].

Hvap(mol, T, P)#

Mixture heat of vaporization [J/mol]

sigma(mol, T, P)#

Mixture surface tension [N/m].

epsilon(mol, T, P)#

Mixture relative permitivity [-].

MWs#

Component molecular weights [g/mol].

Type:

1d-array[float]

classmethod from_chemicals(chemicals, include_excess_energies=False, rule='ideal', cache=True)[source]#

Create a Mixture object from chemical objects.

Parameters:
  • chemicals (Iterable[Chemical]) – For retrieving pure component chemical data.

  • include_excess_energies=False (bool) – Whether to include excess energies in enthalpy and entropy calculations.

  • rule (str, optional) – Mixing rule. Defaults to ‘ideal’.

  • cache (optional) – Whether or not to use cached chemicals and cache new chemicals. Defaults to True.

See also

Mixture, IdealMixtureModel

Examples

Calculate enthalpy of evaporation for a water and ethanol mixture:

>>> from thermosteam import Mixture
>>> mixture = Mixture.from_chemicals(['Water', 'Ethanol'])
>>> mixture.Hvap([0.2, 0.8], 350)
39750.62

Calculate density for a water and ethanol mixture in g/L:

>>> from thermosteam import Mixture
>>> mixture = Mixture.from_chemicals(['Water', 'Ethanol'])
>>> mixture.get_property('rho', 'g/L', 'l', [0.2, 0.8], 350, 101325)
754.23
MW(mol)[source]#

Return molecular weight [g/mol] given molar array [mol].

rho(phase, mol, T, P)[source]#

Mixture density [kg/m^3]

Cp(phase, mol, T)[source]#

Mixture isobaric heat capacity [J/g/K]

alpha(phase, mol, T, P)[source]#

Mixture thermal diffusivity [m^2/s].

nu(phase, mol, T, P)[source]#

Mixture kinematic viscosity [m^2/s].

Pr(phase, mol, T, P)[source]#

Mixture Prandtl number [-].

xrho(phase_mol, T, P)[source]#

Multi-phase mixture density [kg/m3].

xCp(phase_mol, T)[source]#

Multi-phase mixture isobaric heat capacity [J/g/K].

xalpha(phase_mol, T, P)[source]#

Multi-phase mixture thermal diffusivity [m^2/s].

xnu(phase_mol, T, P)[source]#

Multi-phase mixture kinematic viscosity [m^2/s].

xPr(phase_mol, T, P)[source]#

Multi-phase mixture Prandtl number [-].

get_property(name, units, *args, **kwargs)[source]#

Return property in requested units.

Parameters:
  • name (str) – Name of stream property.

  • units (str) – Units of measure.

  • *args – Phase, material and thermal condition.

  • **kwargs – Phase, material and thermal condition.

H(phase, mol, T, P)[source]#

Return enthalpy [J/mol].

S(phase, mol, T, P)[source]#

Return entropy in [J/mol/K].

solve_T_at_HP(phase, mol, H, T_guess, P)[source]#

Solve for temperature in Kelvin.

xsolve_T_at_HP(phase_mol, H, T_guess, P)[source]#

Solve for temperature in Kelvin.

solve_T_at_SP(phase, mol, S, T_guess, P)[source]#

Solve for temperature in Kelvin.

xsolve_T_at_SP(phase_mol, S, T_guess, P)[source]#

Solve for temperature in Kelvin.

xCn(phase_mol, T, P=None)[source]#

Multi-phase mixture molar isobaric heat capacity [J/mol/K].

xH(phase_mol, T, P)[source]#

Multi-phase mixture enthalpy [J/mol].

xS(phase_mol, T, P)[source]#

Multi-phase mixture entropy [J/mol/K].

xV(phase_mol, T, P)[source]#

Multi-phase mixture molar volume [mol/m^3].

xmu(phase_mol, T, P)[source]#

Multi-phase mixture hydrolic [Pa*s].

xkappa(phase_mol, T, P)[source]#

Multi-phase mixture thermal conductivity [W/m/K].