thermo.chemical module

class thermo.chemical.Chemical(ID, T=298.15, P=101325)[source]

Bases: object

Creates a Chemical object which contains basic information such as molecular weight and the structure of the species, as well as thermodynamic and transport properties as a function of temperature and pressure.

Parameters:

ID : str

One of the following [-]:
  • Name, in IUPAC form or common form or a synonym registered in PubChem
  • InChI name, prefixed by ‘InChI=1S/’ or ‘InChI=1/’
  • InChI key, prefixed by ‘InChIKey=’
  • PubChem CID, prefixed by ‘PubChem=’
  • SMILES (prefix with ‘SMILES=’ to ensure smiles parsing)
  • CAS number

T : float, optional

Temperature of the chemical (default 298.15 K), [K]

P : float, optional

Pressure of the chemical (default 101325 Pa) [Pa]

Examples

Creating chemical objects:

>>> Chemical('hexane')
<Chemical [hexane], T=298.15 K, P=101325 Pa>
>>> Chemical('CCCCCCCC', T=500, P=1E7)
<Chemical [octane], T=500.00 K, P=10000000 Pa>
>>> Chemical('7440-36-0', P=1000)
<Chemical [antimony], T=298.15 K, P=1000 Pa>

Getting basic properties:

>>> N2 = Chemical('Nitrogen')
>>> N2.Tm, N2.Tb, N2.Tc # melting, boiling, and critical points [K]
(63.15, 77.355, 126.2)
>>> N2.Pt, N2.Pc # sublimation and critical pressure [Pa]
(12526.9697368421, 3394387.5)
>>> N2.CAS, N2.formula, N2.InChI, N2.smiles, N2.atoms # CAS number, formula, InChI string, smiles string, dictionary of atomic elements and their count
('7727-37-9', 'N2', 'N2/c1-2', 'N#N', {'N': 2})

Changing the T/P of the chemical, and gettign temperature-dependent properties:

>>> N2.Cp, N2.rho, N2.mu # Heat capacity [J/kg/K], density [kg/m^3], viscosity [Pa*s]
(1039.4978324480921, 1.1452416223829405, 1.7804740647270688e-05)
>>> N2.calculate(T=65, P=1E6) # set it to a liquid at 65 K and 1 MPa
>>> N2.phase
'l'
>>> N2.Cp, N2.rho, N2.mu # properties are now of the liquid phase
(1984.9709554303004, 861.3539919443364, 0.0002857739143670701)

Molar units are also available for properties:

>>> N2.Cpm, N2.Vm, N2.Hvapm # heat capacity [J/mol/K], molar volume [m^3/mol], enthalpy of vaporization [J/mol]
(55.60578536285118, 3.252251717875631e-05, 5982.710998291719)

A great deal of properties are available; for a complete list look at the attributes list.

>>> N2.alpha, N2.JT # thermal diffusivity [m^2/s], Joule-Thompson coefficient [K/Pa]
(9.963988241081473e-08, -4.0370955160282056e-07)
>>> N2.isentropic_exponent, N2.isobaric_expansion
(1.4000000000000001, 0.0047654228408661571)

For pure species, the phase is easily identified, allowing for properties to be obtained without needing to specify the phase. However, the properties are also available in the hypothetical gas phase (when under the boiling point) and in the hypothetical liquid phase (when above the boiling point) as these properties are needed to evaluate mixture properties. Specify the phase of a property to be retrieved by appending ‘l’ or ‘g’ or ‘s’ to the property.

>>> tol = Chemical('toluene')
>>> tol.rhog, tol.Cpg, tol.kg, tol.mug
(4.032009635018902, 1126.5533755283168, 0.010736843919054837, 6.973325939594919e-06)

Temperature dependent properties are calculated by objects which provide many useful features related to the properties. To determine the temperature at which nitrogen has a saturation pressure of 1 MPa:

>>> N2.VaporPressure.solve_prop(1E6)
103.73528598652341

To compute an integral of the ideal-gas heat capacity of nitrogen to determine the enthalpy required for a given change in temperature. Note the thermodynamic objects calculate values in molar units always.

>>> N2.HeatCapacityGas.T_dependent_property_integral(100, 120) # J/mol/K
582.0121860897898

Derivatives of properties can be calculated as well, as may be needed by for example heat transfer calculations:

>>> N2.SurfaceTension.T_dependent_property_derivative(77)
-0.00022695346296730534

If a property is needed at multiple temperatures or pressures, it is faster to use the object directly to perform the calculation rather than setting the conditions for the chemical.

>>> [N2.VaporPressure(T) for T in range(80, 120, 10)]
[135987.2098445901, 357853.1185240415, 773372.8975626591, 1458809.6559246336]

These objects are also how the methods by which the properties are calculated can be changed. To see the available methods for a property:

>>> N2.VaporPressure.all_methods
set(['VDI_PPDS', 'BOILING_CRITICAL', 'WAGNER_MCGARRY', 'AMBROSE_WALTON', 'COOLPROP', 'LEE_KESLER_PSAT', 'EOS', 'ANTOINE_POLING', 'SANJARI', 'DIPPR_PERRY_8E', 'Edalat', 'WAGNER_POLING'])

To specify the method which should be used for calculations of a property. In the example below, the Lee-kesler correlation for vapor pressure is specified.

>>> N2.calculate(80)
>>> N2.Psat
136979.4840843189
>>> N2.VaporPressure.set_user_methods('LEE_KESLER_PSAT')
>>> N2.Psat
134987.76815364443

For memory reduction, these objects are shared by all chemicals which are the same; new instances will use the same specified methods.

>>> N2_2 = Chemical('nitrogen')
>>> N2_2.VaporPressure.user_methods
['LEE_KESLER_PSAT']

To disable this behavior, set thermo.chemical.caching to False.

>>> thermo.chemical.caching = False
>>> N2_3 = Chemical('nitrogen')
>>> N2_3.VaporPressure.user_methods
[]

Properties may also be plotted via these objects:

>>> N2.VaporPressure.plot_T_dependent_property()
>>> N2.VolumeLiquid.plot_isotherm(T=77, Pmin=1E5, Pmax=1E7)
>>> N2.VolumeLiquid.plot_isobar(P=1E6,  Tmin=66, Tmax=120)
>>> N2.VolumeLiquid.plot_TP_dependent_property(Tmin=60, Tmax=100,  Pmin=1E5, Pmax=1E7)

Attributes

