Chemical Constants and Correlations (thermo.chemical_package)¶
This module contains classes for storing data and objects which are necessary for doing thermodynamic calculations. The intention for these classes is to serve as an in-memory storage layer between the disk and methods which do full thermodynamic calculations.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
Chemical Constants Class¶
- class thermo.chemical_package.ChemicalConstantsPackage(CASs=None, names=None, MWs=None, Tms=None, Tbs=None, Tcs=None, Pcs=None, Vcs=None, omegas=None, Zcs=None, rhocs=None, rhocs_mass=None, Hfus_Tms=None, Hfus_Tms_mass=None, Hvap_Tbs=None, Hvap_Tbs_mass=None, Vml_STPs=None, rhol_STPs=None, rhol_STPs_mass=None, Vml_60Fs=None, rhol_60Fs=None, rhol_60Fs_mass=None, Vmg_STPs=None, rhog_STPs=None, rhog_STPs_mass=None, Hfgs=None, Hfgs_mass=None, Gfgs=None, Gfgs_mass=None, Sfgs=None, Sfgs_mass=None, S0gs=None, S0gs_mass=None, Hf_STPs=None, Hf_STPs_mass=None, Tts=None, Pts=None, Hsub_Tts=None, Hsub_Tts_mass=None, Hcs=None, Hcs_mass=None, Hcs_lower=None, Hcs_lower_mass=None, Tflashs=None, Tautoignitions=None, LFLs=None, UFLs=None, TWAs=None, STELs=None, Ceilings=None, Skins=None, Carcinogens=None, legal_statuses=None, economic_statuses=None, GWPs=None, ODPs=None, logPs=None, Psat_298s=None, Hvap_298s=None, Hvap_298s_mass=None, Vml_Tms=None, rhos_Tms=None, Vms_Tms=None, rhos_Tms_mass=None, sigma_STPs=None, sigma_Tbs=None, sigma_Tms=None, RIs=None, RI_Ts=None, conductivities=None, conductivity_Ts=None, charges=None, dipoles=None, Stockmayers=None, molecular_diameters=None, Van_der_Waals_volumes=None, Van_der_Waals_areas=None, Parachors=None, StielPolars=None, atomss=None, atom_fractions=None, similarity_variables=None, phase_STPs=None, solubility_parameters=None, PubChems=None, formulas=None, smiless=None, InChIs=None, InChI_Keys=None, UNIFAC_groups=None, UNIFAC_Dortmund_groups=None, PSRK_groups=None, UNIFAC_Rs=None, UNIFAC_Qs=None)[source]¶
Class for storing efficiently chemical constants for a group of components. This is intended as a base object from which a set of thermodynamic methods can access miscellaneous for purposes such as phase identification or initialization.
- Parameters
- Nint
Number of components in the package, [-].
- cmpsrange
Iterator over all components, [-].
- rhol_60Fslist[float]
Liquid molar densities for each component at 60 °F, [mol/m^3].
- atom_fractionslist[dict]
Breakdown of each component into its elemental fractions, as a dict, [-].
- atomsslist[dict]
Breakdown of each component into its elements and their counts, as a dict, [-].
- Carcinogenslist[dict]
Status of each component in cancer causing registries, [-].
- CASslist[str]
CAS registration numbers for each component, [-].
- Ceilingslist[tuple[(float, str)]]
Ceiling exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
- chargeslist[float]
Charge number (valence) for each component, [-].
- conductivitieslist[float]
Electrical conductivities for each component, [S/m].
- conductivity_Tslist[float]
Temperatures at which the electrical conductivities for each component were measured, [K].
- dipoleslist[float]
Dipole moments for each component, [debye].
- economic_statuseslist[dict]
Status of each component in in relation to import and export from various regions, [-].
- formulaslist[str]
Formulas of each component, [-].
- Gfgslist[float]
Ideal gas standard molar Gibbs free energy of formation for each component, [J/mol].
- Gfgs_masslist[float]
Ideal gas standard Gibbs free energy of formation for each component, [J/kg].
- GWPslist[float]
Global Warming Potentials for each component (impact/mass chemical)/(impact/mass CO2), [-].
- Hcslist[float]
Higher standard molar heats of combustion for each component, [J/mol].
- Hcs_masslist[float]
Higher standard heats of combustion for each component, [J/kg].
- Hcs_lowerlist[float]
Lower standard molar heats of combustion for each component, [J/mol].
- Hcs_lower_masslist[float]
Lower standard heats of combustion for each component, [J/kg].
- Hfgslist[float]
Ideal gas standard molar enthalpies of formation for each component, [J/mol].
- Hfgs_masslist[float]
Ideal gas standard enthalpies of formation for each component, [J/kg].
- Hfus_Tmslist[float]
Molar heats of fusion for each component at their respective melting points, [J/mol].
- Hfus_Tms_masslist[float]
Heats of fusion for each component at their respective melting points, [J/kg].
- Hsub_Ttslist[float]
Heats of sublimation for each component at their respective triple points, [J/mol].
- Hsub_Tts_masslist[float]
Heats of sublimation for each component at their respective triple points, [J/kg].
- Hvap_298slist[float]
Molar heats of vaporization for each component at 298.15 K, [J/mol].
- Hvap_298s_masslist[float]
Heats of vaporization for each component at 298.15 K, [J/kg].
- Hvap_Tbslist[float]
Molar heats of vaporization for each component at their respective normal boiling points, [J/mol].
- Hvap_Tbs_masslist[float]
Heats of vaporization for each component at their respective normal boiling points, [J/kg].
- InChI_Keyslist[str]
InChI Keys for each component, [-].
- InChIslist[str]
InChI strings for each component, [-].
- legal_statuseslist[dict]
Status of each component in in relation to import and export rules from various regions, [-].
- LFLslist[float]
Lower flammability limits for each component, [-].
- logPslist[float]
Octanol-water partition coefficients for each component, [-].
- molecular_diameterslist[float]
Lennard-Jones molecular diameters for each component, [angstrom].
- MWslist[float]
Similatiry variables for each component, [g/mol].
- nameslist[str]
Names for each component, [-].
- ODPslist[float]
Ozone Depletion Potentials for each component (impact/mass chemical)/(impact/mass CFC-11), [-].
- omegaslist[float]
Acentric factors for each component, [-].
- Parachorslist[float]
Parachors for each component, [N^0.25*m^2.75/mol].
- Pcslist[float]
Critical pressures for each component, [Pa].
- phase_STPslist[str]
Standard states (‘g’, ‘l’, or ‘s’) for each component, [-].
- Psat_298slist[float]
Vapor pressures for each component at 298.15 K, [Pa].
- PSRK_groupslist[dict]
PSRK subgroup: count groups for each component, [-].
- Ptslist[float]
Triple point pressures for each component, [Pa].
- PubChemslist[int]
Pubchem IDs for each component, [-].
- rhocslist[float]
Molar densities at the critical point for each component, [mol/m^3].
- rhocs_masslist[float]
Densities at the critical point for each component, [kg/m^3].
- rhol_STPslist[float]
Molar liquid densities at STP for each component, [mol/m^3].
- rhol_STPs_masslist[float]
Liquid densities at STP for each component, [kg/m^3].
- RIslist[float]
Refractive indexes for each component, [-].
- RI_Tslist[float]
Temperatures at which the refractive indexes were reported for each component, [K].
- S0gslist[float]
Ideal gas absolute molar entropies at 298.15 K at 1 atm for each component, [J/(mol*K)].
- S0gs_masslist[float]
Ideal gas absolute entropies at 298.15 K at 1 atm for each component, [J/(kg*K)].
- Sfgslist[float]
Ideal gas standard molar entropies of formation for each component, [J/(mol*K)].
- Sfgs_masslist[float]
Ideal gas standard entropies of formation for each component, [J/(kg*K)].
- solubility_parameterslist[float]
Solubility parameters for each component at 298.15 K, [Pa^0.5].
- similarity_variableslist[float]
Similarity variables for each component, [mol/g].
- Skinslist[bool]
Whether each compound can be absorbed through the skin or not, [-].
- smilesslist[str]
SMILES identifiers for each component, [-].
- STELslist[tuple[(float, str)]]
Short term exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
- StielPolarslist[float]
Stiel polar factors for each component, [-].
- Stockmayerslist[float]
Lennard-Jones Stockmayer parameters (depth of potential-energy minimum over k) for each component, [K].
- Tautoignitionslist[float]
Autoignition temperatures for each component, [K].
- Tbslist[float]
Boiling temperatures for each component, [K].
- Tcslist[float]
Critical temperatures for each component, [K].
- Tmslist[float]
Melting temperatures for each component, [K].
- Tflashslist[float]
Flash point temperatures for each component, [K].
- Ttslist[float]
Triple point temperatures for each component, [K].
- TWAslist[tuple[(float, str)]]
Time-weighted average exposure limits to chemicals (and their units; ppm or mg/m^3), [various].
- UFLslist[float]
Upper flammability limits for each component, [-].
- UNIFAC_Dortmund_groupslist[dict]
UNIFAC_Dortmund_group: count groups for each component, [-].
- UNIFAC_groupslist[dict]
UNIFAC_group: count groups for each component, [-].
- UNIFAC_Rslist[float]
UNIFAC R parameters for each component, [-].
- UNIFAC_Qslist[float]
UNIFAC Q parameters for each component, [-].
- Van_der_Waals_areaslist[float]
Unnormalized Van der Waals areas for each component, [m^2/mol].
- Van_der_Waals_volumeslist[float]
Unnormalized Van der Waals volumes for each component, [m^3/mol].
- Vcslist[float]
Critical molar volumes for each component, [m^3/mol].
- Vml_STPslist[float]
Liquid molar volumes for each component at STP, [m^3/mol].
- Vml_Tmslist[float]
Liquid molar volumes for each component at their respective melting points, [m^3/mol].
- Vms_Tmslist[float]
Solid molar volumes for each component at their respective melting points, [m^3/mol].
- Vml_60Fslist[float]
Liquid molar volumes for each component at 60 °F, [m^3/mol].
- rhos_Tmslist[float]
Solid molar densities for each component at their respective melting points, [mol/m^3].
- rhol_60Fs_masslist[float]
Liquid mass densities for each component at 60 °F, [kg/m^3].
- rhos_Tms_masslist[float]
Solid mass densities for each component at their melting point, [kg/m^3].
- Zcslist[float]
Critical compressibilities for each component, [-].
- n_atomsint
Number of total atoms in a collection of 1 molecule of each species, [-].
- water_indexint
Index of water in the package, [-].
- Vmg_STPslist[float]
Gas molar volumes for each component at STP; metastable if normally another state, [m^3/mol].
- rhog_STPslist[float]
Molar gas densities at STP for each component; metastable if normally another state, [mol/m^3].
- rhog_STPs_masslist[float]
Gas densities at STP for each component; metastable if normally another state, [kg/m^3].
- sigma_STPslist[float]
Liquid-air surface tensions at 298.15 K and the higher of 101325 Pa or the saturation pressure, [N/m].
- sigma_Tmslist[float]
Liquid-air surface tensions at the melting point and 101325 Pa, [N/m].
- sigma_Tbslist[float]
Liquid-air surface tensions at the normal boiling point and 101325 Pa, [N/m].
- Hf_STPslist[float]
Standard state molar enthalpies of formation for each component, [J/mol].
- Hf_STPs_masslist[float]
Standard state mass enthalpies of formation for each component, [J/kg].
Notes
All parameters are also attributes.
Examples
Create a package with water and the xylenes, suitable for use with equations of state:
>>> ChemicalConstantsPackage(MWs=[18.01528, 106.165, 106.165, 106.165], names=['water', 'o-xylene', 'p-xylene', 'm-xylene'], omegas=[0.344, 0.3118, 0.324, 0.331], Pcs=[22048320.0, 3732000.0, 3511000.0, 3541000.0], Tcs=[647.14, 630.3, 616.2, 617.0]) ChemicalConstantsPackage(MWs=[18.01528, 106.165, 106.165, 106.165], names=['water', 'o-xylene', 'p-xylene', 'm-xylene'], omegas=[0.344, 0.3118, 0.324, 0.331], Pcs=[22048320.0, 3732000.0, 3511000.0, 3541000.0], Tcs=[647.14, 630.3, 616.2, 617.0])
Methods
as_json
()Method to create a JSON friendly serialization of the chemical constants package which can be stored, and reloaded later.
constants_from_IDs
(IDs)Method to construct a new ChemicalConstantsPackage with loaded parameters from the chemicals library, using whatever default methods and values happen to be in that library.
Method to construct a new PropertyCorrelationsPackage with loaded parameters from the chemicals library, using whatever default methods and values happen to be in that library.
from_IDs
(IDs)Method to construct a new ChemicalConstantsPackage and PropertyCorrelationsPackage with loaded parameters from the chemicals library, using whatever default methods and values happen to be in that library.
from_json
(json_repr)Method to create a ChemicalConstantsPackage from a JSON serialization of another ChemicalConstantsPackage.
subset
([idxs, properties])Method to construct a new ChemicalConstantsPackage that removes all components not specified in the idxs argument.
with_new_constants
(**kwargs)Method to construct a new ChemicalConstantsPackage that replaces or adds one or more properties for all components.
- __add__(b)[source]¶
Method to create a new
ChemicalConstantsPackage
object from two otherChemicalConstantsPackage
objects.- Returns
- new
ChemicalConstantsPackage
New object, [-]
- new
Examples
>>> a = ChemicalConstantsPackage.constants_from_IDs(IDs=['water', 'hexane']) >>> b = ChemicalConstantsPackage.constants_from_IDs(IDs=['toluene']) >>> c = a + b
- as_json()[source]¶
Method to create a JSON friendly serialization of the chemical constants package which can be stored, and reloaded later.
- Returns
- json_reprdict
Json friendly representation, [-]
Examples
>>> import json >>> constants = ChemicalConstantsPackage(MWs=[18.01528, 106.165], names=['water', 'm-xylene']) >>> string = json.dumps(constants.as_json())
- static constants_from_IDs(IDs)[source]¶
Method to construct a new ChemicalConstantsPackage with loaded parameters from the chemicals library, using whatever default methods and values happen to be in that library. Expect values to change over time.
- Parameters
- IDslist[str]
Identifying strings for each compound; most identifiers are accepted and all inputs are documented in
chemicals.identifiers.search_chemical
, [-]
- Returns
- constantsChemicalConstantsPackage
New ChemicalConstantsPackage with loaded values, [-]
Notes
Warning
chemicals is a project with a focus on collecting data and correlations from various sources. In no way is it a project to critically evaluate these and provide recommendations. You are strongly encouraged to check values from it and modify them if you want different values. If you believe there is a value which has a typographical error please report it to the chemicals project. If data is missing or not as accuracte as you would like, and you know of a better method or source, new methods and sources can be added to chemicals fairly easily once the data entry is complete. It is not feasible to add individual components, so please submit a complete table of data from the source.
Examples
>>> constants = ChemicalConstantsPackage.constants_from_IDs(IDs=['water', 'hexane'])
- static correlations_from_IDs(IDs)[source]¶
Method to construct a new PropertyCorrelationsPackage with loaded parameters from the chemicals library, using whatever default methods and values happen to be in that library. Expect values to change over time.
- Parameters
- IDslist[str]
Identifying strings for each compound; most identifiers are accepted and all inputs are documented in
chemicals.identifiers.search_chemical
, [-]
- Returns
- correlationsPropertyCorrelationsPackage
New PropertyCorrelationsPackage with loaded values, [-]
Notes
Warning
chemicals is a project with a focus on collecting data and correlations from various sources. In no way is it a project to critically evaluate these and provide recommendations. You are strongly encouraged to check values from it and modify them if you want different values. If you believe there is a value which has a typographical error please report it to the chemicals project. If data is missing or not as accuracte as you would like, and you know of a better method or source, new methods and sources can be added to chemicals fairly easily once the data entry is complete. It is not feasible to add individual components, so please submit a complete table of data from the source.
Examples
>>> correlations = ChemicalConstantsPackage.constants_from_IDs(IDs=['ethanol', 'methanol'])
- static from_IDs(IDs)[source]¶
Method to construct a new ChemicalConstantsPackage and PropertyCorrelationsPackage with loaded parameters from the chemicals library, using whatever default methods and values happen to be in that library. Expect values to change over time.
- Parameters
- IDslist[str]
Identifying strings for each compound; most identifiers are accepted and all inputs are documented in
chemicals.identifiers.search_chemical
, [-]
- Returns
- constantsPropertyCorrelationsPackage
New PropertyCorrelationsPackage with loaded values, [-]
- correlationsPropertyCorrelationsPackage
New PropertyCorrelationsPackage with loaded values, [-]
Notes
Warning
chemicals is a project with a focus on collecting data and correlations from various sources. In no way is it a project to critically evaluate these and provide recommendations. You are strongly encouraged to check values from it and modify them if you want different values. If you believe there is a value which has a typographical error please report it to the chemicals project. If data is missing or not as accuracte as you would like, and you know of a better method or source, new methods and sources can be added to chemicals fairly easily once the data entry is complete. It is not feasible to add individual components, so please submit a complete table of data from the source.
Examples
>>> constants, correlations = ChemicalConstantsPackage.from_IDs(IDs=['water', 'decane'])
- classmethod from_json(json_repr)[source]¶
Method to create a ChemicalConstantsPackage from a JSON serialization of another ChemicalConstantsPackage.
- Parameters
- json_reprdict
Json representation, [-]
- Returns
- constantsChemicalConstantsPackage
Newly created object from the json serialization, [-]
Notes
It is important that the input be in the same format as that created by
ChemicalConstantsPackage.as_json
.Examples
>>> import json >>> constants = ChemicalConstantsPackage(MWs=[18.01528, 106.165], names=['water', 'm-xylene']) >>> string = json.dumps(constants.as_json()) >>> new_constants = ChemicalConstantsPackage.from_json(json.loads(string)) >>> assert hash(new_constants) == hash(constants)
- properties = ('atom_fractions', 'atomss', 'Carcinogens', 'CASs', 'Ceilings', 'charges', 'conductivities', 'dipoles', 'economic_statuses', 'formulas', 'Gfgs', 'Gfgs_mass', 'GWPs', 'Hcs', 'Hcs_lower', 'Hcs_lower_mass', 'Hcs_mass', 'Hfgs', 'Hfgs_mass', 'Hfus_Tms', 'Hfus_Tms_mass', 'Hsub_Tts', 'Hsub_Tts_mass', 'Hvap_298s', 'Hvap_298s_mass', 'Hvap_Tbs', 'Hvap_Tbs_mass', 'InChI_Keys', 'InChIs', 'legal_statuses', 'LFLs', 'logPs', 'molecular_diameters', 'MWs', 'names', 'ODPs', 'omegas', 'Parachors', 'Pcs', 'phase_STPs', 'Psat_298s', 'PSRK_groups', 'Pts', 'PubChems', 'rhocs', 'rhocs_mass', 'rhol_STPs', 'rhol_STPs_mass', 'RIs', 'S0gs', 'S0gs_mass', 'Sfgs', 'Sfgs_mass', 'similarity_variables', 'Skins', 'smiless', 'STELs', 'StielPolars', 'Stockmayers', 'Tautoignitions', 'Tbs', 'Tcs', 'Tflashs', 'Tms', 'Tts', 'TWAs', 'UFLs', 'UNIFAC_Dortmund_groups', 'UNIFAC_groups', 'Van_der_Waals_areas', 'Van_der_Waals_volumes', 'Vcs', 'Vml_STPs', 'Vml_Tms', 'Zcs', 'UNIFAC_Rs', 'UNIFAC_Qs', 'rhos_Tms', 'Vms_Tms', 'rhos_Tms_mass', 'solubility_parameters', 'Vml_60Fs', 'rhol_60Fs', 'rhol_60Fs_mass', 'conductivity_Ts', 'RI_Ts', 'Vmg_STPs', 'rhog_STPs', 'rhog_STPs_mass', 'sigma_STPs', 'sigma_Tms', 'sigma_Tbs', 'Hf_STPs', 'Hf_STPs_mass')¶
Tuple of all properties that can be held by this object.
- subset(idxs=None, properties=None)[source]¶
Method to construct a new ChemicalConstantsPackage that removes all components not specified in the idxs argument. Although this class has a great many attributes, it is often sufficient to work with a subset of those properties; and if a list of properties is provided, only those properties will be added to the new object as well.
- Parameters
- idxslist[int] or Slice or None
Indexes of components that should be included; if None, all components will be included , [-]
- propertiestuple[str] or None
List of properties to be included; all properties will be included if this is not specified
- Returns
- subset_constsChemicalConstantsPackage
Object with reduced properties and or components, [-]
Notes
It is not intended for properties to be edited in this object! One optimization is that all entirely empty properties use the same list-of-Nones.
All properties should have been specified before constructing the first ChemicalConstantsPackage.
Examples
>>> base = ChemicalConstantsPackage(MWs=[18.01528, 106.165, 106.165, 106.165], names=['water', 'o-xylene', 'p-xylene', 'm-xylene'], omegas=[0.344, 0.3118, 0.324, 0.331], Pcs=[22048320.0, 3732000.0, 3511000.0, 3541000.0], Tcs=[647.14, 630.3, 616.2, 617.0]) >>> base.subset([0]) ChemicalConstantsPackage(MWs=[18.01528], names=['water'], omegas=[0.344], Pcs=[22048320.0], Tcs=[647.14]) >>> base.subset(slice(1,4)) ChemicalConstantsPackage(MWs=[106.165, 106.165, 106.165], names=['o-xylene', 'p-xylene', 'm-xylene'], omegas=[0.3118, 0.324, 0.331], Pcs=[3732000.0, 3511000.0, 3541000.0], Tcs=[630.3, 616.2, 617.0]) >>> base.subset(idxs=[0, 3], properties=('names', 'MWs')) ChemicalConstantsPackage(MWs=[18.01528, 106.165], names=['water', 'm-xylene'])
- with_new_constants(**kwargs)[source]¶
Method to construct a new ChemicalConstantsPackage that replaces or adds one or more properties for all components.
- Parameters
- kwargsdict[str: list[float]]
Properties specified by name [various]
- Returns
- new_constantsChemicalConstantsPackage
Object with new and/or replaced properties, [-]
Examples
>>> base = ChemicalConstantsPackage(MWs=[18.01528, 106.165, 106.165, 106.165], names=['water', 'o-xylene', 'p-xylene', 'm-xylene'], omegas=[0.344, 0.3118, 0.324, 0.331], Pcs=[22048320.0, 3732000.0, 3511000.0, 3541000.0], Tcs=[647.14, 630.3, 616.2, 617.0]) >>> base.with_new_constants(Tms=[40.0, 20.0, 10.0, 30.0], omegas=[0.0, 0.1, 0.2, 0.3]) ChemicalConstantsPackage(MWs=[18.01528, 106.165, 106.165, 106.165], names=['water', 'o-xylene', 'p-xylene', 'm-xylene'], omegas=[0.0, 0.1, 0.2, 0.3], Pcs=[22048320.0, 3732000.0, 3511000.0, 3541000.0], Tcs=[647.14, 630.3, 616.2, 617.0], Tms=[40.0, 20.0, 10.0, 30.0])
Chemical Correlations Class¶
- class thermo.chemical_package.PropertyCorrelationsPackage(constants, VaporPressures=None, SublimationPressures=None, VolumeGases=None, VolumeLiquids=None, VolumeSolids=None, HeatCapacityGases=None, HeatCapacityLiquids=None, HeatCapacitySolids=None, ViscosityGases=None, ViscosityLiquids=None, ThermalConductivityGases=None, ThermalConductivityLiquids=None, EnthalpyVaporizations=None, EnthalpySublimations=None, SurfaceTensions=None, PermittivityLiquids=None, VolumeGasMixtureObj=None, VolumeLiquidMixtureObj=None, VolumeSolidMixtureObj=None, HeatCapacityGasMixtureObj=None, HeatCapacityLiquidMixtureObj=None, HeatCapacitySolidMixtureObj=None, ViscosityGasMixtureObj=None, ViscosityLiquidMixtureObj=None, ThermalConductivityGasMixtureObj=None, ThermalConductivityLiquidMixtureObj=None, SurfaceTensionMixtureObj=None, skip_missing=False)[source]¶
Class for creating and storing T and P and zs dependent chemical property objects. All parameters are also attributes.
This object can be used either to hold already-created property objects; or to create new ones and hold them.
- Parameters
- constants
ChemicalConstantsPackage
Object holding all constant properties, [-]
- VaporPressureslist[
thermo.vapor_pressure.VaporPressure
], optional Objects holding vapor pressure data and methods, [-]
- SublimationPressureslist[
thermo.vapor_pressure.SublimationPressure
], optional Objects holding sublimation pressure data and methods, [-]
- VolumeGaseslist[
thermo.volume.VolumeGas
], optional Objects holding gas volume data and methods, [-]
- VolumeLiquidslist[
thermo.volume.VolumeLiquid
], optional Objects holding liquid volume data and methods, [-]
- VolumeSolidslist[
thermo.volume.VolumeSolid
], optional Objects holding solid volume data and methods, [-]
- HeatCapacityGaseslist[
thermo.heat_capacity.HeatCapacityGas
], optional Objects holding gas heat capacity data and methods, [-]
- HeatCapacityLiquidslist[
thermo.heat_capacity.HeatCapacityLiquid
], optional Objects holding liquid heat capacity data and methods, [-]
- HeatCapacitySolidslist[
thermo.heat_capacity.HeatCapacitySolid
], optional Objects holding solid heat capacity data and methods, [-]
- ViscosityGaseslist[
thermo.viscosity.ViscosityGas
], optional Objects holding gas viscosity data and methods, [-]
- ViscosityLiquidslist[
thermo.viscosity.ViscosityLiquid
], optional Objects holding liquid viscosity data and methods, [-]
- ThermalConductivityGaseslist[
thermo.thermal_conductivity.ThermalConductivityGas
], optional Objects holding gas thermal conductivity data and methods, [-]
- ThermalConductivityLiquidslist[
thermo.thermal_conductivity.ThermalConductivityLiquid
], optional Objects holding liquid thermal conductivity data and methods, [-]
- EnthalpyVaporizationslist[
thermo.phase_change.EnthalpyVaporization
], optional Objects holding enthalpy of vaporization data and methods, [-]
- EnthalpySublimationslist[
thermo.phase_change.EnthalpySublimation
], optional Objects holding enthalpy of sublimation data and methods, [-]
- SurfaceTensionslist[
thermo.interface.SurfaceTension
], optional Objects holding surface tension data and methods, [-]
- PermittivityLiquidslist[
thermo.permittivity.PermittivityLiquid
], optional Objects holding permittivity data and methods, [-]
- skip_missingbool, optional
If False, any properties not provided will have objects created; if True, no extra objects will be created.
- VolumeSolidMixture
thermo.volume.VolumeSolidMixture
, optional Predictor object for the volume of solid mixtures, [-]
- VolumeLiquidMixture
thermo.volume.VolumeLiquidMixture
, optional Predictor object for the volume of liquid mixtures, [-]
- VolumeGasMixture
thermo.volume.VolumeGasMixture
, optional Predictor object for the volume of gas mixtures, [-]
- HeatCapacityLiquidMixture
thermo.heat_capacity.HeatCapacityLiquidMixture
, optional Predictor object for the heat capacity of liquid mixtures, [-]
- HeatCapacityGasMixture
thermo.heat_capacity.HeatCapacityGasMixture
, optional Predictor object for the heat capacity of gas mixtures, [-]
- HeatCapacitySolidMixture
thermo.heat_capacity.HeatCapacitySolidMixture
, optional Predictor object for the heat capacity of solid mixtures, [-]
- ViscosityLiquidMixture
thermo.viscosity.ViscosityLiquidMixture
, optional Predictor object for the viscosity of liquid mixtures, [-]
- ViscosityGasMixture
thermo.viscosity.ViscosityGasMixture
, optional Predictor object for the viscosity of gas mixtures, [-]
- ThermalConductivityLiquidMixture
thermo.thermal_conductivity.ThermalConductivityLiquidMixture
, optional Predictor object for the thermal conductivity of liquid mixtures, [-]
- ThermalConductivityGasMixture
thermo.thermal_conductivity.ThermalConductivityGasMixture
, optional Predictor object for the thermal conductivity of gas mixtures, [-]
- SurfaceTensionMixture
thermo.interface.SurfaceTensionMixture
, optional Predictor object for the surface tension of liquid mixtures, [-]
- constants
Examples
Create a package from CO2 and n-hexane, with ideal-gas heat capacities provided while excluding all other properties:
>>> constants = ChemicalConstantsPackage(CASs=['124-38-9', '110-54-3'], MWs=[44.0095, 86.17536], names=['carbon dioxide', 'hexane'], omegas=[0.2252, 0.2975], Pcs=[7376460.0, 3025000.0], Tbs=[194.67, 341.87], Tcs=[304.2, 507.6], Tms=[216.65, 178.075]) >>> correlations = PropertyCorrelationsPackage(constants=constants, skip_missing=True, HeatCapacityGases=[HeatCapacityGas(poly_fit=(50.0, 1000.0, [-3.1115474168865828e-21, 1.39156078498805e-17, -2.5430881416264243e-14, 2.4175307893014295e-11, -1.2437314771044867e-08, 3.1251954264658904e-06, -0.00021220221928610925, 0.000884685506352987, 29.266811602924644])), HeatCapacityGas(poly_fit=(200.0, 1000.0, [1.3740654453881647e-21, -8.344496203280677e-18, 2.2354782954548568e-14, -3.4659555330048226e-11, 3.410703030634579e-08, -2.1693611029230923e-05, 0.008373280796376588, -1.356180511425385, 175.67091124888998]))])
Create a package from various data files, creating all property objects:
>>> correlations = PropertyCorrelationsPackage(constants=constants, skip_missing=False)
- Attributes
- pure_correlationstuple(str)
List of all pure component property objects, [-]
Methods
subset
(idxs)Method to construct a new PropertyCorrelationsPackage that removes all components not specified in the idxs argument.
- __add__(b)[source]¶
Method to create a new
PropertyCorrelationsPackage
object from two otherPropertyCorrelationsPackage
objects.- Returns
- new
PropertyCorrelationsPackage
New object, [-]
- new
Examples
>>> a = ChemicalConstantsPackage.correlations_from_IDs(IDs=['water', 'hexane']) >>> b = ChemicalConstantsPackage.correlations_from_IDs(IDs=['toluene']) >>> c = a + b
- subset(idxs)[source]¶
Method to construct a new PropertyCorrelationsPackage that removes all components not specified in the idxs argument.
- Parameters
- idxslist[int] or Slice or None
Indexes of components that should be included; if None, all components will be included , [-]
- Returns
- subset_correlationsPropertyCorrelationsPackage
Object with components, [-]
Sample Constants and Correlations¶
- thermo.chemical_package.iapws_constants = ChemicalConstantsPackage(CASs=['7732-18-5'], MWs=[18.015268], omegas=[0.344], Pcs=[22064000.0], Tcs=[647.096])¶
ChemicalConstantsPackage
: Object intended to hold the IAPWS-95 water constants for use with thethermo.phases.IAPWS95
phase object.
- thermo.chemical_package.iapws_correlations = <thermo.chemical_package.PropertyCorrelationsPackage object>¶
PropertyCorrelationsPackage
: IAPWS correlations and properties, [-]
- thermo.chemical_package.lemmon2000_constants = ChemicalConstantsPackage(CASs=['132259-10-0'], MWs=[28.9586], omegas=[0.0335], Pcs=[3785020.0], Tcs=[132.6312])¶
ChemicalConstantsPackage
: Object intended to hold the Lemmon (2000) air constants for use with thethermo.phases.DryAirLemmon
phase object.
- thermo.chemical_package.lemmon2000_correlations = <thermo.chemical_package.PropertyCorrelationsPackage object>¶
PropertyCorrelationsPackage
: Lemmon (2000) air correlations and properties, [-]