legal_status Dictionary of legal status indicators for the chemical.
economic_status Dictionary of economic status indicators for the chemical.
alpha Thermal diffusivity of the chemical at its current temperature, pressure, and phase in units of [m^2/s].
alphag Thermal diffusivity of the gas phase of the chemical at its current temperature and pressure, in units of [m^2/s].
alphal Thermal diffusivity of the liquid phase of the chemical at its current temperature and pressure, in units of [m^2/s].
API API gravity of the liquid phase of the chemical, [degrees].
aromatic_rings Number of aromatic rings in a chemical, computed with RDKit from a chemical’s SMILES.
atom_fractions Dictionary of atom:fractional occurence of the elements in a chemical.
Bvirial Second virial coefficient of the gas phase of the chemical at its current temperature and pressure, in units of [mol/m^3].
charge Charge of a chemical, computed with RDKit from a chemical’s SMILES.
Cp Mass heat capacity of the chemical at its current phase and temperature, in units of [J/kg/K].
Cpg Gas-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K].
Cpgm Gas-phase ideal gas heat capacity of the chemical at its current temperature, in units of [J/mol/K].
Cpl Liquid-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K].
Cplm Liquid-phase heat capacity of the chemical at its current temperature, in units of [J/mol/K].
Cpm Molar heat capacity of the chemical at its current phase and temperature, in units of [J/mol/K].
Cps Solid-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K].
Cpsm Solid-phase heat capacity of the chemical at its current temperature, in units of [J/mol/K].
Cvg Gas-phase ideal-gas contant-volume heat capacity of the chemical at its current temperature, in units of [J/kg/K].
Cvgm Gas-phase ideal-gas contant-volume heat capacity of the chemical at its current temperature, in units of [J/mol/K].
eos Equation of state object held by the chemical; used to calculate excess thermodynamic quantities, and also provides a vapor pressure curve, enthalpy of vaporization curve, fugacity, thermodynamic partial derivatives, and more; see thermo.eos for a full listing.
Hill Hill formula of a compound.
Hvap Enthalpy of vaporization of the chemical at its current temperature, in units of [J/kg].
Hvapm Enthalpy of vaporization of the chemical at its current temperature, in units of [J/mol].
isentropic_exponent Gas-phase ideal-gas isentropic exponent of the chemical at its current temperature, [dimensionless].
isobaric_expansion Isobaric (constant-pressure) expansion of the chemical at its current phase and temperature, in units of [1/K].
isobaric_expansion_g Isobaric (constant-pressure) expansion of the gas phase of the chemical at its current temperature and pressure, in units of [1/K].
isobaric_expansion_l Isobaric (constant-pressure) expansion of the liquid phase of the chemical at its current temperature and pressure, in units of [1/K].
JT Joule Thomson coefficient of the chemical at its current phase and temperature, in units of [K/Pa].
JTg Joule Thomson coefficient of the chemical in the gas phase at its current temperature and pressure, in units of [K/Pa].
JTl Joule Thomson coefficient of the chemical in the liquid phase at its current temperature and pressure, in units of [K/Pa].
k Thermal conductivity of the chemical at its current phase, temperature, and pressure in units of [W/m/K].
kg Thermal conductivity of the chemical in the gas phase at its current temperature and pressure, in units of [W/m/K].
kl Thermal conductivity of the chemical in the liquid phase at its current temperature and pressure, in units of [W/m/K].
mass_fractions Dictionary of atom:mass-weighted fractional occurence of elements.
mu Viscosity of the chemical at its current phase, temperature, and pressure in units of [Pa*s].
mug Viscosity of the chemical in the gas phase at its current temperature and pressure, in units of [Pa*s].
mul Viscosity of the chemical in the liquid phase at its current temperature and pressure, in units of [Pa*s].
nu Kinematic viscosity of the the chemical at its current temperature, pressure, and phase in units of [m^2/s].
nug Kinematic viscosity of the gas phase of the chemical at its current temperature and pressure, in units of [m^2/s].
nul Kinematic viscosity of the liquid phase of the chemical at its current temperature and pressure, in units of [m^2/s].
Parachor Parachor of the chemical at its current temperature and pressure, in units of [N^0.25*m^2.75/mol].
permittivity Relative permittivity (dielectric constant) of the chemical at its current temperature, [dimensionless].
Poynting Poynting correction factor [dimensionless] for use in phase equilibria methods based on activity coefficients or other reference states.
Pr Prandtl number of the chemical at its current temperature, pressure, and phase; [dimensionless].
Prg Prandtl number of the gas phase of the chemical at its current temperature and pressure, [dimensionless].
Prl Prandtl number of the liquid phase of the chemical at its current temperature and pressure, [dimensionless].
Psat Vapor pressure of the chemical at its current temperature, in units of [Pa].
PSRK_groups Dictionary of PSRK subgroup: count groups for the PSRK subgroups, as determined by DDBST’s online service.
rdkitmol RDKit object of the chemical, without hydrogen.
rdkitmol_Hs RDKit object of the chemical, with hydrogen.
rho Mass density of the chemical at its current phase and temperature and pressure, in units of [kg/m^3].
rhog Gas-phase mass density of the chemical at its current temperature and pressure, in units of [kg/m^3].
rhogm Molar density of the chemical in the gas phase at the current temperature and pressure, in units of [mol/m^3].
rhol Liquid-phase mass density of the chemical at its current temperature and pressure, in units of [kg/m^3].
rholm Molar density of the chemical in the liquid phase at the current temperature and pressure, in units of [mol/m^3].
rhom Molar density of the chemical at its current phase and temperature and pressure, in units of [mol/m^3].
rhos Solid-phase mass density of the chemical at its current temperature, in units of [kg/m^3].
rhosm Molar density of the chemical in the solid phase at the current temperature and pressure, in units of [mol/m^3].
rings Number of rings in a chemical, computed with RDKit from a chemical’s SMILES.
SG Specific gravity of the chemical, [dimensionless].
SGg Specific gravity of the gas phase of the chemical, [dimensionless].
SGl Specific gravity of the liquid phase of the chemical at the specified temperature and pressure, [dimensionless].
SGs Specific gravity of the solid phase of the chemical at the specified temperature and pressure, [dimensionless].
sigma Surface tension of the chemical at its current temperature, in units of [N/m].
solubility_parameter Solubility parameter of the chemical at its current temperature and pressure, in units of [Pa^0.5].
UNIFAC_Dortmund_groups Dictionary of Dortmund UNIFAC subgroup: count groups for the Dortmund UNIFAC subgroups, as determined by DDBST’s online service.
UNIFAC_groups Dictionary of UNIFAC subgroup: count groups for the original UNIFAC subgroups, as determined by DDBST’s online service.
UNIFAC_R UNIFAC R (normalized Van der Waals volume), dimensionless.
UNIFAC_Q UNIFAC Q (normalized Van der Waals area), dimensionless.
Van_der_Waals_area Unnormalized Van der Waals area, in units of [m^2/mol].
Van_der_Waals_volume Unnormalized Van der Waals volume, in units of [m^3/mol].
Vm Molar volume of the chemical at its current phase and temperature and pressure, in units of [m^3/mol].
Vmg Gas-phase molar volume of the chemical at its current temperature and pressure, in units of [mol/m^3].
Vml Liquid-phase molar volume of the chemical at its current temperature and pressure, in units of [mol/m^3].
Vms Solid-phase molar volume of the chemical at its current temperature, in units of [mol/m^3].
Z Compressibility factor of the chemical at its current phase and temperature and pressure, [dimensionless].
Zg Compressibility factor of the chemical in the gas phase at the current temperature and pressure, [dimensionless].
Zl Compressibility factor of the chemical in the liquid phase at the current temperature and pressure, [dimensionless].
Zs Compressibility factor of the chemical in the solid phase at the current temperature and pressure, [dimensionless].
T (float) Temperature of the chemical, [K]
P (float) Pressure of the chemical, [Pa]
phase (str) Phase of the chemical; one of ‘s’, ‘l’, ‘g’, or ‘l/g’.
ID (str) User specified string by which the chemical’s CAS was looked up.
CAS (str) The CAS number of the chemical.
PubChem (int) PubChem Compound identifier (CID) of the chemical; all chemicals are sourced from their database. Chemicals can be looked at online at https://pubchem.ncbi.nlm.nih.gov.
MW (float) Molecular weight of the compound, [g/mol]
formula (str) Molecular formula of the compound.
atoms (dict) dictionary of counts of individual atoms, indexed by symbol with proper capitalization, [-]
similarity_variable (float) Similarity variable, see thermo.elements.similarity_variable for the definition, [mol/g]
smiles (str) Simplified molecular-input line-entry system representation of the compound.
InChI (str) IUPAC International Chemical Identifier of the compound.
InChI_Key (str) 25-character hash of the compound’s InChI.
IUPAC_name (str) Preferred IUPAC name for a compound.
synonyms (list of strings) All synonyms for the compound found in PubChem, sorted by popularity.
Tm (float) Melting temperature [K]
Tb (float) Boiling temperature [K]
Tc (float) Critical temperature [K]
Pc (float) Critical pressure [Pa]
Vc (float) Critical volume [m^3/mol]
Zc (float) Critical compressibility [-]
rhoc (float) Critical density [kg/m^3]
rhocm (float) Critical molar density [mol/m^3]
omega (float) Acentric factor [-]
StielPolar (float) Stiel Polar factor, see thermo.acentric.StielPolar for the definition [-]
Tt (float) Triple temperature, [K]
Pt (float) Triple pressure, [Pa]
Hfus (float) Enthalpy of fusion [J/kg]
Hfusm (float) Molar enthalpy of fusion [J/mol]
Hsub (float) Enthalpy of sublimation [J/kg]
Hsubm (float) Molar enthalpy of sublimation [J/mol]
Hf (float) Enthalpy of formation [J/mol]
Hc (float) Molar enthalpy of combustion [J/mol]
Tflash (float) Flash point of the chemical, [K]
Tautoignition (float) Autoignition point of the chemical, [K]
LFL (float) Lower flammability limit of the gas in an atmosphere at STP, mole fraction [-]
UFL (float) Upper flammability limit of the gas in an atmosphere at STP, mole fraction [-]
TWA (tuple[quantity, unit]) Time-Weighted Average limit on worker exposure to dangerous chemicals.
STEL (tuple[quantity, unit]) Short-term Exposure limit on worker exposure to dangerous chemicals.
Ceiling (tuple[quantity, unit]) Ceiling limits on worker exposure to dangerous chemicals.
Skin (bool) Whether or not a chemical can be absorbed through the skin.
Carcinogen (str or dict) Carcinogen status information.
dipole (float) Dipole moment in debye, [3.33564095198e-30 ampere*second^2]
Stockmayer (float) Lennard-Jones depth of potential-energy minimum over k, [K]
molecular_diameter (float) Lennard-Jones molecular diameter, [angstrom]
GWP (float) Global warming potential (default 100-year outlook) (impact/mass chemical)/(impact/mass CO2), [-]
ODP (float) Ozone Depletion potential (impact/mass chemical)/(impact/mass CFC-11), [-]
logP (float) Octanol-water partition coefficient, [-]
RI (float) Refractive Index on the Na D line, [-]
RIT (float) Temperature at which refractive index reading was made
conductivity (float) Electrical conductivity of the fluid, [S/m]
conductivityT (float) Temperature at which conductivity measurement was made
VaporPressure (object) Instance of thermo.vapor_pressure.VaporPressure, with data and methods loaded for the chemical; performs the actual calculations of vapor pressure of the chemical.
EnthalpyVaporization (object) Instance of thermo.phase_change.EnthalpyVaporization, with data and methods loaded for the chemical; performs the actual calculations of molar enthalpy of vaporization of the chemical.
VolumeSolid (object) Instance of thermo.volume.VolumeSolid, with data and methods loaded for the chemical; performs the actual calculations of molar volume of the solid phase of the chemical.
VolumeLiquid (object) Instance of thermo.volume.VolumeLiquid, with data and methods loaded for the chemical; performs the actual calculations of molar volume of the liquid phase of the chemical.
VolumeGas (object) Instance of thermo.volume.VolumeGas, with data and methods loaded for the chemical; performs the actual calculations of molar volume of the gas phase of the chemical.
HeatCapacitySolid (object) Instance of thermo.heat_capacity.HeatCapacitySolid, with data and methods loaded for the chemical; performs the actual calculations of molar heat capacity of the solid phase of the chemical.
HeatCapacityLiquid (object) Instance of thermo.heat_capacity.HeatCapacityLiquid, with data and methods loaded for the chemical; performs the actual calculations of molar heat capacity of the liquid phase of the chemical.
HeatCapacityGas (object) Instance of thermo.heat_capacity.HeatCapacityGas, with data and methods loaded for the chemical; performs the actual calculations of molar heat capacity of the gas phase of the chemical.
ViscosityLiquid (object) Instance of thermo.viscosity.ViscosityLiquid, with data and methods loaded for the chemical; performs the actual calculations of viscosity of the liquid phase of the chemical.
ViscosityGas (object) Instance of thermo.viscosity.ViscosityGas, with data and methods loaded for the chemical; performs the actual calculations of viscosity of the gas phase of the chemical.
ThermalConductivityLiquid (object) Instance of thermo.thermal_conductivity.ThermalConductivityLiquid, with data and methods loaded for the chemical; performs the actual calculations of thermal conductivity of the liquid phase of the chemical.
ThermalConductivityGas (object) Instance of thermo.thermal_conductivity.ThermalConductivityGas, with data and methods loaded for the chemical; performs the actual calculations of thermal conductivity of the gas phase of the chemical.
SurfaceTension (object) Instance of thermo.interface.SurfaceTension, with data and methods loaded for the chemical; performs the actual calculations of surface tension of the chemical.
Permittivity (object) Instance of thermo.permittivity.Permittivity, with data and methods loaded for the chemical; performs the actual calculations of permittivity of the chemical.
Psat_298 (float) Vapor pressure of the chemical at 298.15 K, [Pa]
phase_STP (str) Phase of the chemical at 298.15 K and 101325 Pa; one of ‘s’, ‘l’, ‘g’, or ‘l/g’.
Vml_Tb (float) Molar volume of liquid phase at the normal boiling point [m^3/mol]
Vml_Tm (float) Molar volume of liquid phase at the melting point [m^3/mol]
Vml_STP (float) Molar volume of liquid phase at 298.15 K and 101325 Pa [m^3/mol]
Vmg_STP (float) Molar volume of gas phase at 298.15 K and 101325 Pa [m^3/mol]
Hvap_Tbm (float) Molar enthalpy of vaporization at the normal boiling point [J/mol]
Hvap_Tb (float) Mass enthalpy of vaporization at the normal boiling point [J/kg]

Methods

Bond([L])
Capillary([V])
Grashof([Tw, L])
Jakob([Tw])
Peclet_heat([V, D])
Reynolds([V, D])
Tsat(P)
Weber([V, D])
calc_H(T, P)
calc_H_excess(T, P)
calc_S(T, P)
calc_S_excess(T, P)
calculate([T, P])
calculate_PH(P, H)
calculate_PS(P, S)
calculate_TH(T, H)
calculate_TS(T, S)
draw_2d([width, height, Hs]) Interface for drawing a 2D image of the molecule.
draw_3d([width, height, style, Hs]) Interface for drawing an interactive 3D view of the molecule.
set_TP_sources()
set_constant_sources()
set_constants()
set_eos(T, P[, eos])
set_ref([T_ref, P_ref, phase_ref, H_ref, S_ref])
set_thermo()
A

Helmholtz energy of the chemical at its current temperature and pressure, in units of [J/kg].

This property requires that thermo.chemical.set_thermo ran successfully to be accurate. It also depends on the molar volume of the chemical at its current conditions.

API

API gravity of the liquid phase of the chemical, [degrees]. The reference condition is water at 15.6 °C (60 °F) and 1 atm (rho=999.016 kg/m^3, standardized).

Examples

>>> Chemical('water').API
9.999752435378895
Am

Helmholtz energy of the chemical at its current temperature and pressure, in units of [J/mol].

This property requires that thermo.chemical.set_thermo ran successfully to be accurate. It also depends on the molar volume of the chemical at its current conditions.

Bond(L=None)[source]
Bvirial

Second virial coefficient of the gas phase of the chemical at its current temperature and pressure, in units of [mol/m^3].

This property uses the object-oriented interface thermo.volume.VolumeGas, converting its result with thermo.utils.B_from_Z.

Examples

>>> Chemical('water').Bvirial
-0.0009596286322838357
Capillary(V=None)[source]
Cp

Mass heat capacity of the chemical at its current phase and temperature, in units of [J/kg/K].

Utilizes the object oriented interfaces thermo.heat_capacity.HeatCapacitySolid, thermo.heat_capacity.HeatCapacityLiquid, and thermo.heat_capacity.HeatCapacityGas to perform the actual calculation of each property. Note that those interfaces provide output in molar units (J/mol/K).

Examples

>>> w = Chemical('water')
>>> w.Cp, w.phase
(4180.597021827336, 'l')
>>> Chemical('palladium').Cp
234.26767209171211
Cpg

Gas-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.HeatCapacityGas; each Chemical instance creates one to actually perform the calculations. Note that that interface provides output in molar units.

Examples

>>> w = Chemical('water', T=520)
>>> w.Cpg
1967.6698314620658
Cpgm

Gas-phase ideal gas heat capacity of the chemical at its current temperature, in units of [J/mol/K]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.HeatCapacityGas; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('water').Cpgm
33.583577868850675
>>> Chemical('water').HeatCapacityGas.T_dependent_property(320)
33.67865044005934
>>> Chemical('water').HeatCapacityGas.T_dependent_property_integral(300, 320)
672.6480417835064
Cpl

Liquid-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.HeatCapacityLiquid; each Chemical instance creates one to actually perform the calculations. Note that that interface provides output in molar units.

Examples

>>> Chemical('water', T=320).Cpl
4177.518996988284

Ideal entropy change of water from 280 K to 340 K, output converted back to mass-based units of J/kg/K.

>>> dSm = Chemical('water').HeatCapacityLiquid.T_dependent_property_integral_over_T(280, 340)
>>> property_molar_to_mass(dSm, Chemical('water').MW)
812.1024585274956
Cplm

Liquid-phase heat capacity of the chemical at its current temperature, in units of [J/mol/K]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.HeatCapacityLiquid; each Chemical instance creates one to actually perform the calculations.

Notes

Some methods give heat capacity along the saturation line, some at 1 atm but only up to the normal boiling point, and some give heat capacity at 1 atm up to the normal boiling point and then along the saturation line. Real-liquid heat capacity is pressure dependent, but this interface is not.

Examples

>>> Chemical('water').Cplm
75.31462591538556
>>> Chemical('water').HeatCapacityLiquid.T_dependent_property(320)
75.2591744360631
>>> Chemical('water').HeatCapacityLiquid.T_dependent_property_integral(300, 320)
1505.0619005000553
Cpm

Molar heat capacity of the chemical at its current phase and temperature, in units of [J/mol/K].

Utilizes the object oriented interfaces thermo.heat_capacity.HeatCapacitySolid, thermo.heat_capacity.HeatCapacityLiquid, and thermo.heat_capacity.HeatCapacityGas to perform the actual calculation of each property.

Examples

>>> Chemical('cubane').Cpm
137.05489206785944
>>> Chemical('ethylbenzene', T=550, P=3E6).Cpm
294.18449553310046
Cps

Solid-phase heat capacity of the chemical at its current temperature, in units of [J/kg/K]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.HeatCapacitySolid; each Chemical instance creates one to actually perform the calculations. Note that that interface provides output in molar units.

Examples

>>> Chemical('palladium', T=400).Cps
241.63563239992484
>>> Pd = Chemical('palladium', T=400)
>>> Cpsms = [Pd.HeatCapacitySolid.T_dependent_property(T) for T in np.linspace(300,500, 5)]
>>> [property_molar_to_mass(Cps, Pd.MW) for Cps in Cpsms]
[234.40150347679008, 238.01856793835751, 241.63563239992484, 245.25269686149224, 248.86976132305958]
Cpsm

Solid-phase heat capacity of the chemical at its current temperature, in units of [J/mol/K]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.heat_capacity.HeatCapacitySolid; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('palladium').Cpsm
24.930765664000003
>>> Chemical('palladium').HeatCapacitySolid.T_dependent_property(320)
25.098979200000002
>>> Chemical('palladium').HeatCapacitySolid.all_methods
set(["Perry's Table 2-151", 'CRC Standard Thermodynamic Properties of Chemical Substances', 'Lastovka, Fulem, Becerra and Shaw (2008)'])
Cvg

Gas-phase ideal-gas contant-volume heat capacity of the chemical at its current temperature, in units of [J/kg/K]. Subtracts R from the ideal-gas heat capacity; does not include pressure-compensation from an equation of state.

Examples

>>> w = Chemical('water', T=520)
>>> w.Cvg
1506.1471795798861
Cvgm

Gas-phase ideal-gas contant-volume heat capacity of the chemical at its current temperature, in units of [J/mol/K]. Subtracts R from the ideal-gas heat capacity; does not include pressure-compensation from an equation of state.

Examples

>>> w = Chemical('water', T=520)
>>> w.Cvgm
27.13366316134193
Grashof(Tw=None, L=None)[source]
Hill

Hill formula of a compound. For a description of the Hill system, see thermo.elements.atoms_to_Hill.

Examples

>>> Chemical('furfuryl alcohol').Hill
'C5H6O2'
Hvap

Enthalpy of vaporization of the chemical at its current temperature, in units of [J/kg].

This property uses the object-oriented interface thermo.phase_change.EnthalpyVaporization, but converts its results from molar to mass units.

Examples

>>> Chemical('water', T=320).Hvap
2389540.219347256
Hvapm

Enthalpy of vaporization of the chemical at its current temperature, in units of [J/mol]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.phase_change.EnthalpyVaporization; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('water', T=320).Hvapm
43048.23612280223
>>> Chemical('water').EnthalpyVaporization.T_dependent_property(320)
43048.23612280223
>>> Chemical('water').EnthalpyVaporization.all_methods
set(['VDI_PPDS', 'MORGAN_KOBAYASHI', 'VETERE', 'VELASCO', 'LIU', 'COOLPROP', 'CRC_HVAP_298', 'CLAPEYRON', 'SIVARAMAN_MAGEE_KOBAYASHI', 'ALIBAKHSHI', 'DIPPR_PERRY_8E', 'RIEDEL', 'CHEN', 'PITZER', 'CRC_HVAP_TB'])
JT

Joule Thomson coefficient of the chemical at its current phase and temperature, in units of [K/Pa].

\[\mu_{JT} = \left(\frac{\partial T}{\partial P}\right)_H = \frac{1}{C_p} \left[T \left(\frac{\partial V}{\partial T}\right)_P - V\right] = \frac{V}{C_p}\left(\beta T-1\right)\]

Examples

>>> Chemical('water').JT
-2.2150394958666407e-07
JTg

Joule Thomson coefficient of the chemical in the gas phase at its current temperature and pressure, in units of [K/Pa].

\[\mu_{JT} = \left(\frac{\partial T}{\partial P}\right)_H = \frac{1}{C_p} \left[T \left(\frac{\partial V}{\partial T}\right)_P - V\right] = \frac{V}{C_p}\left(\beta T-1\right)\]

Utilizes the temperature-derivative method of thermo.volume.VolumeGas and the temperature-dependent heat capacity method thermo.heat_capacity.HeatCapacityGas to obtain the properties required for the actual calculation.

Examples

>>> Chemical('dodecane', T=400, P=1000).JTg
5.4089897835384913e-05
JTl

Joule Thomson coefficient of the chemical in the liquid phase at its current temperature and pressure, in units of [K/Pa].

\[\mu_{JT} = \left(\frac{\partial T}{\partial P}\right)_H = \frac{1}{C_p} \left[T \left(\frac{\partial V}{\partial T}\right)_P - V\right] = \frac{V}{C_p}\left(\beta T-1\right)\]

Utilizes the temperature-derivative method of thermo.volume.VolumeLiquid and the temperature-dependent heat capacity method thermo.heat_capacity.HeatCapacityLiquid to obtain the properties required for the actual calculation.

Examples

>>> Chemical('dodecane', T=400).JTl
-3.1037120844444807e-07
Jakob(Tw=None)[source]
PSRK_groups

Dictionary of PSRK subgroup: count groups for the PSRK subgroups, as determined by DDBST’s online service.

Examples

>>> pprint(Chemical('Cumene').PSRK_groups)
{1: 2, 9: 5, 13: 1}
Parachor

Parachor of the chemical at its current temperature and pressure, in units of [N^0.25*m^2.75/mol].

\[P = \frac{\sigma^{0.25} MW}{\rho_L - \rho_V}\]

Calculated based on surface tension, density of the liquid and gas phase, and molecular weight. For uses of this property, see thermo.utils.Parachor.

Examples

>>> Chemical('octane').Parachor
6.291693072841486e-05
Peclet_heat(V=None, D=None)[source]
Poynting

Poynting correction factor [dimensionless] for use in phase equilibria methods based on activity coefficients or other reference states. Performs the shortcut calculation assuming molar volume is independent of pressure.

\[\text{Poy} = \exp\left[\frac{V_l (P-P^{sat})}{RT}\right]\]

The full calculation normally returns values very close to the approximate ones. This property is defined in terms of pure components only.

Notes

The full equation shown below can be used as follows:

\[\text{Poy} = \exp\left[\frac{\int_{P_i^{sat}}^P V_i^l dP}{RT}\right]\]
>>> from scipy.integrate import quad
>>> c = Chemical('pentane', T=300, P=1E7)
>>> exp(quad(lambda P : c.VolumeLiquid(c.T, P), c.Psat, c.P)[0]/R/c.T)
1.5821826990975127

Examples

>>> Chemical('pentane', T=300, P=1E7).Poynting
1.5743051250679803
Pr

Prandtl number of the chemical at its current temperature, pressure, and phase; [dimensionless].

\[Pr = \frac{C_p \mu}{k}\]

Examples

>>> Chemical('acetone').Pr
4.450368847076066
Prg

Prandtl number of the gas phase of the chemical at its current temperature and pressure, [dimensionless].

\[Pr = \frac{C_p \mu}{k}\]

Utilizes the temperature and pressure dependent object oriented interfaces thermo.viscosity.ViscosityGas, thermo.thermal_conductivity.ThermalConductivityGas, and thermo.heat_capacity.HeatCapacityGas to calculate the actual properties.

Examples

>>> Chemical('NH3').Prg
0.847263731933008
Prl

Prandtl number of the liquid phase of the chemical at its current temperature and pressure, [dimensionless].

\[Pr = \frac{C_p \mu}{k}\]

Utilizes the temperature and pressure dependent object oriented interfaces thermo.viscosity.ViscosityLiquid, thermo.thermal_conductivity.ThermalConductivityLiquid, and thermo.heat_capacity.HeatCapacityLiquid to calculate the actual properties.

Examples

>>> Chemical('nitrogen', T=70).Prl
2.7655015690791696
Psat

Vapor pressure of the chemical at its current temperature, in units of [Pa]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.vapor_pressure.VaporPressure; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('water', T=320).Psat
10533.614271198725
>>> Chemical('water').VaporPressure.T_dependent_property(320)
10533.614271198725
>>> Chemical('water').VaporPressure.all_methods
set(['VDI_PPDS', 'BOILING_CRITICAL', 'WAGNER_MCGARRY', 'AMBROSE_WALTON', 'COOLPROP', 'LEE_KESLER_PSAT', 'EOS', 'ANTOINE_POLING', 'SANJARI', 'DIPPR_PERRY_8E', 'Edalat'])
R_specific

Specific gas constant, in units of [J/kg/K].

Examples

>>> Chemical('water').R_specific
461.52265188218
Reynolds(V=None, D=None)[source]
SG

Specific gravity of the chemical, [dimensionless].

For gas-phase conditions, this is calculated at 15.6 °C (60 °F) and 1 atm for the chemical and the reference fluid, air. For liquid and solid phase conditions, this is calculated based on a reference fluid of water at 4°C at 1 atm, but the with the liquid or solid chemical’s density at the currently specified conditions.

Examples

>>> Chemical('MTBE').SG
0.7428160596603596
SGg

Specific gravity of the gas phase of the chemical, [dimensionless]. The reference condition is air at 15.6 °C (60 °F) and 1 atm (rho=1.223 kg/m^3). The definition for gases uses the compressibility factor of the reference gas and the chemical both at the reference conditions, not the conditions of the chemical.

Examples

>>> Chemical('argon').SGg
1.3795835970877504
SGl

Specific gravity of the liquid phase of the chemical at the specified temperature and pressure, [dimensionless]. The reference condition is water at 4 °C and 1 atm (rho=999.017 kg/m^3). For liquids, SG is defined that the reference chemical’s T and P are fixed, but the chemical itself varies with the specified T and P.

Examples

>>> Chemical('water', T=365).SGl
0.9650065522428539
SGs

Specific gravity of the solid phase of the chemical at the specified temperature and pressure, [dimensionless]. The reference condition is water at 4 °C and 1 atm (rho=999.017 kg/m^3). The SG varries with temperature and pressure but only very slightly.

Examples

>>> Chemical('iron').SGs
7.87774317235069
Tsat(P)[source]
U

Internal energy of the chemical at its current temperature and pressure, in units of [J/kg].

This property requires that thermo.chemical.set_thermo ran successfully to be accurate. It also depends on the molar volume of the chemical at its current conditions.

UNIFAC_Dortmund_groups

Dictionary of Dortmund UNIFAC subgroup: count groups for the Dortmund UNIFAC subgroups, as determined by DDBST’s online service.

Examples

>>> pprint(Chemical('Cumene').UNIFAC_Dortmund_groups)
{1: 2, 9: 5, 13: 1}
UNIFAC_Q

UNIFAC Q (normalized Van der Waals area), dimensionless. Used in the UNIFAC model.

Examples

>>> Chemical('decane').UNIFAC_Q
6.016
UNIFAC_R

UNIFAC R (normalized Van der Waals volume), dimensionless. Used in the UNIFAC model.

Examples

>>> Chemical('benzene').UNIFAC_R
3.1878
UNIFAC_groups

Dictionary of UNIFAC subgroup: count groups for the original UNIFAC subgroups, as determined by DDBST’s online service.

Examples

>>> pprint(Chemical('Cumene').UNIFAC_groups)
{1: 2, 9: 5, 13: 1}
Um

Internal energy of the chemical at its current temperature and pressure, in units of [J/mol].

This property requires that thermo.chemical.set_thermo ran successfully to be accurate. It also depends on the molar volume of the chemical at its current conditions.

Van_der_Waals_area

Unnormalized Van der Waals area, in units of [m^2/mol].

Examples

>>> Chemical('hexane').Van_der_Waals_area
964000.0
Van_der_Waals_volume

Unnormalized Van der Waals volume, in units of [m^3/mol].

Examples

>>> Chemical('hexane').Van_der_Waals_volume
6.8261966e-05
Vm

Molar volume of the chemical at its current phase and temperature and pressure, in units of [m^3/mol].

Utilizes the object oriented interfaces thermo.volume.VolumeSolid, thermo.volume.VolumeLiquid, and thermo.volume.VolumeGas to perform the actual calculation of each property.

Examples

>>> Chemical('ethylbenzene', T=550, P=3E6).Vm
0.00017758024401627633
Vmg

Gas-phase molar volume of the chemical at its current temperature and pressure, in units of [mol/m^3]. For calculation of this property at other temperatures or pressures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.volume.VolumeGas; each Chemical instance creates one to actually perform the calculations.

Examples

Estimate the molar volume of the core of the sun, at 15 million K and 26.5 PetaPascals, assuming pure helium (actually 68% helium):

>>> Chemical('helium', T=15E6, P=26.5E15).Vmg
4.805464238181197e-07
Vml

Liquid-phase molar volume of the chemical at its current temperature and pressure, in units of [mol/m^3]. For calculation of this property at other temperatures or pressures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.volume.VolumeLiquid; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('cyclobutane', T=225).Vml
7.42395423425395e-05
Vms

Solid-phase molar volume of the chemical at its current temperature, in units of [mol/m^3]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.volume.VolumeSolid; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('iron').Vms
7.09593392630242e-06
Weber(V=None, D=None)[source]
Z

Compressibility factor of the chemical at its current phase and temperature and pressure, [dimensionless].

Examples

>>> Chemical('MTBE', T=900, P=1E-2).Z
0.9999999999079768
Zg

Compressibility factor of the chemical in the gas phase at the current temperature and pressure, [dimensionless].

Utilizes the object oriented interface and thermo.volume.VolumeGas to perform the actual calculation of molar volume.

Examples

>>> Chemical('sulfur hexafluoride', T=700, P=1E9).Zg
11.140084184207813
Zl

Compressibility factor of the chemical in the liquid phase at the current temperature and pressure, [dimensionless].

Utilizes the object oriented interface and thermo.volume.VolumeLiquid to perform the actual calculation of molar volume.

Examples

>>> Chemical('water').Zl
0.0007385375470263454
Zs

Compressibility factor of the chemical in the solid phase at the current temperature and pressure, [dimensionless].

Utilizes the object oriented interface and thermo.volume.VolumeSolid to perform the actual calculation of molar volume.

Examples

>>> Chemical('palladium').Z
0.00036248477437931853
absolute_permittivity

Absolute permittivity of the chemical at its current temperature, in units of [farad/meter]. Those units are equivalent to ampere^2*second^4/kg/m^3.

Examples

>>> Chemical('water', T=293.15).absolute_permittivity
7.096684821859018e-10
alpha

Thermal diffusivity of the chemical at its current temperature, pressure, and phase in units of [m^2/s].

\[\alpha = \frac{k}{\rho Cp}\]

Examples

>>> Chemical('furfural').alpha
7.672866198927953e-08
alphag

Thermal diffusivity of the gas phase of the chemical at its current temperature and pressure, in units of [m^2/s].

\[\alpha = \frac{k}{\rho Cp}\]

Utilizes the temperature and pressure dependent object oriented interfaces thermo.volume.VolumeGas, thermo.thermal_conductivity.ThermalConductivityGas, and thermo.heat_capacity.HeatCapacityGas to calculate the actual properties.

Examples

>>> Chemical('ammonia').alphag
1.6931865425158556e-05
alphal

Thermal diffusivity of the liquid phase of the chemical at its current temperature and pressure, in units of [m^2/s].

\[\alpha = \frac{k}{\rho Cp}\]

Utilizes the temperature and pressure dependent object oriented interfaces thermo.volume.VolumeLiquid, thermo.thermal_conductivity.ThermalConductivityLiquid, and thermo.heat_capacity.HeatCapacityLiquid to calculate the actual properties.

Examples

>>> Chemical('nitrogen', T=70).alphal
9.504101801042264e-08
aromatic_rings

Number of aromatic rings in a chemical, computed with RDKit from a chemical’s SMILES. If RDKit is not available, holds None.

Examples

>>> Chemical('Paclitaxel').aromatic_rings
3
atom_fractions

Dictionary of atom:fractional occurence of the elements in a chemical. Useful when performing element balances. For mass-fraction occurences, see mass_fractions.

Examples

>>> Chemical('Ammonium aluminium sulfate').atom_fractions
{'H': 0.25, 'S': 0.125, 'Al': 0.0625, 'O': 0.5, 'N': 0.0625}
calc_H(T, P)[source]
calc_H_excess(T, P)[source]
calc_S(T, P)[source]
calc_S_excess(T, P)[source]
calculate(T=None, P=None)[source]
calculate_PH(P, H)[source]
calculate_PS(P, S)[source]
calculate_TH(T, H)[source]
calculate_TS(T, S)[source]
charge

Charge of a chemical, computed with RDKit from a chemical’s SMILES. If RDKit is not available, holds None.

Examples

>>> Chemical('sodium ion').charge
1
draw_2d(width=300, height=300, Hs=False)[source]

Interface for drawing a 2D image of the molecule. Requires an HTML5 browser, and the libraries RDKit and IPython. An exception is raised if either of these libraries is absent.

Parameters:

width : int

Number of pixels wide for the view

height : int

Number of pixels tall for the view

Hs : bool

Whether or not to show hydrogen

Examples

>>> Chemical('decane').draw_2d()
draw_3d(width=300, height=500, style='stick', Hs=True)[source]

Interface for drawing an interactive 3D view of the molecule. Requires an HTML5 browser, and the libraries RDKit, pymol3D, and IPython. An exception is raised if all three of these libraries are absent.

Parameters:

width : int

Number of pixels wide for the view

height : int

Number of pixels tall for the view

style : str

One of ‘stick’, ‘line’, ‘cross’, or ‘sphere’

Hs : bool

Whether or not to show hydrogen

Examples

>>> Chemical('cubane').draw_3d()
economic_status

Dictionary of economic status indicators for the chemical.

Examples

>>> pprint(Chemical('benzene').economic_status)
["US public: {'Manufactured': 6165232.1, 'Imported': 463146.474, 'Exported': 271908.252}",
 u'1,000,000 - 10,000,000 tonnes per annum',
 u'Intermediate Use Only',
 'OECD HPV Chemicals']
eos

Equation of state object held by the chemical; used to calculate excess thermodynamic quantities, and also provides a vapor pressure curve, enthalpy of vaporization curve, fugacity, thermodynamic partial derivatives, and more; see thermo.eos for a full listing.

Examples

>>> Chemical('methane').eos.V_g
0.024410195021818258
isentropic_exponent

Gas-phase ideal-gas isentropic exponent of the chemical at its current temperature, [dimensionless]. Does not include pressure-compensation from an equation of state.

Examples

>>> Chemical('hydrogen').isentropic_exponent
1.405237786321222
isobaric_expansion

Isobaric (constant-pressure) expansion of the chemical at its current phase and temperature, in units of [1/K].

\[\beta = \frac{1}{V}\left(\frac{\partial V}{\partial T} \right)_P\]

Examples

Radical change in value just above and below the critical temperature of water:

>>> Chemical('water', T=647.1, P=22048320.0).isobaric_expansion
0.34074205839222449
>>> Chemical('water', T=647.2, P=22048320.0).isobaric_expansion
0.18143324022215077
isobaric_expansion_g

Isobaric (constant-pressure) expansion of the gas phase of the chemical at its current temperature and pressure, in units of [1/K].

\[\beta = \frac{1}{V}\left(\frac{\partial V}{\partial T} \right)_P\]

Utilizes the temperature-derivative method of thermo.VolumeGas to perform the actual calculation. The derivatives are all numerical.

Examples

>>> Chemical('Hexachlorobenzene', T=900).isobaric_expansion_g
0.001151869741981048
isobaric_expansion_l

Isobaric (constant-pressure) expansion of the liquid phase of the chemical at its current temperature and pressure, in units of [1/K].

\[\beta = \frac{1}{V}\left(\frac{\partial V}{\partial T} \right)_P\]

Utilizes the temperature-derivative method of thermo.volume.VolumeLiquid to perform the actual calculation. The derivatives are all numerical.

Examples

>>> Chemical('dodecane', T=400).isobaric_expansion_l
0.0011617555762469477
k

Thermal conductivity of the chemical at its current phase, temperature, and pressure in units of [W/m/K].

Utilizes the object oriented interfaces thermo.thermal_conductivity.ThermalConductivityLiquid and thermo.thermal_conductivity.ThermalConductivityGas to perform the actual calculation of each property.

Examples

>>> Chemical('ethanol', T=300).kl
0.16313594741877802
>>> Chemical('ethanol', T=400).kg
0.026019924109310026
kg

Thermal conductivity of the chemical in the gas phase at its current temperature and pressure, in units of [W/m/K].

For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.thermal_conductivity.ThermalConductivityGas; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('water', T=320).kg
0.021273128263091207
kl

Thermal conductivity of the chemical in the liquid phase at its current temperature and pressure, in units of [W/m/K].

For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.thermal_conductivity.ThermalConductivityLiquid; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('water', T=320).kl
0.6369957248212118
legal_status

Dictionary of legal status indicators for the chemical.

Examples

>>> pprint(Chemical('benzene').legal_status)
{'DSL': 'LISTED',
 'EINECS': 'LISTED',
 'NLP': 'UNLISTED',
 'SPIN': 'LISTED',
 'TSCA': 'LISTED'}
mass_fractions

Dictionary of atom:mass-weighted fractional occurence of elements. Useful when performing mass balances. For atom-fraction occurences, see atom_fractions.

Examples

>>> Chemical('water').mass_fractions
{'H': 0.11189834407236524, 'O': 0.8881016559276347}
mu

Viscosity of the chemical at its current phase, temperature, and pressure in units of [Pa*s].

Utilizes the object oriented interfaces thermo.viscosity.ViscosityLiquid and thermo.viscosity.ViscosityGas to perform the actual calculation of each property.

Examples

>>> Chemical('ethanol', T=300).mu
0.001044526538460911
>>> Chemical('ethanol', T=400).mu
1.1853097849748217e-05
mug

Viscosity of the chemical in the gas phase at its current temperature and pressure, in units of [Pa*s].

For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.viscosity.ViscosityGas; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('water', T=320, P=100).mug
1.0431450856297212e-05
mul

Viscosity of the chemical in the liquid phase at its current temperature and pressure, in units of [Pa*s].

For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.viscosity.ViscosityLiquid; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('water', T=320).mul
0.0005767262693751547
nu

Kinematic viscosity of the the chemical at its current temperature, pressure, and phase in units of [m^2/s].

\[\nu = \frac{\mu}{\rho}\]

Examples

>>> Chemical('argon').nu
1.3846930410865003e-05
nug

Kinematic viscosity of the gas phase of the chemical at its current temperature and pressure, in units of [m^2/s].

\[\nu = \frac{\mu}{\rho}\]

Utilizes the temperature and pressure dependent object oriented interfaces thermo.volume.VolumeGas, thermo.viscosity.ViscosityGas to calculate the actual properties.

Examples

>>> Chemical('methane', T=115).nug
2.5119305527611988e-06
nul

Kinematic viscosity of the liquid phase of the chemical at its current temperature and pressure, in units of [m^2/s].

\[\nu = \frac{\mu}{\rho}\]

Utilizes the temperature and pressure dependent object oriented interfaces thermo.volume.VolumeLiquid, thermo.viscosity.ViscosityLiquid to calculate the actual properties.

Examples

>>> Chemical('methane', T=110).nul
2.858184674118658e-07
permittivity

Relative permittivity (dielectric constant) of the chemical at its current temperature, [dimensionless].

For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.permittivity.Permittivity; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('toluene', T=250).permittivity
2.49775625
rdkitmol

RDKit object of the chemical, without hydrogen. If RDKit is not available, holds None.

For examples of what can be done with RDKit, see their website.

rdkitmol_Hs

RDKit object of the chemical, with hydrogen. If RDKit is not available, holds None.

For examples of what can be done with RDKit, see their website.

rho

Mass density of the chemical at its current phase and temperature and pressure, in units of [kg/m^3].

Utilizes the object oriented interfaces thermo.volume.VolumeSolid, thermo.volume.VolumeLiquid, and thermo.volume.VolumeGas to perform the actual calculation of each property. Note that those interfaces provide output in units of m^3/mol.

Examples

>>> Chemical('decane', T=550, P=2E6).rho
498.6549441720744
rhog

Gas-phase mass density of the chemical at its current temperature and pressure, in units of [kg/m^3]. For calculation of this property at other temperatures or pressures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.volume.VolumeGas; each Chemical instance creates one to actually perform the calculations. Note that that interface provides output in molar units.

Examples

Estimate the density of the core of the sun, at 15 million K and 26.5 PetaPascals, assuming pure helium (actually 68% helium):

>>> Chemical('helium', T=15E6, P=26.5E15).rhog
8329.27226509739

Compared to a result on Wikipedia of 150000 kg/m^3, the fundamental equation of state performs poorly.

>>> He = Chemical('helium', T=15E6, P=26.5E15)
>>> He.VolumeGas.set_user_methods_P(['IDEAL']); He.rhog
850477.8065477367

The ideal-gas law performs somewhat better, but vastly overshoots the density prediction.

rhogm

Molar density of the chemical in the gas phase at the current temperature and pressure, in units of [mol/m^3].

Utilizes the object oriented interface and thermo.volume.VolumeGas to perform the actual calculation of molar volume.

Examples

>>> Chemical('tungsten hexafluoride').rhogm
42.01349946063116
rhol

Liquid-phase mass density of the chemical at its current temperature and pressure, in units of [kg/m^3]. For calculation of this property at other temperatures and pressures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.volume.VolumeLiquid; each Chemical instance creates one to actually perform the calculations. Note that that interface provides output in molar units.

Examples

>>> Chemical('o-xylene', T=297).rhol
876.9946785618097
rholm

Molar density of the chemical in the liquid phase at the current temperature and pressure, in units of [mol/m^3].

Utilizes the object oriented interface and thermo.volume.VolumeLiquid to perform the actual calculation of molar volume.

Examples

>>> Chemical('nitrogen', T=70).rholm
29937.20179186975
rhom

Molar density of the chemical at its current phase and temperature and pressure, in units of [mol/m^3].

Utilizes the object oriented interfaces thermo.volume.VolumeSolid, thermo.volume.VolumeLiquid, and thermo.volume.VolumeGas to perform the actual calculation of each property. Note that those interfaces provide output in units of m^3/mol.

Examples

>>> Chemical('1-hexanol').rhom
7983.414573003429
rhos

Solid-phase mass density of the chemical at its current temperature, in units of [kg/m^3]. For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.volume.VolumeSolid; each Chemical instance creates one to actually perform the calculations. Note that that interface provides output in molar units.

Examples

>>> Chemical('iron').rhos
7869.999999999994
rhosm

Molar density of the chemical in the solid phase at the current temperature and pressure, in units of [mol/m^3].

Utilizes the object oriented interface and thermo.volume.VolumeSolid to perform the actual calculation of molar volume.

Examples

>>> Chemical('palladium').rhosm
112760.75925577903
rings

Number of rings in a chemical, computed with RDKit from a chemical’s SMILES. If RDKit is not available, holds None.

Examples

>>> Chemical('Paclitaxel').rings
7
set_TP_sources()[source]
set_constant_sources()[source]
set_constants()[source]
set_eos(T, P, eos=<class 'thermo.eos.PR'>)[source]
set_ref(T_ref=298.15, P_ref=101325, phase_ref='calc', H_ref=0, S_ref=0)[source]
set_thermo()[source]
sigma

Surface tension of the chemical at its current temperature, in units of [N/m].

For calculation of this property at other temperatures, or specifying manually the method used to calculate it, and more - see the object oriented interface thermo.interface.SurfaceTension; each Chemical instance creates one to actually perform the calculations.

Examples

>>> Chemical('water', T=320).sigma
0.06855002575793023
>>> Chemical('water', T=320).SurfaceTension.solve_prop(0.05)
416.8307110842183
solubility_parameter

Solubility parameter of the chemical at its current temperature and pressure, in units of [Pa^0.5].

\[\delta = \sqrt{\frac{\Delta H_{vap} - RT}{V_m}}\]

Calculated based on enthalpy of vaporization and molar volume. Normally calculated at STP. For uses of this property, see thermo.solubility.solubility_parameter.

Examples

>>> Chemical('NH3').solubility_parameter
24766.329043856073