espei package#

Subpackages#

Submodules#

espei.analysis module#

Tools for analyzing ESPEI runs

espei.analysis.truncate_arrays(trace_array, prob_array=None)#

Return slides of ESPEI output arrays with any empty remaining iterations (zeros) removed.

Parameters:
  • trace_array (np.ndarray) – Array of the trace from an ESPEI run. Should have shape (chains, iterations, parameters)

  • prob_array (np.ndarray) – Array of the lnprob output from an ESPEI run. Should have shape (chains, iterations)

Returns:

A slide of the zeros-removed trace array is returned if only the trace is passed. Otherwise a tuple of both the trace and lnprob are returned.

Return type:

np.ndarry or (np.ndarray, np.ndarray)

Examples

>>> from espei.analysis import truncate_arrays
>>> trace = np.array([[[1, 0], [2, 0], [3, 0], [0, 0]], [[0, 2], [0, 4], [0, 6], [0, 0]]])  # 3 iterations of 4 allocated
>>> truncate_arrays(trace).shape
(2, 3, 2)

espei.citing module#

Define citations for ESPEI

espei.core_utils module#

Utilities for querying, modifiying, and extracting data from Datasets.

espei.core_utils.filter_configurations(desired_data: List[Dict[str, Any]], configuration, symmetry) List[Dict[str, Any]]#

Return non-equilibrium thermochemical datasets with invalid configurations removed.

Parameters:
  • desired_data (List[Dataset]) – List of non-equilibrium thermochemical datasets

  • configuration (tuple) – Sublattice configuration as a tuple, e.g. (“CU”, (“CU”, “MG”))

  • symmetry (list of lists) – List of sublattice indices with symmetry

Return type:

List[Dataset]

espei.core_utils.filter_temperatures(desired_data: List[Dict[str, Any]]) List[Dict[str, Any]]#

Return non-equilibrium thermochemical datasets with temperatures below 298.15 K removed.

The currently provided unary reference data from ESPEI use the SGTE unary data that are defined as piecewise in temperature with a lower limit of 298.15 K for most elements. Since pycalphad does not extrapolate outside of piecewise temperature limits, this filter prevents fitting data to regions of temperature space where the energy is zero.

Parameters:

desired_data (List[Dataset]) – List of non-equilibrium thermochemical datasets

Return type:

List[Dataset]

espei.core_utils.get_prop_data(comps, phase_name, prop, datasets, additional_query=None) List[Dict[str, Any]]#

Return a copy of datasets that match the components, phase and property.

The queried datasets are copied to ensure that any modifications are safe.

Parameters:
  • comps (list) – List of components to get data for

  • phase_name (str) – Name of the phase to get data for

  • prop (str) – Property to get data for

  • datasets (espei.utils.PickleableTinyDB) – Datasets to search for data

  • additional_query (tinydb.Query) – A TinyDB Query object to search for. If None, a Query() will be created that does nothing.

Return type:

List[Dataset]

espei.core_utils.ravel_conditions(values, *conditions, **kwargs)#

Broadcast and flatten conditions to the shape dictated by the values.

Special handling for ZPF data that does not have nice array values.

Parameters:
  • values (list) – Multidimensional lists of values

  • conditions (list) – List of conditions to broadcast. Must be the same length as the number of dimensions of the values array. In code, the following must be True: all([s == len(cond) for s, cond in zip(values.shape, conditions)])

  • zpf (bool, optional) – Whether to consider values as a special case of ZPF data (not an even grid of conditions) Default is False

Returns:

Tuple of ravelled conditions

Return type:

tuple

Notes

The current implementation of ZPF data only has the shape for one condition and this assumption is hardcoded in various places.

Here we try to be as general as possible by explicitly calculating the shape of the ZPF values.

A complication of this is that the user of this function must pass the correct conditions because usually T and P are specified in ZPF (but, again, only one can actually be a condition given the current shape).

espei.core_utils.ravel_zpf_values(desired_data, independent_comps, conditions=None)#

Unpack the phases and compositions from ZPF data. Dependent components are converted to independent components.

Parameters:
  • desired_data (List[Dataset]) – The selected data

  • independent_comps (List[str]) – List of indepdendent components. Used for mass balance component conversion

  • conditions (Dict[str, Union[float, ArrayLike]]) – Conditions to filter for. Right now only considers fixed temperatures

Returns:

A dictonary of list of lists of tuples. Each dictionary key is the number of phases in equilibrium, e.g. a key “2” might have values [[(PHASE_NAME_1, {‘C1’: X1, ‘C2’: X2}, refkey), (PHASE_NAME_2, {‘C1’: X1, ‘C2’: X2}, refkey)], …] Three would have three inner tuples and so on.

Return type:

Dict[int, List[List[Tuple[str, Dict[str, float], str]]] ]

espei.core_utils.symmetry_filter(x, config, symmetry)#

Return True if the candidate sublattice configuration has any symmetry which matches the phase model symmetry.

Parameters:
  • x (dict) – the candidate dataset ‘solver’ dict. Must contain the “sublattice_configurations” key

  • config (list) – the configuration of interest: e.g. [‘AL’, [‘AL’, ‘NI’], ‘VA’]

  • symmetry (list) – tuple of tuples where each inner tuple is a group of equivalent sublattices. A value of ((0, 1), (2, 3, 4)) means that sublattices at indices 0 and 1 are symmetrically equivalent to each other and sublattices at indices 2, 3, and 4 are symetrically equivalent to each other.

Return type:

bool

espei.database_utils module#

Provides utilities for creating and working with Databases in ESPEI

espei.database_utils.initialize_database(phase_models, ref_state, dbf=None, fallback_ref_state='SGTE91')#

Return a Database boostraped with elements, species, phases and unary lattice stabilities.

Parameters:
  • phase_models (Dict[str, Any]) – Dictionary of components and phases to fit.

  • ref_state (str) – String of the reference data to use, e.g. ‘SGTE91’ or ‘SR2016’

  • dbf (Optional[Database]) – Initial pycalphad Database that can have parameters that would not be fit by ESPEI

  • fallback_ref_state (str) – String of the reference data to use for SER data, defaults to ‘SGTE91’

Returns:

A new pycalphad Database object, or a modified one if it was given.

Return type:

Database

espei.datasets module#

exception espei.datasets.DatasetError#

Bases: Exception

Exception raised when datasets are invalid.

espei.datasets.apply_tags(datasets: PickleableTinyDB, tags)#

Modify datasets using the tags system

Parameters:
  • datasets (PickleableTinyDB) – Datasets to modify

  • tags (dict) – Dictionary of {tag: update_dict}

Return type:

None

Notes

In general, everything replaces or is additive. We use the following update rules: 1. If the update value is a list, extend the existing list (empty list if key does not exist) 2. If the update value is scalar, override the previous (deleting any old value, if present) 3. If the update value is a dict, update the exist dict (empty dict if dict does not exist) 4. Otherwise, the value is updated, overriding the previous

Examples

>>> from espei.utils import PickleableTinyDB
>>> from tinydb.storages import MemoryStorage
>>> ds = PickleableTinyDB(storage=MemoryStorage)
>>> doc_id = ds.insert({'tags': ['dft'], 'excluded_model_contributions': ['contrib']})
>>> my_tags = {'dft': {'excluded_model_contributions': ['idmix', 'mag'], 'weight': 5.0}}
>>> from espei.datasets import apply_tags
>>> apply_tags(ds, my_tags)
>>> all_data = ds.all()
>>> all(d['excluded_model_contributions'] == ['contrib', 'idmix', 'mag'] for d in all_data)
True
>>> all(d['weight'] == 5.0 for d in all_data)
True
espei.datasets.check_dataset(dataset: Dict[str, Any])#

Ensure that the dataset is valid and consistent.

Currently supports the following validation checks: * data shape is valid * phases and components used match phases and components entered * individual shapes of keys, such as ZPF, sublattice configs and site ratios

Planned validation checks: * all required keys are present

Note that this follows some of the implicit assumptions in ESPEI at the time of writing, such that conditions are only P, T, configs for single phase and essentially only T for ZPF data.

Parameters:

dataset (Dataset) – Dictionary of the standard ESPEI dataset.

Return type:

None

Raises:

DatasetError – If an error is found in the dataset

espei.datasets.clean_dataset(dataset: Dict[str, Any]) Dict[str, Any]#

Clean an ESPEI dataset dictionary.

Parameters:

dataset (Dataset) – Dictionary of the standard ESPEI dataset. dataset : dic

Returns:

Modified dataset that has been cleaned

Return type:

Dataset

Notes

Assumes a valid, checked dataset. Currently handles * Converting expected numeric values to floats

espei.datasets.load_datasets(dataset_filenames, include_disabled=False) PickleableTinyDB#

Create a PickelableTinyDB with the data from a list of filenames.

Parameters:

dataset_filenames ([str]) – List of filenames to load as datasets

Return type:

PickleableTinyDB

espei.datasets.recursive_glob(start, pattern='*.json')#

Recursively glob for the given pattern from the start directory.

Parameters:
  • start (str) – Path of the directory to walk while for file globbing

  • pattern (str) – Filename pattern to match in the glob.

Returns:

List of matched filenames

Return type:

[str]

espei.datasets.recursive_map(f, x)#

map, but over nested lists

Parameters:
  • f (callable) – Function to apply to x

  • x (list or value) – Value passed to v

Return type:

list or value

espei.espei_script module#

Automated fitting script.

A minimal run must specify an input.json and a datasets folder containing input files.

espei.espei_script.get_run_settings(input_dict)#

Validate settings from a dict of possible input.

Performs the following actions: 1. Normalize (apply defaults) 2. Validate against the schema

Parameters:

input_dict (dict) – Dictionary of input settings

Returns:

Validated run settings

Return type:

dict

Raises:

ValueError

espei.espei_script.log_version_info()#

Print version info to the log

espei.espei_script.main()#

Handle starting ESPEI from the command line. Parse command line arguments and input file.

espei.espei_script.run_espei(run_settings)#

Wrapper around the ESPEI fitting procedure, taking only a settings dictionary.

Parameters:

run_settings (dict) – Dictionary of input settings

Return type:

Either a Database (for generate parameters only) or a tuple of (Database, sampler)

espei.logger module#

Implement an ESPEILogger with customized logging levels and methods

class espei.logger.ESPEILogger(name, level=0)#

Bases: Logger

TRACE = 15#
trace(*args, **kwargs)#
espei.logger.config_logger(verbosity=0, filename=None, reset_handlers=True)#

Configure the root logger with the appropriate level and filename.

Uses ESPEI’s verbosity levels:

  • 0: Warning

  • 1: Info

  • 2: Trace

  • 3: Debug

If the filename is None, logs will be output to stderr.

espei.paramselect module#

The paramselect module handles automated parameter selection for linear models.

Automated Parameter Selection End-members

Note: All magnetic parameters from literature for now. Note: No fitting below 298 K (so neglect third law issues for now).

For each step, add one parameter at a time and compute AICc with max likelihood.

Cp - TlnT, T**2, T**-1, T**3 - 4 candidate models (S and H only have one required parameter each. Will fit in full MCMC procedure)

Choose parameter set with best AICc score.

espei.paramselect.fit_parameters(dbf, comps, phase_name, configuration, symmetry, datasets, ridge_alpha=None, aicc_phase_penalty=None, fitting_description=<espei.parameter_selection.fitting_descriptions.ModelFittingDescription object>)#

Find suitable linear model parameters for the given phase. We do this by successively fitting heat capacities, entropies and enthalpies of formation, and selecting against criteria to prevent overfitting. The “best” set of parameters minimizes the error without overfitting.

Parameters:
  • dbf (Database) – pycalphad Database. Partially complete, so we know what degrees of freedom to fix.

  • comps ([str]) – Names of the relevant components.

  • phase_name (str) – Name of the desired phase for which the parameters will be found.

  • configuration (ndarray) – Configuration of the sublattices for the fitting procedure.

  • symmetry ([[int]]) – Symmetry of the sublattice configuration.

  • datasets (PickleableTinyDB) – All the datasets desired to fit to.

  • ridge_alpha (float) – Value of the \(\alpha\) hyperparameter used in ridge regression. Defaults to 1.0e-100, which should be degenerate with ordinary least squares regression. For now, the parameter is applied to all features.

  • aicc_feature_factors (dict) – Map of phase name to feature to a multiplication factor for the AICc’s parameter penalty.

  • features (dict) – Maps “property” to a list of features for the linear model. These will be transformed from “GM” coefficients e.g., {“CPM_FORM”: (v.T*symengine.log(v.T), v.T**2, v.T**-1, v.T**3)} (Default value = None)

  • fitting_description (Type[ModelFittingDescription]) – ModelFittingDescription object describing the fitting steps and model

Returns:

{feature: estimated_value}

Return type:

dict

espei.paramselect.generate_parameters(phase_models, datasets, ref_state, excess_model, ridge_alpha=None, aicc_penalty_factor=None, dbf=None, fitting_description=<espei.parameter_selection.fitting_descriptions.ModelFittingDescription object>)#

Generate parameters from given phase models and datasets

Parameters:
  • phase_models (dict) – Dictionary of components and phases to fit.

  • datasets (PickleableTinyDB) – database of single- and multi-phase to fit.

  • ref_state (str) – String of the reference data to use, e.g. ‘SGTE91’ or ‘SR2016’

  • excess_model (str) – String of the type of excess model to fit to, e.g. ‘linear’

  • ridge_alpha (float) – Value of the \(\alpha\) hyperparameter used in ridge regression. Defaults to None, which falls back to ordinary least squares regression. For now, the parameter is applied to all features.

  • aicc_penalty_factor (dict) – Map of phase name to feature to a multiplication factor for the AICc’s parameter penalty.

  • dbf (Database) – Initial pycalphad Database that can have parameters that would not be fit by ESPEI

  • fitting_description (Type[ModelFittingDescription]) – ModelFittingDescription object describing the fitting steps and model

Return type:

pycalphad.Database

espei.paramselect.get_next_symbol(dbf)#

Return a string name of the next free symbol to set

Parameters:

dbf (Database) – pycalphad Database. Must have the varcounter attribute set to an integer.

Return type:

str

espei.paramselect.has_symbol(expr, check_symbol)#

Workaround for SymEngine not supporting Basic.has() with non-Symbol arguments. Only works for detecting subsets of multiplication of variables.

espei.paramselect.insert_parameter(dbf, phase_name, configuration, parameter_name, parameters, symmetry)#
espei.paramselect.phase_fit(dbf, phase_name, symmetry, datasets, refdata, ridge_alpha, aicc_penalty=None, aliases=None, fitting_description=<espei.parameter_selection.fitting_descriptions.ModelFittingDescription object>)#

Generate an initial CALPHAD model for a given phase and sublattice model.

Parameters:
  • dbf (Database) – pycalphad Database to add parameters to.

  • phase_name (str) – Name of the phase.

  • symmetry ([[int]]) – Sublattice model symmetry.

  • datasets (PickleableTinyDB) – All datasets to consider for the calculation.

  • refdata (dict) – Maps tuple(element, phase_name) -> SymEngine object defining energy relative to SER

  • ridge_alpha (float) – Value of the \(\alpha\) hyperparameter used in ridge regression. Defaults to 1.0e-100, which should be degenerate with ordinary least squares regression. For now, the parameter is applied to all features.

  • aicc_penalty (dict) – Map of phase name to feature to a multiplication factor for the AICc’s parameter penalty.

  • aliases (Dict[str, str]) – Mapping of possible aliases to the Database phase names.

  • fitting_description (Type[ModelFittingDescription]) – ModelFittingDescription object describing the fitting steps and model

Returns:

Modifies the dbf.

Return type:

None

espei.phase_models module#

class espei.phase_models.ModelMetadata(*, sublattice_model: List[List[ComponentName]], sublattice_site_ratios: List[float], model: ImportString | None = None)#

Bases: BaseModel

model: ImportString | None#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'model': FieldInfo(annotation=Union[ImportString, NoneType], required=False), 'sublattice_model': FieldInfo(annotation=List[List[NewType]], required=True), 'sublattice_site_ratios': FieldInfo(annotation=List[Annotated[float, Gt]], required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

sublattice_model: List[List[ComponentName]]#
sublattice_site_ratios: List[float]#
class espei.phase_models.PhaseModelSpecification(*, components: List[ComponentName], phases: Dict[PhaseName, ModelMetadata])#

Bases: BaseModel

components: List[ComponentName]#
get_model_dict() Dict[str, Type[Model]]#

Return a pycalphad-style model dictionary mapping phase names to model classes.

If a phase’s “model” key is not specified, no entry is created. In practice, the behavior of the defaults would be handled by pycalphad.

Return type:

Any

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'components': FieldInfo(annotation=List[NewType], required=True), 'phases': FieldInfo(annotation=Dict[NewType, ModelMetadata], required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

phases: Dict[PhaseName, ModelMetadata]#

espei.plot module#

Plotting of input data and calculated database quantities

espei.plot.dataplot(comps, phases, conds, datasets, tielines=True, ax=None, plot_kwargs=None, tieline_plot_kwargs=None) Axes#

Plot datapoints corresponding to the components, phases, and conditions.

Parameters:
  • comps (list) – Names of components to consider in the calculation.

  • phases ([]) – Names of phases to consider in the calculation.

  • conds (dict) – Maps StateVariables to values and/or iterables of values.

  • datasets (PickleableTinyDB) –

  • tielines (bool) – If True (default), plot the tie-lines from the data

  • ax (matplotlib.Axes) – Default axes used if not specified.

  • plot_kwargs (dict) – Additional keyword arguments to pass to the matplotlib plot function for points

  • tieline_plot_kwargs (dict) – Additional keyword arguments to pass to the matplotlib plot function for tielines

Returns:

A plot of phase equilibria points as a figure

Return type:

matplotlib.Axes

Examples

>>> from espei.datasets import load_datasets, recursive_glob  
>>> from espei.plot import dataplot  
>>> datasets = load_datasets(recursive_glob('.', '*.json'))  
>>> my_phases = ['BCC_A2', 'CUMG2', 'FCC_A1', 'LAVES_C15', 'LIQUID']  
>>> my_components = ['CU', 'MG' 'VA']  
>>> conditions = {v.P: 101325, v.T: (500, 1000, 10), v.X('MG'): (0, 1, 0.01)}  
>>> dataplot(my_components, my_phases, conditions, datasets)  
espei.plot.eqdataplot(eq, datasets, ax=None, plot_kwargs=None)#

Plot datapoints corresponding to the components and phases in the eq Dataset. A convenience function for dataplot.

Parameters:
  • eq (xarray.Dataset) – Result of equilibrium calculation.

  • datasets (PickleableTinyDB) – Database of phase equilibria datasets

  • ax (matplotlib.Axes) – Default axes used if not specified.

  • plot_kwargs (dict) – Keyword arguments to pass to dataplot

Return type:

A plot of phase equilibria points as a figure

Examples

>>> from pycalphad import equilibrium, Database, variables as v  
>>> from pycalphad.plot.eqplot import eqplot  
>>> from espei.datasets import load_datasets, recursive_glob  
>>> datasets = load_datasets(recursive_glob('.', '*.json'))  
>>> dbf = Database('my_databases.tdb')  
>>> my_phases = list(dbf.phases.keys())  
>>> eq = equilibrium(dbf, ['CU', 'MG', 'VA'], my_phases, {v.P: 101325, v.T: (500, 1000, 10), v.X('MG'): (0, 1, 0.01)})  
>>> ax = eqplot(eq)  
>>> ax = eqdataplot(eq, datasets, ax=ax)  
espei.plot.multiplot(dbf, comps, phases, conds, datasets, eq_kwargs=None, plot_kwargs=None, data_kwargs=None)#

Plot a phase diagram with datapoints described by datasets. This is a wrapper around pycalphad.equilibrium, pycalphad’s eqplot, and dataplot.

Parameters:
  • dbf (Database) – pycalphad thermodynamic database containing the relevant parameters.

  • comps (list) – Names of components to consider in the calculation.

  • phases (list) – Names of phases to consider in the calculation.

  • conds (dict) – Maps StateVariables to values and/or iterables of values.

  • datasets (PickleableTinyDB) – Database of phase equilibria datasets

  • eq_kwargs (dict) – Keyword arguments passed to pycalphad equilibrium()

  • plot_kwargs (dict) – Keyword arguments passed to pycalphad eqplot()

  • data_kwargs (dict) – Keyword arguments passed to dataplot()

Return type:

A phase diagram with phase equilibria data as a figure

Examples

>>> from pycalphad import Database, variables as v  
>>> from pycalphad.plot.eqplot import eqplot  
>>> from espei.datasets import load_datasets, recursive_glob  
>>> datasets = load_datasets(recursive_glob('.', '*.json'))  
>>> dbf = Database('my_databases.tdb')  
>>> my_phases = list(dbf.phases.keys())  
>>> multiplot(dbf, ['CU', 'MG', 'VA'], my_phases, {v.P: 101325, v.T: 1000, v.X('MG'): (0, 1, 0.01)}, datasets)  
espei.plot.plot_endmember(dbf, comps, phase_name, configuration, output, datasets=None, symmetry=None, x='T', ax=None, plot_kwargs=None, dataplot_kwargs=None) Axes#

Return one set of plotted Axes with data compared to calculated parameters

Parameters:
  • dbf (Database) – pycalphad thermodynamic database containing the relevant parameters.

  • comps (Sequence[str]) – Names of components to consider in the calculation.

  • phase_name (str) – Name of the considered phase phase

  • configuration (Tuple[Tuple[str]]) – ESPEI-style configuration

  • output (str) – Model property to plot on the y-axis e.g. 'HM_MIX', or 'SM_MIX'. Must be a '_MIX' property.

  • datasets (tinydb.TinyDB) –

  • symmetry (list) – List of lists containing indices of symmetric sublattices e.g. [[0, 1], [2, 3]]

  • ax (plt.Axes) – Default axes used if not specified.

  • plot_kwargs (Optional[Dict[str, Any]]) – Keyword arguments to ax.plot for the predicted data.

  • dataplot_kwargs (Optional[Dict[str, Any]]) – Keyword arguments to ax.plot the observed data.

Return type:

plt.Axes

espei.plot.plot_interaction(dbf, comps, phase_name, configuration, output, datasets=None, symmetry=None, ax=None, plot_kwargs=None, dataplot_kwargs=None) Axes#

Return one set of plotted Axes with data compared to calculated parameters

Parameters:
  • dbf (Database) – pycalphad thermodynamic database containing the relevant parameters.

  • comps (Sequence[str]) – Names of components to consider in the calculation.

  • phase_name (str) – Name of the considered phase phase

  • configuration (Tuple[Tuple[str]]) – ESPEI-style configuration

  • output (str) – Model property to plot on the y-axis e.g. 'HM_MIX', or 'SM_MIX'. Must be a '_MIX' property.

  • datasets (tinydb.TinyDB) –

  • symmetry (list) – List of lists containing indices of symmetric sublattices e.g. [[0, 1], [2, 3]]

  • ax (plt.Axes) – Default axes used if not specified.

  • plot_kwargs (Optional[Dict[str, Any]]) – Keyword arguments to ax.plot for the predicted data.

  • dataplot_kwargs (Optional[Dict[str, Any]]) – Keyword arguments to ax.plot the observed data.

Return type:

plt.Axes

espei.plot.plot_parameters(dbf, comps, phase_name, configuration, symmetry, datasets=None, fig=None, require_data=True)#

Plot parameters of interest compared with data in subplots of a single figure

Parameters:
  • dbf (Database) – pycalphad thermodynamic database containing the relevant parameters.

  • comps (list) – Names of components to consider in the calculation.

  • phase_name (str) – Name of the considered phase phase

  • configuration (tuple) – Sublattice configuration to plot, such as (‘CU’, ‘CU’) or ((‘CU’, ‘MG’), ‘CU’)

  • symmetry (list) – List of lists containing indices of symmetric sublattices e.g. [[0, 1], [2, 3]]

  • datasets (PickleableTinyDB) – ESPEI datasets to compare against. If None, nothing is plotted.

  • fig (matplotlib.Figure) – Figure to create with axes as subplots.

  • require_data (bool) – If True, plot parameters that have data corresponding data. Defaults to True. Will raise an error for non-interaction configurations.

Return type:

None

Examples

>>> # plot the LAVES_C15 (Cu)(Mg) endmember
>>> plot_parameters(dbf, ['CU', 'MG'], 'LAVES_C15', ('CU', 'MG'), symmetry=None, datasets=datasets)  
>>> # plot the mixing interaction in the first sublattice
>>> plot_parameters(dbf, ['CU', 'MG'], 'LAVES_C15', (('CU', 'MG'), 'MG'), symmetry=None, datasets=datasets)  

espei.priors module#

Classes and functions for retrieving statistical priors for given parameters.

class espei.priors.DistributionParameter(parameter, param_type='absolute')#

Bases: object

Handle generating absolute, scaling, shifting parameters.

Examples

>>> dp = DistributionParameter(5.0, 'absolute')  # always get back 5
>>> dp.value(1.0) == 5.0
True
>>> dp = DistributionParameter(-2.0, 'relative')  # multiply by -2
>>> dp.value(2.0) == -4.0
True
>>> dp = DistributionParameter(-1.0, 'shift_absolute')  # subtract 1
>>> dp.value(2.0) == 1.0
True
>>> dp = DistributionParameter(-0.5, 'shift_relative')  # subtract 1/2 value
>>> dp.value(2.0) == 1.0
True
SUPPORTED_TYPES = ('absolute', 'relative', 'shift_absolute', 'shift_relative', 'identity')#
value(p)#

Return the distribution parameter value modified by the parameter and type.

Parameters:

p (float) – Input parameter to modify.

Return type:

float

class espei.priors.PriorSpec(name, **parameters)#

Bases: object

Specification template for instantiating priors.

SUPPORTED_PRIORS = ('normal', 'uniform', 'triangular', 'zero')#
get_prior(value)#

Instantiate a prior as described in the spec

Examples

>>> import numpy as np
>>> from espei.priors import PriorSpec
>>> tri_spec = {'name': 'triangular', 'loc_shift_relative': -0.5, 'scale_shift_relative': 0.5, 'c': 0.5}
>>> np.isneginf(PriorSpec(**tri_spec).get_prior(10).logpdf(5.1))
False
>>> np.isneginf(PriorSpec(**tri_spec).get_prior(10).logpdf(4.9))
True
espei.priors.build_prior_specs(prior_spec, parameters)#

Get priors from given parameters

Parameters:
  • prior_spec (PriorSpec or dict) – Either a prior spec dict (to instantiate), a PriorSpec, or a list of either. If a list is passed, it must correspond to the parameters.

  • parameters (list) – List of parameters that the priors will be instantiated by

Return type:

[PriorSpec]

Examples

>>> s_norm = {'name': 'normal', 'scale_relative': 0.1, 'loc_identity': 1.0}
>>> len(build_prior_specs(s_norm, [10, 100])) == 2
True
>>> s_tri = {'name': 'triangular', 'loc_shift_relative': -0.5, 'scale_shift_relative': 0.5, 'c': 0.5}
>>> from espei.priors import PriorSpec
>>> len(build_prior_specs([s_norm, PriorSpec(**s_tri)], [10, 100])) == 2
True
class espei.priors.rv_zero(*args, **kwargs)#

Bases: object

A simple class that mimics the scipy.stats.rv_continuous object’s logpdf method, always returning zero.

This class mainly exists for backwards compatibility where no prior is specified.

Examples

>>> import numpy as np
>>> rv = rv_zero()
>>> np.isclose(rv.logpdf(-np.inf), 0.0)
True
>>> np.isclose(rv.logpdf(1.0), 0.0)
True
>>> np.isclose(rv.logpdf(0.0), 0.0)
True
logpdf(*args, **kwargs)#

espei.refdata module#

The refdata module contains pure-element reference state data.

espei.refdata.find_and_insert_user_refstate(entry_point_plugin_name='espei.reference_states', namespace={'And': <class 'symengine.lib.symengine_wrapper.And'>, 'INSERTED_USER_REFERENCE_STATES': [], 'OrderedDict': <class 'collections.OrderedDict'>, 'Piecewise': <class 'symengine.lib.symengine_wrapper.Piecewise'>, 'SGTE91': {('AG', 'BCC_A2'): Piecewise((3400 + GHSERAG - 1.05*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('AG', 'CUB_A13'): Piecewise((3765.6 + GHSERAG - 1.8826*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('AG', 'FCC_A1'): Piecewise((GHSERAG, And(T < 3000.0, 298.15 <= T)), (0, True)), ('AG', 'HCP_A3'): Piecewise((300 + GHSERAG + 0.3*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('AG', 'LIQUID'): Piecewise((11025.076 + GHSERAG - 8.89102*T - 1.033905e-20*T**7, And(T < 1234.93, 298.15 <= T)), (-3587.111 + 180.964656*T - 33.472*T*log(T), And(T < 3000.0, 1234.93 <= T)), (0, True)), ('AL', 'BCC_A2'): Piecewise((10083 + GHSERAL - 4.813*T, And(T < 2900.0, 298.15 <= T)), (0, True)), ('AL', 'BCT_A5'): Piecewise((10083 + GHSERAL - 4.813*T, And(T < 2900.0, 298.15 <= T)), (0, True)), ('AL', 'CBCC_A12'): Piecewise((10083.4 + GHSERAL - 4.813*T, And(T < 2900.0, 298.15 <= T)), (0, True)), ('AL', 'CUB_A13'): Piecewise((10920.44 + GHSERAL - 4.8116*T, And(T < 2900.0, 298.15 <= T)), (0, True)), ('AL', 'DIAMOND_A4'): Piecewise((GHSERAL + 30*T, And(T < 2900.0, 298.15 <= T)), (0, True)), ('AL', 'FCC_A1'): Piecewise((GHSERAL, And(T < 2900.0, 298.15 <= T)), (0, True)), ('AL', 'HCP_A3'): Piecewise((5481 + GHSERAL - 1.8*T, And(T < 2900.0, 298.15 <= T)), (0, True)), ('AL', 'LIQUID'): Piecewise((11005.029 + GHSERAL - 11.841867*T + 7.9337e-20*T**7, And(T < 700.0, 298.15 <= T)), (11005.03 + GHSERAL - 11.841867*T + 7.9337e-20*T**7, And(T < 933.47, 700.0 <= T)), (-795.996 + 177.430178*T - 31.748192*T*log(T), And(T < 2900.0, 933.47 <= T)), (0, True)), ('AM', 'BCC_A2'): Piecewise((5973.805 + GHSERAM - 4.531331*T + 5e-08*T**2 + 5e-12*T**3, And(T < 999.0, 298.15 <= T)), (-7800.332 + 63.93115*T - 15.8832*T*log(T) + 2287195*T**(-1) - 0.0190671*T**2 + 2.291117e-06*T**3, And(T < 1339.0, 999.0 <= T)), (-13153.887 + 219.600832*T - 39.748*T*log(T), And(T < 1449.0, 1339.0 <= T)), (70352.138 - 326.394464*T + 33.413*T*log(T) - 17379450*T**(-1) - 0.02736485*T**2 + 1.801717e-06*T**3, And(T < 2183.6, 1449.0 <= T)), (4777.694 + GHSERAM - 3.740241*T, And(T < 3000.0, 2183.6 <= T)), (0, True)), ('AM', 'DHCP'): Piecewise((GHSERAM, And(T < 3000.0, 298.15 <= T)), (0, True)), ('AM', 'FCC_A1'): Piecewise((-5224.899 + 99.204329*T - 23.1377*T*log(T) - 18507*T**(-1) - 0.00294694*T**2 - 6.64773e-07*T**3, And(T < 1018.0, 298.15 <= T)), (-2935.853 + 73.800069*T - 19.4406*T*log(T) - 260435*T**(-1) - 0.005418*T**2 - 3.75233e-07*T**3, And(T < 1548.7, 1018.0 <= T)), (-476.655 + GHSERAM + 0.246538*T, And(T < 3000.0, 1548.7 <= T)), (0, True)), ('AM', 'LIQUID'): Piecewise((19910.7 + GHSERAM - 14.1205*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('AS', 'BCC_A2'): Piecewise((24874 + GHSERAS - 16.1*T, And(T < 1200.0, 298.15 <= T)), (0, True)), ('AS', 'FCC_A1'): Piecewise((24874 + GHSERAS - 14.74*T, And(T < 1200.0, 298.15 <= T)), (0, True)), ('AS', 'HCP_A3'): Piecewise((24874 + GHSERAS - 14*T, And(T < 1200.0, 298.15 <= T)), (0, True)), ('AS', 'LIQUID'): Piecewise((24442.9 + GHSERAS - 22.424679*T, And(T < 1200.0, 298.15 <= T)), (0, True)), ('AS', 'RHOMBOHEDRAL_A7'): Piecewise((GHSERAS, And(T < 1200.0, 298.15 <= T)), (0, True)), ('AU', 'BCC_A2'): Piecewise((4250 + GHSERAU - 1.1*T, And(T < 3200, 298.15 <= T)), (0, True)), ('AU', 'FCC_A1'): Piecewise((GHSERAU, And(T < 3200.0, 298.15 <= T)), (0, True)), ('AU', 'HCP_A3'): Piecewise((240.75 + GHSERAU + 1.6*T, And(T < 3200.0, 298.15 <= T)), (0, True)), ('AU', 'LIQUID'): Piecewise((12552 + GHSERAU - 9.385866*T, And(T < 3200.0, 298.15 <= T)), (0, True)), ('B', 'BETA_RHOMBO_B'): Piecewise((GHSERBB, And(T < 6000.0, 298.15 <= T)), (0, True)), ('B', 'DIAMOND_A4'): Piecewise((GHSERBB, And(T < 6000.0, 298.15 <= T)), (0, True)), ('B', 'FCC_A1'): Piecewise((43514 + GHSERBB - 12.217*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('B', 'GRAPHITE'): Piecewise((5000 + GHSERBB, And(T < 6000.0, 298.15 <= T)), (0, True)), ('B', 'HCP_A3'): Piecewise((50208 + GHSERBB - 9.706*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('B', 'LIQUID'): Piecewise((48458.559 + GHSERBB - 20.268025*T, And(T < 500.0, 298.15 <= T)), (41119.703 + 82.101722*T - 14.9827763*T*log(T) + 335484*T**(-1) - 0.007095669*T**2 + 5.07347e-07*T**3, And(T < 2348.0, 500.0 <= T)), (28842.012 + 200.94731*T - 31.4*T*log(T), And(T < 3000.0, 2348.0 <= T)), (50372.665 + GHSERBB - 21.448954*T, And(T < 6000.0, 3000.0 <= T)), (0, True)), ('BA', 'BCC_A2'): Piecewise((GHSERBA, And(T < 4000.0, 298.15 <= T)), (0, True)), ('BA', 'FCC_A1'): Piecewise((1800 + GHSERBA + 0.6*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('BA', 'HCP_A3'): Piecewise((2000 + GHSERBA + 1.3*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('BA', 'LIQUID'): Piecewise((-9738.988 + 229.540143*T - 43.4961089*T*log(T) + 723016*T**(-1) - 0.002346416*T**2 + 9.91223e-07*T**3, And(T < 1000.0, 298.15 <= T)), (-7381.093 + 235.49642*T - 45.103*T*log(T) - 365*T**(-1) + 0.002154*T**2 + 2.7e-11*T**3, And(T < 2995.0, 1000.0 <= T)), (3856.393 + GHSERBA - 4.568042*T, And(T < 4000.0, 2995.0 <= T)), (0, True)), ('BE', 'BCC_A2'): Piecewise((-1076.057 + 109.411712*T - 17.1727841*T*log(T) + 242309*T**(-1) - 0.008672487*T**2 + 9.61427e-07*T**3, And(T < 1527.0, 298.15 <= T)), (-6970.378 + 196.411689*T - 30*T*log(T), And(T < 1560.0, 1527.0 <= T)), (-2609.973 + 178.131722*T - 27.7823769*T*log(T) - 1250847*T**(-1) - 0.000103629*T**2 - 5.9331e-08*T**3, And(T < 3000.0, 1560.0 <= T)), (0, True)), ('BE', 'FCC_A1'): Piecewise((6349 + GHSERBE - 1.085*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('BE', 'HCP_A3'): Piecewise((GHSERBE, And(T < 3000.0, 298.15 <= T)), (0, True)), ('BE', 'LIQUID'): Piecewise((7511.838 + 120.362788*T - 20.0497038*T*log(T) + 281044*T**(-1) - 0.004821347*T**2 + 4.15958e-07*T**3, And(T < 1560.0, 298.15 <= T)), (5364.713 + 156.961141*T - 25.486*T*log(T) + 15920*T**(-1) - 0.0010572*T**2 - 1.117e-09*T**3, And(T < 3000.0, 1560.0 <= T)), (0, True)), ('BI', 'BCC_A2'): Piecewise((11297 + GHSERBI - 13.9*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('BI', 'BCT_A5'): Piecewise((4184.07 + GHSERBI, And(T < 3000.0, 298.15 <= T)), (0, True)), ('BI', 'FCC_A1'): Piecewise((9900 + GHSERBI - 12.5*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('BI', 'HCP_A3'): Piecewise((9900 + GHSERBI - 11.8*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('BI', 'LIQUID'): Piecewise((11246.066 + GHSERBI - 20.636509*T - 5.9549e-19*T**7, And(T < 544.55, 298.15 <= T)), (11336.26 + GHSERBI - 20.810418*T - 1.66145e+25*T**(-9), And(T < 800.0, 544.55 <= T)), (11336.259 + GHSERBI - 20.810418*T - 1.66145e+25*T**(-9), And(T < 1200.0, 800.0 <= T)), (3754.947 + 103.961021*T - 27.196*T*log(T), And(T < 3000.0, 1200.0 <= T)), (0, True)), ('BI', 'RHOMBOHEDRAL_A7'): Piecewise((GHSERBI, And(T < 3000.0, 298.15 <= T)), (0, True)), ('BI', 'TETRAGONAL_A6'): Piecewise((4184.07 + GHSERBI, And(T < 3000.0, 298.15 <= T)), (0, True)), ('BI', 'TET_ALPHA1'): Piecewise((4234 + GHSERBI, And(T < 3000.0, 298.15 <= T)), (0, True)), ('C', 'DIAMOND_A4'): Piecewise((-16359.441 + 175.61*T - 24.31*T*log(T) + 11100000000.0*T**(-3) - 261000000.0*T**(-2) + 2698000*T**(-1) - 0.0004723*T**2, And(T < 6000.0, 298.15 <= T)), (0, True)), ('C', 'GRAPHITE'): Piecewise((GHSERCC, And(T < 6000.0, 298.15 <= T)), (0, True)), ('C', 'LIQUID'): Piecewise((117369 + GHSERCC - 24.63*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('CA', 'BCC_A2'): Piecewise((-7020.852 + 142.970155*T - 28.2541*T*log(T) + 60578*T**(-1) + 0.0072326*T**2 - 4.500217e-06*T**3, And(T < 716.0, 298.15 <= T)), (1640.475 + 1.999694*T - 6.276*T*log(T) - 523000*T**(-1) - 0.0161921*T**2, And(T < 1115.0, 716.0 <= T)), (-142331.096 + 1023.54905*T - 143.872698*T*log(T) + 25353771*T**(-1) + 0.032543127*T**2 - 1.704079e-06*T**3, And(T < 3000.0, 1115.0 <= T)), (0, True)), ('CA', 'FCC_A1'): Piecewise((GHSERCA, And(T < 3000.0, 298.15 <= T)), (0, True)), ('CA', 'HCP_A3'): Piecewise((500 + GHSERCA + 0.7*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('CA', 'LIQUID'): Piecewise((10799.908 + GHSERCA - 10.310466*T, And(T < 500.0, 298.15 <= T)), (7838.856 + 18.2979*T - 8.9874787*T*log(T) - 230193*T**(-1) - 0.02266537*T**2 + 3.338303e-06*T**3, And(T < 1115.0, 500.0 <= T)), (-2654.938 + 188.9223*T - 35*T*log(T), And(T < 3000.0, 1115.0 <= T)), (0, True)), ('CD', 'FCC_A1'): Piecewise((892.3 + GHSERCD - 0.92*T, And(T < 1600.0, 298.15 <= T)), (0, True)), ('CD', 'HCP_A3'): Piecewise((GHSERCD, And(T < 1600.0, 298.15 <= T)), (0, True)), ('CD', 'LIQUID'): Piecewise((6128.444 + GHSERCD - 10.296916*T, And(T < 400.0, 298.15 <= T)), (21716.884 - 371.046869*T + 53.1313898*T*log(T) - 1271815*T**(-1) - 0.115159917*T**2 + 2.8899781e-05*T**3, And(T < 594.22, 400.0 <= T)), (-3252.303 + 138.251107*T - 29.7064*T*log(T), And(T < 1500.0, 594.22 <= T)), (5775.186 + GHSERCD - 9.954373*T, And(T < 1600.0, 1500.0 <= T)), (0, True)), ('CD', 'TETRAGONAL_A6'): Piecewise((892.3 + GHSERCD - 0.92*T, And(T < 1600.0, 298.15 <= T)), (0, True)), ('CE', 'BCC_A2'): Piecewise((-1354.69 - 5.21501*T - 7.7305867*T*log(T) - 196303*T**(-1) - 0.029098402*T**2 + 4.784299e-06*T**3, And(T < 1000.0, 298.15 <= T)), (-12101.106 + 187.449688*T - 37.6142*T*log(T), And(T < 1072.0, 1000.0 <= T)), (-11950.375 + 186.333811*T - 37.4627992*T*log(T) - 25897*T**(-1) - 5.7145e-05*T**2 + 2.348e-09*T**3, And(T < 4000.0, 1072.0 <= T)), (0, True)), ('CE', 'DHCP'): Piecewise((-190 + GHSERCE + 0.56886*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('CE', 'FCC_A1'): Piecewise((GHSERCE, And(T < 4000.0, 298.15 <= T)), (0, True)), ('CE', 'HCP_A3'): Piecewise((50000 + GHSERCE, And(T < 4000.0, 298.15 <= T)), (0, True)), ('CE', 'LIQUID'): Piecewise((4117.865 - 11.423898*T - 7.5383948*T*log(T) - 198834*T**(-1) - 0.02936407*T**2 + 4.827734e-06*T**3, And(T < 1000.0, 298.15 <= T)), (-6730.605 + 183.023193*T - 37.6978*T*log(T), And(T < 2000.0, 1000.0 <= T)), (7468.034 + GHSERCE - 7.346999*T, And(T < 4000.0, 2000.0 <= T)), (0, True)), ('CO', 'BCC_A2'): Piecewise((2938 + GHSERCO - 0.7138*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('CO', 'CBCC_A12'): Piecewise((4155 + GHSERCO, And(T < 6000.0, 298.15 <= T)), (0, True)), ('CO', 'CUB_A13'): Piecewise((3155 + GHSERCO, And(T < 6000.0, 298.15 <= T)), (0, True)), ('CO', 'FCC_A1'): Piecewise((427.591 + GHSERCO - 0.615248*T, And(T < 1768.0, 298.15 <= T)), (427.591 + GHSERCO - 0.615253*T, And(T < 6000.0, 1768.0 <= T)), (0, True)), ('CO', 'HCP_A3'): Piecewise((GHSERCO, And(T < 6000.0, 298.15 <= T)), (0, True)), ('CO', 'LIQUID'): Piecewise((15085.037 + GHSERCO - 8.931932*T - 2.19801e-21*T**7, And(T < 1768.0, 298.15 <= T)), (-846.61 + 243.599944*T - 40.5*T*log(T), And(T < 6000.0, 1768.0 <= T)), (0, True)), ('CR', 'BCC_A2'): Piecewise((GHSERCR, And(T < 6000.0, 298.15 <= T)), (0, True)), ('CR', 'CBCC_A12'): Piecewise((11087 + GHSERCR + 2.7196*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('CR', 'CUB_A13'): Piecewise((15899 + GHSERCR + 0.6276*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('CR', 'FCC_A1'): Piecewise((7284 + GHSERCR + 0.163*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('CR', 'HCP_A3'): Piecewise((4438 + GHSERCR, And(T < 6000.0, 298.15 <= T)), (0, True)), ('CR', 'LIQUID'): Piecewise((24339.955 + GHSERCR - 11.420225*T + 2.37615e-21*T**7, And(T < 2180.0, 298.15 <= T)), (-16459.984 + 335.616316*T - 50*T*log(T), And(T < 6000.0, 2180.0 <= T)), (0, True)), ('CS', 'BCC_A2'): Piecewise((GHSERCS, And(T < 2000.0, 200.0 <= T)), (0, True)), ('CS', 'FCC_A1'): Piecewise((500 + GHSERCS + 1.3*T, And(T < 2000.0, 200.0 <= T)), (0, True)), ('CS', 'HCP_A3'): Piecewise((500 + GHSERCS + 2*T, And(T < 2000.0, 200.0 <= T)), (0, True)), ('CS', 'LIQUID'): Piecewise((2091.141 + GHSERCS - 6.931035*T - 3.56867e-18*T**7, And(T < 301.59, 200.0 <= T)), (2099.779 + GHSERCS - 6.961111*T - 7.8016e+21*T**(-9), And(T < 2000.0, 301.59 <= T)), (0, True)), ('CU', 'BCC_A2'): Piecewise((4017 + GHSERCU - 1.255*T, And(T < 3200.0, 298.15 <= T)), (0, True)), ('CU', 'FCC_A1'): Piecewise((GHSERCU, And(T < 3200.0, 298.15 <= T)), (0, True)), ('CU', 'HCP_A3'): Piecewise((600 + GHSERCU + 0.2*T, And(T < 3200.0, 298.15 <= T)), (0, True)), ('CU', 'LIQUID'): Piecewise((12964.735 + GHSERCU - 9.511904*T - 5.8489e-21*T**7, And(T < 1357.77, 298.15 <= T)), (-46.545 + 173.881484*T - 31.38*T*log(T), And(T < 3200.0, 1357.77 <= T)), (0, True)), ('DY', 'BCC_A2'): Piecewise((1508.1802 + GHSERDY - 0.566616181*T, And(T < 1000.0, 100.0 <= T)), (327500.062 - 2868.04585*T + 391.515418*T*log(T) - 48652656.5*T**(-1) - 0.224042148*T**2 + 2.04076075e-05*T**3, And(T < 1654.15, 1000.0 <= T)), (-33708.7949 + 291.409631*T - 50.208*T*log(T), And(T < 1685.15, 1654.15 <= T)), (-40775.4966 + 330.318068*T - 55.2811171*T*log(T) + 1776589.32*T**(-1) + 0.0015254673*T**2 - 7.7437116e-08*T**3, And(T < 3000.0, 1685.15 <= T)), (0, True)), ('DY', 'HCP_A3'): Piecewise((GHSERDY, And(T < 3000.0, 100.0 <= T)), (0, True)), ('DY', 'LIQUID'): Piecewise((13196.6185 + GHSERDY - 7.5443643*T, And(T < 1000.0, 100.0 <= T)), (300126.971 - 2519.78614*T + 341.302578*T*log(T) - 43071677.5*T**(-1) - 0.196153225*T**2 + 1.76197799e-05*T**3, And(T < 1685.15, 1000.0 <= T)), (-21864.7344 + 282.205014*T - 49.9151*T*log(T), And(T < 3000.0, 1685.15 <= T)), (0, True)), ('ER', 'HCP_A3'): Piecewise((GHSERER, And(T < 3200.0, 298.15 <= T)), (0, True)), ('ER', 'LIQUID'): Piecewise((19382.102 + GHSERER - 10.241846*T, And(T < 500.0, 298.15 <= T)), (17912.678 + 0.355564*T - 12.0761776*T*log(T) - 528122*T**(-1) - 0.014414687*T**2 + 1.316517e-06*T**3, And(T < 1802.0, 500.0 <= T)), (747.131 + 187.623024*T - 38.702*T*log(T), And(T < 3200.0, 1802.0 <= T)), (0, True)), ('EU', 'BCC_A2'): Piecewise((GHSEREU, And(T < 1900.0, 298.15 <= T)), (0, True)), ('EU', 'LIQUID'): Piecewise((8382.505 + GHSEREU - 7.175215*T, And(T < 400.0, 298.15 <= T)), (10972.726 - 103.688201*T + 4.3501554*T*log(T) - 646908*T**(-1) - 0.036811218*T**2 + 5.452934e-06*T**3, And(T < 1095.0, 299.15 <= T)), (-6890.641 + 175.517247*T - 38.11624*T*log(T), And(T < 1900.0, 300.15 <= T)), (0, True)), ('FE', 'BCC_A2'): Piecewise((GHSERFE, And(T < 6000.0, 298.15 <= T)), (0, True)), ('FE', 'CBCC_A12'): Piecewise((4745 + GHSERFE, And(T < 6000.0, 298.15 <= T)), (0, True)), ('FE', 'CUB_A13'): Piecewise((3745 + GHSERFE, And(T < 6000.0, 298.15 <= T)), (0, True)), ('FE', 'FCC_A1'): Piecewise((-1462.4 + GHSERFE + 8.282*T - 1.15*T*log(T) + 0.00064*T**2, And(T < 1811.0, 298.15 <= T)), (-1713.815 + GHSERFE + 0.94001*T + 4.9251e+30*T**(-9), And(T < 6000.0, 1811.0 <= T)), (0, True)), ('FE', 'HCP_A3'): Piecewise((-3705.78 + GHSERFE + 12.591*T - 1.15*T*log(T) + 0.00064*T**2, And(T < 1811.0, 298.15 <= T)), (-3957.199 + GHSERFE + 5.24951*T + 4.9251e+30*T**(-9), And(T < 6000.0, 1811.0 <= T)), (0, True)), ('FE', 'LIQUID'): Piecewise((12040.17 + GHSERFE - 6.55843*T - 3.67516e-21*T**7, And(T < 1811.0, 298.15 <= T)), (-10838.83 + 291.302*T - 46*T*log(T), And(T < 6000.0, 1811.0 <= T)), (0, True)), ('GA', 'BCC_A2'): Piecewise((4500 + GHSERGA - 11.7*T, And(T < 4000.0, 200.0 <= T)), (0, True)), ('GA', 'BCT_A5'): Piecewise((3846 + GHSERGA - 9.8*T, And(T < 4000.0, 200.0 <= T)), (0, True)), ('GA', 'FCC_A1'): Piecewise((3800 + GHSERGA - 10.2*T, And(T < 4000.0, 200.0 <= T)), (0, True)), ('GA', 'HCP_A3'): Piecewise((4500 + GHSERGA - 9.5*T, And(T < 4000.0, 200.0 <= T)), (0, True)), ('GA', 'LIQUID'): Piecewise((5491.298 + GHSERGA - 18.073995*T - 7.0171e-17*T**7, And(T < 302.91, 200.0 <= T)), (5666.455 + GHSERGA - 18.681147*T - 1.64547e+23*T**(-9), And(T < 4000.0, 302.91 <= T)), (0, True)), ('GA', 'ORTHORHOMBIC_GA'): Piecewise((GHSERGA, And(T < 4000.0, 200.0 <= T)), (0, True)), ('GA', 'TETRAGONAL_A6'): Piecewise((3500 + GHSERGA - 10*T, And(T < 4000.0, 200.0 <= T)), (0, True)), ('GD', 'BCC_A2'): Piecewise((3233.80866 + GHSERGD - 2.11184585*T + 1.00000001e-07*T*log(T), And(T < 1000.0, 200.0 <= T)), (152792.743 - 1349.58873*T + 180.097094*T*log(T) - 22038836*T**(-1) - 0.119550229*T**2 + 1.17915728e-05*T**3, And(T < 1508.15, 1000.0 <= T)), (-15783.7618 + 202.222057*T - 38.960425*T*log(T), And(T < 1586.15, 1508.15 <= T)), (-19850.5562 + 224.817909*T - 41.904333*T*log(T) + 995428.573*T**(-1) + 0.000858222759*T**2 - 3.77570269e-08*T**3, And(T < 3600.0, 1586.15 <= T)), (0, True)), ('GD', 'HCP_A3'): Piecewise((GHSERGD, And(T < 3600.0, 200.0 <= T)), (0, True)), ('GD', 'LIQUID'): Piecewise((13060.0262 + GHSERGD - 8.32179974*T, And(T < 1000.0, 200.0 <= T)), (146262.037 - 1208.70685*T + 159.352082*T*log(T) - 19678357*T**(-1) - 0.108247135*T**2 + 1.06945505e-05*T**3, And(T < 1508.15, 1000.0 <= T)), (-5397.314 + 192.336215*T - 38.5075*T*log(T), And(T < 3600.0, 1508.15 <= T)), (0, True)), ('GE', 'BCC_A2'): Piecewise((34100 + GHSERGE - 23.5*T, And(T < 3200.0, 298.15 <= T)), (0, True)), ('GE', 'DIAMOND_A4'): Piecewise((GHSERGE, And(T < 3200.0, 298.15 <= T)), (0, True)), ('GE', 'FCC_A1'): Piecewise((36000 + GHSERGE - 22.3*T, And(T < 3200.0, 298.15 <= T)), (0, True)), ('GE', 'HCP_A3'): Piecewise((35000 + GHSERGE - 21.5*T, And(T < 3200.0, 298.15 <= T)), (0, True)), ('GE', 'LIQUID'): Piecewise((37141.49 + GHSERGE - 30.687043*T + 8.56632e-21*T**7, And(T < 900.0, 298.15 <= T)), (37141.489 + GHSERGE - 30.687044*T + 8.56632e-21*T**7, And(T < 1211.4, 900.0 <= T)), (27243.473 + 126.324186*T - 27.6144*T*log(T), And(T < 3200.0, 1211.4 <= T)), (0, True)), ('HF', 'BCC_A2'): Piecewise((5370.703 + 103.836026*T - 22.8995*T*log(T) - 22590*T**(-1) - 0.004206605*T**2 + 8.71923e-07*T**3 - 1.446e-10*T**4, And(T < 2506.0, 298.15 <= T)), (1912456.77 - 8624.20573*T + 1087.61412*T*log(T) - 610085091.0*T**(-1) - 0.286857065*T**2 + 1.3427829e-05*T**3, And(T < 3000.0, 2506.0 <= T)), (0, True)), ('HF', 'FCC_A1'): Piecewise((10000 + GHSERHF - 2.2*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('HF', 'HCP_A3'): Piecewise((GHSERHF, And(T < 3000.0, 298.15 <= T)), (0, True)), ('HF', 'LIQUID'): Piecewise((27402.256 + GHSERHF - 10.953093*T, And(T < 1000.0, 298.15 <= T)), (49731.499 - 149.91739*T + 12.116812*T*log(T) - 4449699*T**(-1) - 0.021262021*T**2 + 1.376466e-06*T**3, And(T < 2506.0, 1000.0 <= T)), (-4247.217 + 265.470523*T - 44*T*log(T), And(T < 3000.0, 2506.0 <= T)), (0, True)), ('HG', 'LIQUID'): Piecewise((GHSERHG, And(T < 2000.0, 200.0 <= T)), (0, True)), ('HG', 'RHOMBO_A10'): Piecewise((-10668.401 + 123.274598*T - 28.847*T*log(T) + 13330*T**(-1) + 0.01699705*T**2 - 2.4555667e-05*T**3, And(T < 234.32, 200.0 <= T)), (-11425.394 + 135.928158*T - 30.2091*T*log(T) + 35545*T**(-1) + 0.00107555*T**2 - 2.28298e-07*T**3, And(T < 2000.0, 234.32 <= T)), (0, True)), ('HO', 'BCC_A2'): Piecewise((3731.229 + GHSERHO - 2.060316*T, And(T < 600.0, 298.15 <= T)), (3731.23 + GHSERHO - 2.060316*T, And(T < 900.0, 600.0 <= T)), (3731.229 + GHSERHO - 2.060317*T, And(T < 1000.0, 900.0 <= T)), (185512.056 - 1635.74067*T + 218.937249*T*log(T) - 26729747*T**(-1) - 0.13516576*T**2 + 1.2168911e-05*T**3, And(T < 1703.0, 1000.0 <= T)), (-28867.901 + 272.946988*T - 48.116*T*log(T), And(T < 1745.0, 1703.0 <= T)), (-152754.148 + 939.764197*T - 134.793064*T*log(T) + 32050889*T**(-1) + 0.025544089*T**2 - 1.287517e-06*T**3, And(T < 3000.0, 1745.0 <= T)), (0, True)), ('HO', 'HCP_A3'): Piecewise((GHSERHO, And(T < 3000.0, 298.15 <= T)), (0, True)), ('HO', 'LIQUID'): Piecewise((17262.172 + GHSERHO - 9.992194*T, And(T < 1000.0, 298.15 <= T)), (124706.283 - 994.683024*T + 127.957778*T*log(T) - 15727191*T**(-1) - 0.088196514*T**2 + 8.008222e-06*T**3, And(T < 1703.0, 1000.0 <= T)), (-9809.781 + 230.793918*T - 43.932*T*log(T), And(T < 3000.0, 1703.0 <= T)), (0, True)), ('IN', 'BCC_A2'): Piecewise((800 + GHSERIN - 0.8*T, And(T < 3800.0, 298.15 <= T)), (0, True)), ('IN', 'FCC_A1'): Piecewise((123 + GHSERIN - 0.1988*T, And(T < 3800.0, 298.15 <= T)), (0, True)), ('IN', 'HCP_A3'): Piecewise((533 + GHSERIN - 0.6868*T, And(T < 3800.0, 298.15 <= T)), (0, True)), ('IN', 'LIQUID'): Piecewise((3282.092 + GHSERIN - 7.63686*T - 5.59058e-20*T**7, And(T < 429.75, 298.15 <= T)), (3283.706 + GHSERIN - 7.640804*T - 3.53116e+22*T**(-9), And(T < 3800.0, 429.75 <= T)), (0, True)), ('IN', 'TETRAGONAL_A6'): Piecewise((GHSERIN, And(T < 3800.0, 298.15 <= T)), (0, True)), ('IN', 'TET_ALPHA1'): Piecewise((193 + GHSERIN - 0.16479*T, And(T < 3800.0, 298.15 <= T)), (0, True)), ('IR', 'BCC_A2'): Piecewise((32000 + GHSERIR - 6.9*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('IR', 'FCC_A1'): Piecewise((GHSERIR, And(T < 4000.0, 298.15 <= T)), (0, True)), ('IR', 'HCP_A3'): Piecewise((4000 + GHSERIR - 0.6*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('IR', 'LIQUID'): Piecewise((23455.244 + GHSERIR - 6.312059*T, And(T < 1000.0, 298.15 <= T)), (102217.789 - 587.632815*T + 73.9517579*T*log(T) - 13382612*T**(-1) - 0.04638802*T**2 + 2.761831e-06*T**3, And(T < 2719.0, 1000.0 <= T)), (-38347.217 + 411.234043*T - 59.418*T*log(T), And(T < 4000.0, 2719.0 <= T)), (0, True)), ('K', 'BCC_A2'): Piecewise((GHSERKK, And(T < 2200.0, 200.0 <= T)), (0, True)), ('K', 'FCC_A1'): Piecewise((50 + GHSERKK + 1.3*T, And(T < 2200.0, 200.0 <= T)), (0, True)), ('K', 'HCP_A3'): Piecewise((50 + GHSERKK + 2*T, And(T < 2200.0, 200.0 <= T)), (0, True)), ('K', 'LIQUID'): Piecewise((2318.096 + GHSERKK - 6.886859*T - 9.44e-19*T**7, And(T < 336.53, 200.0 <= T)), (2323.019 + GHSERKK - 6.902217*T - 1.19223e+22*T**(-9), And(T < 2200.0, 336.53 <= T)), (0, True)), ('LA', 'BCC_A2'): Piecewise((-3952.161 + 88.072353*T - 21.7919*T*log(T) - 0.004045175*T**2 - 5.25865e-07*T**3, And(T < 800.0, 298.15 <= T)), (321682.673 - 3565.08252*T + 513.440708*T*log(T) - 36581228*T**(-1) - 0.387295093*T**2 + 4.9547989e-05*T**3, And(T < 1134.0, 800.0 <= T)), (-16377.894 + 218.492988*T - 39.5388*T*log(T), And(T < 1193.0, 1134.0 <= T)), (-136609.91 + 1123.34397*T - 163.413074*T*log(T) + 21167204*T**(-1) + 0.053968535*T**2 - 4.056395e-06*T**3, And(T < 2000.0, 1193.0 <= T)), (7402.894 + GHSERLA - 6.553756*T, And(T < 4000.0, 2000.0 <= T)), (0, True)), ('LA', 'DHCP'): Piecewise((GHSERLA, And(T < 4000.0, 298.15 <= T)), (0, True)), ('LA', 'FCC_A1'): Piecewise((-6109.797 + 89.878761*T - 21.7919*T*log(T) - 0.004045175*T**2 - 5.25865e-07*T**3, And(T < 1134.0, 298.15 <= T)), (-124598.976 + 955.878375*T - 139.346741*T*log(T) + 20994153*T**(-1) + 0.042032405*T**2 - 3.066199e-06*T**3, And(T < 2000.0, 1134.0 <= T)), (3009.496 + GHSERLA - 2.846081*T, And(T < 4000.0, 2000.0 <= T)), (0, True)), ('LA', 'LIQUID'): Piecewise((5332.653 + 18.23012*T - 11.0188191*T*log(T) - 133541*T**(-1) - 0.020171603*T**2 + 2.93775e-06*T**3, And(T < 1134.0, 298.15 <= T)), (-3942.004 + 171.018431*T - 34.3088*T*log(T), And(T < 2000.0, 1134.0 <= T)), (11666.878 + GHSERLA - 10.37164*T, And(T < 4000.0, 2000.0 <= T)), (0, True)), ('LI', 'BCC_A2'): Piecewise((GHSERLI, And(T < 3000.0, 200.0 <= T)), (0, True)), ('LI', 'FCC_A1'): Piecewise((-108 + GHSERLI + 1.3*T, And(T < 3000, 200.0 <= T)), (0, True)), ('LI', 'HCP_A3'): Piecewise((-154 + GHSERLI + 2*T, And(T < 3000.0, 200.0 <= T)), (0, True)), ('LI', 'LIQUID'): Piecewise((2700.205 + GHSERLI - 5.795621*T, And(T < 250.0, 200.0 <= T)), (12015.027 - 362.187078*T + 61.6104424*T*log(T) - 559968*T**(-1) - 0.182426463*T**2 + 6.3955671e-05*T**3, And(T < 453.6, 250.0 <= T)), (-6057.31 + 172.652183*T - 31.2283718*T*log(T) - 102387*T**(-1) + 0.002633221*T**2 - 4.38058e-07*T**3, And(T < 500.0, 453.6 <= T)), (3005.684 + GHSERLI - 6.626102*T, And(T < 3000.0, 500.0 <= T)), (0, True)), ('LU', 'HCP_A3'): Piecewise((GHSERLU, And(T < 3700.0, 298.15 <= T)), (0, True)), ('LU', 'LIQUID'): Piecewise((12772.12 + GHSERLU - 4.998883*T, And(T < 600.0, 298.15 <= T)), (30389.863 - 198.378793*T + 20.9392663*T*log(T) - 2398650*T**(-1) - 0.034238743*T**2 + 2.890636e-06*T**3, And(T < 1936.0, 600.0 <= T)), (-18994.687 + 292.091104*T - 47.9068*T*log(T), And(T < 3700.0, 1936.0 <= T)), (0, True)), ('MG', 'BCC_A2'): Piecewise((3100 + GHSERMG - 2.1*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('MG', 'CBCC_A12'): Piecewise((4602.4 + GHSERMG - 3.011*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('MG', 'CUB_A13'): Piecewise((5000 + GHSERMG - 3*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('MG', 'FCC_A1'): Piecewise((2600 + GHSERMG - 0.9*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('MG', 'HCP_A3'): Piecewise((GHSERMG, And(T < 3000.0, 298.15 <= T)), (0, True)), ('MG', 'LIQUID'): Piecewise((8202.243 + GHSERMG - 8.83693*T - 8.0176e-20*T**7, And(T < 923.0, 298.15 <= T)), (-5439.869 + 195.324057*T - 34.3088*T*log(T), And(T < 3000.0, 923.0 <= T)), (0, True)), ('MN', 'BCC_A2'): Piecewise((-3235.3 + 127.85*T - 23.7*T*log(T) + 60000*T**(-1) - 0.00744271*T**2, And(T < 1519.0, 298.15 <= T)), (5544.58 + GHSERMN - 4.5605*T - 3.91695e+29*T**(-9), And(T < 2000.0, 1519.0 <= T)), (0, True)), ('MN', 'CBCC_A12'): Piecewise((GHSERMN, And(T < 2000.0, 298.15 <= T)), (0, True)), ('MN', 'CUB_A13'): Piecewise((-5800.4 + 135.995*T - 24.8785*T*log(T) + 70269*T**(-1) - 0.00583359*T**2, And(T < 1519.0, 298.15 <= T)), (442.65 + GHSERMN - 0.9715*T + 2.310723e+30*T**(-9), And(T < 2000.0, 1519.0 <= T)), (0, True)), ('MN', 'FCC_A1'): Piecewise((-3439.3 + 131.884*T - 24.5177*T*log(T) + 69600*T**(-1) - 0.006*T**2, And(T < 1519.0, 298.15 <= T)), (2663.31 + GHSERMN - 2.5984*T + 2.205113e+30*T**(-9), And(T < 2000.0, 1519.0 <= T)), (0, True)), ('MN', 'HCP_A3'): Piecewise((-4439.3 + 133.007*T - 24.5177*T*log(T) + 69600*T**(-1) - 0.006*T**2, And(T < 1519.0, 298.15 <= T)), (1663.31 + GHSERMN - 1.4754*T + 2.205113e+30*T**(-9), And(T < 2000.0, 1519.0 <= T)), (0, True)), ('MN', 'LIQUID'): Piecewise((17859.91 + GHSERMN - 12.6208*T - 4.41929e-21*T**7, And(T < 1519.0, 298.15 <= T)), (-9993.9 + 299.036*T - 48*T*log(T), And(T < 2000.0, 1519.0 <= T)), (0, True)), ('MO', 'BCC_A2'): Piecewise((GHSERMO, And(T < 5000.0, 298.15 <= T)), (0, True)), ('MO', 'FCC_A1'): Piecewise((15200 + GHSERMO + 0.63*T, And(T < 5000.0, 298.15 <= T)), (0, True)), ('MO', 'HCP_A3'): Piecewise((11550 + GHSERMO, And(T < 5000.0, 298.15 <= T)), (0, True)), ('MO', 'LIQUID'): Piecewise((41831.347 + GHSERMO - 14.694912*T + 4.24519e-22*T**7, And(T < 2896.0, 298.15 <= T)), (3538.963 + 271.6697*T - 42.63829*T*log(T), And(T < 5000.0, 2896.0 <= T)), (0, True)), ('N', 'LIQUID'): Piecewise((29950 + GHSERNN + 59.02*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('N2', 'GAS'): Piecewise((2*GHSERNN, And(T < 6000.0, 298.15 <= T)), (0, True)), ('NA', 'BCC_A2'): Piecewise((GHSERNA, And(T < 2300.0, 200.0 <= T)), (0, True)), ('NA', 'FCC_A1'): Piecewise((-50 + GHSERNA + 1.3*T, And(T < 2300.0, 200.0 <= T)), (0, True)), ('NA', 'HCP_A3'): Piecewise((-104 + GHSERNA + 2*T, And(T < 2300.0, 200.0 <= T)), (0, True)), ('NA', 'LIQUID'): Piecewise((2581.02 + GHSERNA - 6.95218*T - 2.76132e-18*T**7, And(T < 370.87, 200.0 <= T)), (2609.444 + GHSERNA - 7.032656*T - 1.65071e+23*T**(-9), And(T < 2300.0, 370.87 <= T)), (0, True)), ('NB', 'BCC_A2'): Piecewise((GHSERNB, And(T < 6000.0, 298.15 <= T)), (0, True)), ('NB', 'FCC_A1'): Piecewise((13500 + GHSERNB + 1.7*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('NB', 'HCP_A3'): Piecewise((10000 + GHSERNB + 2.4*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('NB', 'LIQUID'): Piecewise((29781.555 + GHSERNB - 10.816418*T - 3.06098e-23*T**7, And(T < 2750.0, 298.15 <= T)), (-7499.398 + 260.756148*T - 41.77*T*log(T), And(T < 6000.0, 2750.0 <= T)), (0, True)), ('ND', 'BCC_A2'): Piecewise((1437.295 + GHSERND - 0.546281*T, And(T < 400.0, 298.15 <= T)), (7312.2 - 153.033976*T + 14.9956777*T*log(T) - 831810*T**(-1) - 0.050479*T**2 + 7.287217e-06*T**3, And(T < 1128.0, 400.0 <= T)), (-18030.266 + 239.677322*T - 44.5596*T*log(T), And(T < 1289.0, 1128.0 <= T)), (334513.017 - 2363.9199*T + 311.409193*T*log(T) - 64319604*T**(-1) - 0.156030778*T**2 + 1.2408421e-05*T**3, And(T < 1800.0, 1289.0 <= T)), (0, True)), ('ND', 'DHCP'): Piecewise((GHSERND, And(T < 1800.0, 298.15 <= T)), (0, True)), ('ND', 'FCC_A1'): Piecewise((500 + GHSERND, And(T < 1128.0, 298.15 <= T)), (500 + GHSERND + 9.99999884e-07*T + 3.00000011e-07*T*log(T), And(T < 1799.0, 1128.0 <= T)), (500 + GHSERND, And(T < 1800.0, 1799.0 <= T)), (0, True)), ('ND', 'LIQUID'): Piecewise((5051.743 + GHSERND - 1.585076*T, And(T < 300.0, 298.15 <= T)), (5350.01 - 86.593963*T + 5.357301*T*log(T) - 374380*T**(-1) - 0.046955463*T**2 + 6.860782e-06*T**3, And(T < 1128.0, 300.0 <= T)), (-16335.232 + 268.625903*T - 48.7854*T*log(T), And(T < 1799.0, 1128.0 <= T)), (9407.099 + GHSERND - 7.631185*T, And(T < 1800.0, 1799.0 <= T)), (0, True)), ('NI', 'BCC_A2'): Piecewise((8715.084 + GHSERNI - 3.556*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('NI', 'CBCC_A12'): Piecewise((3556 + GHSERNI, And(T < 3000.0, 298.15 <= T)), (0, True)), ('NI', 'CUB_A13'): Piecewise((2092 + GHSERNI, And(T < 3000.0, 298.15 <= T)), (0, True)), ('NI', 'FCC_A1'): Piecewise((GHSERNI, And(T < 3000.0, 298.15 <= T)), (0, True)), ('NI', 'HCP_A3'): Piecewise((1046 + GHSERNI + 1.255*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('NI', 'LIQUID'): Piecewise((16414.686 + GHSERNI - 9.397*T - 3.82318e-21*T**7, And(T < 1728.0, 298.15 <= T)), (-9549.775 + 268.598*T - 43.1*T*log(T), And(T < 3000.0, 1728.0 <= T)), (0, True)), ('NP', 'BCC_A2'): Piecewise((-3224.664 + 174.911817*T - 35.177*T*log(T) + 302225*T**(-1) - 0.00251865*T**2 + 5.14743e-07*T**3, And(T < 856.0, 298.15 <= T)), (-2366.486 + 180.807719*T - 36.401*T*log(T), And(T < 917.0, 856.0 <= T)), (50882.281 - 297.324358*T + 30.7734*T*log(T) - 7500100*T**(-1) - 0.0343483*T**2 + 2.707217e-06*T**3, And(T < 1999.0, 917.0 <= T)), (-2786.95 + GHSERNP - 1.007779*T, And(T < 4000.0, 1999.0 <= T)), (0, True)), ('NP', 'LIQUID'): Piecewise((-4627.18 + 160.024959*T - 31.229*T*log(T) + 439915*T**(-1) - 0.0163885*T**2 + 2.941883e-06*T**3, And(T < 917.0, 298.15 <= T)), (-7415.255 + 247.671446*T - 45.3964*T*log(T), And(T < 1799.0, 917.0 <= T)), (4677.481 + GHSERNP - 8.10942*T, And(T < 4000.0, 1799.0 <= T)), (0, True)), ('NP', 'ORTHO_AC'): Piecewise((GHSERNP, And(T < 4000.0, 298.15 <= T)), (0, True)), ('NP', 'TETRAG_AD'): Piecewise((-10157.32 + 183.829213*T - 34.11*T*log(T) + 532825*T**(-1) - 0.0161186*T**2 + 4.98465e-06*T**3, And(T < 555.0, 298.15 <= T)), (-7873.688 + 207.01896*T - 39.33*T*log(T), And(T < 856.0, 555.0 <= T)), (19027.98 - 46.64846*T - 3.4265*T*log(T) - 3564640*T**(-1) - 0.01921045*T**2 + 1.52726e-06*T**3, And(T < 1999.0, 856.0 <= T)), (-3978.084 + GHSERNP + 0.926171*T, And(T < 4000.0, 1999.0 <= T)), (0, True)), ('O', 'BCC_A2'): Piecewise((30000 + GHSEROO, And(T < 6000.0, 298.15 <= T)), (0, True)), ('O', 'FCC_A1'): Piecewise((30000 + GHSEROO, And(T < 6000.0, 298.15 <= T)), (0, True)), ('O', 'LIQUID'): Piecewise((-2648.9 + GHSEROO + 31.44*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('O2', 'GAS'): Piecewise((2*GHSEROO, And(T < 6000.0, 298.15 <= T)), (0, True)), ('OS', 'BCC_A2'): Piecewise((43500 + GHSEROS - 9*T, And(T < 5500.0, 298.15 <= T)), (0, True)), ('OS', 'FCC_A1'): Piecewise((13000 + GHSEROS - 2.5*T, And(T < 5500.0, 298.15 <= T)), (0, True)), ('OS', 'HCP_A3'): Piecewise((GHSEROS, And(T < 5500.0, 298.15 <= T)), (0, True)), ('OS', 'LIQUID'): Piecewise((36460.17 + GHSEROS - 8.473743*T, And(T < 1000.0, 298.15 <= T)), (68715.318 - 198.324341*T + 19.9382156*T*log(T) - 6237261*T**(-1) - 0.020464464*T**2 + 1.014279e-06*T**3, And(T < 3306.0, 1000.0 <= T)), (-15903.192 + 336.874526*T - 50*T*log(T), And(T < 5500.0, 3306.0 <= T)), (0, True)), ('P', 'BCC_A2'): Piecewise((18792.241 + 135.412002*T - 25.55*T*log(T) + 160095*T**(-1) + 0.0034121*T**2 - 2.418867e-06*T**3, And(T < 500.0, 250.0 <= T)), (23045.079 + 64.411737*T - 14.368*T*log(T) - 141375*T**(-1) - 0.00957685*T**2 + 3.93917e-07*T**3, And(T < 852.35, 500.0 <= T)), (-74639.613 + 1012.76962*T - 149.449556*T*log(T) + 12495943*T**(-1) + 0.067272364*T**2 - 6.651929e-06*T**3, And(T < 1500.0, 852.35 <= T)), (28337.756 + GHSERPP + 4.70235*T, And(T < 3000.0, 1500.0 <= T)), (0, True)), ('P', 'FCC_A1'): Piecewise((10842.441 + 135.534002*T - 25.55*T*log(T) + 160095*T**(-1) + 0.0034121*T**2 - 2.418867e-06*T**3, And(T < 500.0, 250.0 <= T)), (15095.279 + 64.533737*T - 14.368*T*log(T) - 141375*T**(-1) - 0.00957685*T**2 + 3.93917e-07*T**3, And(T < 852.35, 500.0 <= T)), (-82589.413 + 1012.89162*T - 149.449556*T*log(T) + 12495943*T**(-1) + 0.067272364*T**2 - 6.651929e-06*T**3, And(T < 1500.0, 852.35 <= T)), (20387.956 + GHSERPP + 4.82435*T, And(T < 3000.0, 1500.0 <= T)), (0, True)), ('P', 'LIQUID'): Piecewise((-26316.111 + 434.930931*T - 70.7440584*T*log(T) + 1141147*T**(-1) - 0.002898936*T**2 + 3.9049371e-05*T**3, And(T < 317.3, 250.0 <= T)), (-7232.449 + 133.291873*T - 26.326*T*log(T), And(T < 1000.0, 317.3 <= T)), (860.626 + GHSERPP - 2.584958*T, And(T < 3000.0, 1000.0 <= T)), (0, True)), ('P', 'RED_P'): Piecewise((-25976.559 + 148.672002*T - 25.55*T*log(T) + 160095*T**(-1) + 0.0034121*T**2 - 2.418867e-06*T**3, And(T < 500.0, 250.0 <= T)), (-21723.721 + 77.671737*T - 14.368*T*log(T) - 141375*T**(-1) - 0.00957685*T**2 + 3.93917e-07*T**3, And(T < 852.35, 500.0 <= T)), (-119408.413 + 1026.02962*T - 149.449556*T*log(T) + 12495943*T**(-1) + 0.067272364*T**2 - 6.651929e-06*T**3, And(T < 1500.0, 852.35 <= T)), (-16431.044 + GHSERPP + 17.96235*T, And(T < 3000.0, 1500.0 <= T)), (0, True)), ('P', 'WHITE_P'): Piecewise((GHSERPP, And(T < 3000.0, 250.0 <= T)), (0, True)), ('PA', 'BCC_A2'): Piecewise((781.847 + 71.957409*T - 18.203*T*log(T) - 101600*T**(-1) - 0.01322095*T**2 + 1.337387e-06*T**3, And(T < 1443.0, 298.15 <= T)), (-10955.948 + 220.478519*T - 39.748*T*log(T), And(T < 1845.0, 1443.0 <= T)), (284495.194 - 1397.15052*T + 171.108*T*log(T) - 74992000*T**(-1) - 0.0637105*T**2 + 3.343867e-06*T**3, And(T < 2710.0, 1845.0 <= T)), (2064.512 + GHSERPA - 2.212452*T, And(T < 4000.0, 2710.0 <= T)), (0, True)), ('PA', 'BCT_AA'): Piecewise((GHSERPA, And(T < 4000.0, 298.15 <= T)), (0, True)), ('PA', 'LIQUID'): Piecewise((16181.1 + GHSERPA - 9.544*T, And(T < 1088.0, 298.15 <= T)), (48013.96 - 278.789916*T + 30.336*T*log(T) - 5064250*T**(-1) - 0.0372478*T**2 + 3.075017e-06*T**3, And(T < 1845.0, 1088.0 <= T)), (-12508.174 + 277.955437*T - 47.2792*T*log(T), And(T < 2176.0, 1845.0 <= T)), (17441.509 + GHSERPA - 10.353202*T, And(T < 4000.0, 2176.0 <= T)), (0, True)), ('PB', 'BCC_A2'): Piecewise((2400 + GHSERPB - 1.1*T, And(T < 2100.0, 298.15 <= T)), (0, True)), ('PB', 'BCT_A5'): Piecewise((489 + GHSERPB + 3.52*T, And(T < 2100.0, 298.15 <= T)), (0, True)), ('PB', 'FCC_A1'): Piecewise((GHSERPB, And(T < 2100.0, 298.15 <= T)), (0, True)), ('PB', 'HCP_A3'): Piecewise((300 + GHSERPB + T, And(T < 2100.0, 298.15 <= T)), (0, True)), ('PB', 'LIQUID'): Piecewise((4672.124 + GHSERPB - 7.750683*T - 6.019e-19*T**7, And(T < 600.61, 298.15 <= T)), (4853.137 + GHSERPB - 8.067136*T - 8.05448e+25*T**(-9), And(T < 1200.0, 600.61 <= T)), (4853.137 + GHSERPB - 8.067135*T - 8.05448e+25*T**(-9), And(T < 2100.0, 1200.0 <= T)), (0, True)), ('PB', 'RHOMBOHEDRAL_A7'): Piecewise((4900 + GHSERPB + 3.52*T, And(T < 2100.0, 298.15 <= T)), (0, True)), ('PB', 'TETRAGONAL_A6'): Piecewise((-7176.855 + 105.253344*T - 24.5639065*T*log(T) - 0.003637462*T**2 - 2.4395e-07*T**3, And(T < 600.61, 298.15 <= T)), (-10057.865 + 157.796282*T - 32.5310793*T*log(T) + 8.05448e+25*T**(-9) + 0.001567619*T**2, And(T < 1200.0, 600.61 <= T)), (473.23 + GHSERPB + 3.5531*T - 0.0396834*T*log(T) + 2.1489e-05*T**2, And(T < 2100.0, 1200.0 <= T)), (0, True)), ('PB', 'TET_ALPHA1'): Piecewise((-7466.885 + 102.153384*T - 24.5639065*T*log(T) - 0.003656801*T**2 - 2.4395e-07*T**3, And(T < 600.61, 298.15 <= T)), (-10347.895 + 154.696322*T - 32.5310793*T*log(T) + 8.05448e+25*T**(-9) + 0.001548279*T**2, And(T < 1200.0, 600.61 <= T)), (183.2 + GHSERPB + 0.45314*T - 0.0396834*T*log(T) + 2.148e-06*T**2, And(T < 2100.0, 1200.0 <= T)), (0, True)), ('PD', 'BCC_A2'): Piecewise((10500 + GHSERPD - 1.8*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('PD', 'FCC_A1'): Piecewise((GHSERPD, And(T < 4000.0, 298.15 <= T)), (0, True)), ('PD', 'HCP_A3'): Piecewise((2000 + GHSERPD + 0.1*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('PD', 'LIQUID'): Piecewise((11506.758 + GHSERPD - 5.112162*T, And(T < 600.0, 298.15 <= T)), (23405.778 - 116.918419*T + 10.8922031*T*log(T) - 1853674*T**(-1) - 0.027266568*T**2 + 2.430675e-06*T**3, And(T < 1828.0, 600.0 <= T)), (-12373.637 + 251.416903*T - 41.17*T*log(T), And(T < 4000.0, 1828.0 <= T)), (0, True)), ('PR', 'BCC_A2'): Piecewise((-2863.651 + 28.274853*T - 13.7470527*T*log(T) - 87486*T**(-1) - 0.02284377*T**2 + 3.542468e-06*T**3, And(T < 1068.0, 298.15 <= T)), (-11985.919 + 188.657121*T - 38.451*T*log(T), And(T < 1204.0, 1068.0 <= T)), (953.224 + 100.826281*T - 26.6824313*T*log(T) - 2473024*T**(-1) - 0.004106833*T**2 + 1.76214e-07*T**3, And(T < 3800.0, 1204.0 <= T)), (0, True)), ('PR', 'DHCP'): Piecewise((GHSERPR, And(T < 3800.0, 298.15 <= T)), (0, True)), ('PR', 'LIQUID'): Piecewise((3848.961 - 29.099465*T - 4.7344931*T*log(T) - 207406*T**(-1) - 0.035119723*T**2 + 5.427467e-06*T**3, And(T < 1068.0, 298.15 <= T)), (-10539.574 + 219.508805*T - 42.9697*T*log(T), And(T < 1204.0, 1068.0 <= T)), (9475.104 + GHSERPR - 8.17635*T, And(T < 3800.0, 1204.0 <= T)), (0, True)), ('PT', 'BCC_A2'): Piecewise((15000 + GHSERPT - 2.4*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('PT', 'FCC_A1'): Piecewise((GHSERPT, And(T < 4000.0, 298.15 <= T)), (0, True)), ('PT', 'HCP_A3'): Piecewise((2500 + GHSERPT + 0.1*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('PT', 'LIQUID'): Piecewise((20114.016 + GHSERPT - 9.275183*T, And(T < 600.0, 298.15 <= T)), (19023.491 + 32.94182*T - 12.3403769*T*log(T) - 601426*T**(-1) - 0.011551507*T**2 + 9.31516e-07*T**3, And(T < 2041.5, 600.0 <= T)), (1404.468 + 205.858962*T - 36.5*T*log(T), And(T < 4000.0, 2041.5 <= T)), (0, True)), ('PU', 'ALPHA_PU'): Piecewise((GHSERPU, And(T < 3000.0, 298.15 <= T)), (0, True)), ('PU', 'BCC_A2'): Piecewise((-1358.984 + 116.603882*T - 27.094*T*log(T) + 20863*T**(-1) - 0.009105*T**2 + 2.061667e-06*T**3, And(T < 745.0, 298.15 <= T)), (-2890.817 + 156.878957*T - 33.72*T*log(T), And(T < 956.0, 745.0 <= T)), (29313.619 - 132.788248*T + 6.921*T*log(T) - 4469245*T**(-1) - 0.02023305*T**2 + 1.426922e-06*T**3, And(T < 2071.0, 956.0 <= T)), (-938.429 + GHSERPU - 5.539698*T, And(T < 3000.0, 2071.0 <= T)), (0, True)), ('PU', 'BETA_PU'): Piecewise((-4873.654 + 123.249151*T - 27.416*T*log(T) - 0.00653*T**2, And(T < 679.5, 298.15 <= T)), (2435.094 + 43.566585*T - 15.7351*T*log(T) - 864940*T**(-1) - 0.0154772*T**2 + 1.524942e-06*T**3, And(T < 1464.0, 679.5 <= T)), (503.094 + GHSERPU - 4.739938*T, And(T < 3000.0, 1464.0 <= T)), (0, True)), ('PU', 'FCC_A1'): Piecewise((-3920.781 + 127.586536*T - 28.4781*T*log(T) - 0.0054035*T**2, And(T < 990.0, 298.15 <= T)), (3528.208 + 41.52572*T - 15.7351*T*log(T) - 864940*T**(-1) - 0.0154772*T**2 + 1.524942e-06*T**3, And(T < 1464.0, 990.0 <= T)), (1596.208 + GHSERPU - 6.780803*T, And(T < 3000.0, 1464.0 <= T)), (0, True)), ('PU', 'GAMMA_PU'): Piecewise((-16766.303 + 419.402655*T - 77.5802*T*log(T) + 574825*T**(-1) + 0.0816415*T**2 - 2.8103833e-05*T**3, And(T < 487.9, 298.15 <= T)), (-2942.77 + 88.325069*T - 22.0233*T*log(T) - 0.0114795*T**2, And(T < 593.9, 487.9 <= T)), (-9336.967 + 160.314641*T - 32.3405*T*log(T) + 630600*T**(-1) - 0.0070383*T**2 + 6.92887e-07*T**3, And(T < 1179.0, 593.9 <= T)), (2026.406 + GHSERPU - 6.829936*T, And(T < 3000.0, 1179.0 <= T)), (0, True)), ('PU', 'LIQUID'): Piecewise((6608.1 + GHSERPU - 12.5133*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('PU', 'TETRAGONAL_A6'): Piecewise((-496.178 + 54.586547*T - 16.43*T*log(T) - 158470*T**(-1) - 0.024006*T**2 + 5.166667e-06*T**3, And(T < 736.0, 298.15 <= T)), (-6122.307 + 173.35008*T - 35.56*T*log(T), And(T < 757.0, 736.0 <= T)), (3982.078 + 63.890352*T - 19.756*T*log(T) - 1112565*T**(-1) - 0.00937295*T**2 + 6.59882e-07*T**3, And(T < 2157.0, 757.0 <= T)), (-738.383 + GHSERPU - 4.905143*T, And(T < 3000.0, 2157.0 <= T)), (0, True)), ('RB', 'BCC_A2'): Piecewise((GHSERRB, And(T < 2100.0, 200.0 <= T)), (0, True)), ('RB', 'FCC_A1'): Piecewise((200 + GHSERRB + 1.3*T, And(T < 2100.0, 200.0 <= T)), (0, True)), ('RB', 'HCP_A3'): Piecewise((200 + GHSERRB + 2*T, And(T < 2100.0, 200.0 <= T)), (0, True)), ('RB', 'LIQUID'): Piecewise((2217.552 + GHSERRB - 7.110486*T + 1.44078e-17*T**7, And(T < 312.46, 200.0 <= T)), (2172.865 + GHSERRB - 6.960316*T + 5.55029e+22*T**(-9), And(T < 900.0, 312.46 <= T)), (2172.866 + GHSERRB - 6.960316*T + 5.55029e+22*T**(-9), And(T < 1600.0, 900.0 <= T)), (2172.865 + GHSERRB - 6.960315*T + 5.55029e+22*T**(-9), And(T < 2100.0, 1600.0 <= T)), (0, True)), ('RE', 'BCC_A2'): Piecewise((29200 + GHSERRE - 6*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('RE', 'FCC_A1'): Piecewise((11000 + GHSERRE - 1.5*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('RE', 'HCP_A3'): Piecewise((GHSERRE, And(T < 6000.0, 298.15 <= T)), (0, True)), ('RE', 'LIQUID'): Piecewise((23820.883 + GHSERRE - 6.34538*T, And(T < 1200.0, 298.15 <= T)), (23820.883 + GHSERRE - 6.345379*T, And(T < 2000.0, 1200.0 <= T)), (568842.665 - 2527.83846*T + 314.178898*T*log(T) - 163100987.0*T**(-1) - 0.08939817*T**2 + 3.92854e-06*T**3, And(T < 3458.0, 2000.0 <= T)), (-39044.888 + 335.723691*T - 49.519*T*log(T), And(T < 5000.0, 3458.0 <= T)), (39519.408 + GHSERRE - 11.274151*T, And(T < 6000.0, 5000.0 <= T)), (0, True)), ('RH', 'BCC_A2'): Piecewise((19000 + GHSERRH - 4.7*T, And(T < 2500.0, 298.15 <= T)), (0, True)), ('RH', 'FCC_A1'): Piecewise((GHSERRH, And(T < 2500.0, 298.15 <= T)), (0, True)), ('RH', 'HCP_A3'): Piecewise((3000 + GHSERRH - 0.5*T, And(T < 2500.0, 298.15 <= T)), (0, True)), ('RH', 'LIQUID'): Piecewise((19092.91 + GHSERRH - 6.92133*T, And(T < 700.0, 298.15 <= T)), (35898.508 - 147.926418*T + 15.6492377*T*log(T) - 2638940*T**(-1) - 0.028665357*T**2 + 2.100572e-06*T**3, And(T < 2237.0, 700.0 <= T)), (-18208.54 + 332.974832*T - 50.58456*T*log(T), And(T < 2450.0, 2237.0 <= T)), (26654.949 + GHSERRH - 11.915063*T, And(T < 2500.0, 2450.0 <= T)), (0, True)), ('RU', 'BCC_A2'): Piecewise((26500 + GHSERRU - 6.2*T, And(T < 4500.0, 298.15 <= T)), (0, True)), ('RU', 'FCC_A1'): Piecewise((12500 + GHSERRU - 2.4*T, And(T < 4500.0, 298.15 <= T)), (0, True)), ('RU', 'HCP_A3'): Piecewise((GHSERRU, And(T < 4500.0, 298.15 <= T)), (0, True)), ('RU', 'LIQUID'): Piecewise((27480.616 + GHSERRU - 8.398748*T, And(T < 800.0, 298.15 <= T)), (50827.232 - 179.818561*T + 19.539341*T*log(T) - 3861125*T**(-1) - 0.026524167*T**2 + 1.667839e-06*T**3, And(T < 2607.0, 800.0 <= T)), (-17161.807 + 349.673561*T - 51.8816*T*log(T), And(T < 2740.0, 2607.0 <= T)), (38606.497 + GHSERRU - 14.808753*T, And(T < 4500.0, 2740.0 <= T)), (0, True)), ('S', 'BCC_A2'): Piecewise((105000 + GHSERSS, And(T < 1300.0, 298.15 <= T)), (0, True)), ('S', 'FCC_A1'): Piecewise((105000 + GHSERSS, And(T < 1300.0, 298.15 <= T)), (0, True)), ('S', 'LIQUID'): Piecewise((-4001.549 + 77.905686*T - 15.504*T*log(T) - 113945*T**(-1) - 0.018629*T**2 - 2.4942e-07*T**3, And(T < 388.36, 298.15 <= T)), (-5285183.35 + 118449.601*T - 19762.4*T*log(T) + 264673500.0*T**(-1) + 32.79275*T**2 - 0.0102214167*T**3, And(T < 428.15, 388.36 <= T)), (-8174995.23 + 319914.094*T - 57607.3*T*log(T) + 135.3045*T**2 - 0.0529973333*T**3, And(T < 432.25, 428.15 <= T)), (-219408.801 + 7758.85593*T - 1371.85*T*log(T) + 2.845035*T**2 - 0.00101380333*T**3, And(T < 453.15, 432.25 <= T)), (92539.872 - 1336.35027*T + 202.958*T*log(T) - 8202200*T**(-1) - 0.2531915*T**2 + 5.18835e-05*T**3, And(T < 717.0, 453.15 <= T)), (-6889.972 + 176.37082*T - 32*T*log(T), And(T < 1300.0, 717.0 <= T)), (0, True)), ('S', 'MONOCLINIC'): Piecewise((-5701.485 + 89.000772*T - 17.318*T*log(T) - 0.0101215*T**2, And(T < 388.36, 298.15 <= T)), (-7435.888 + 114.512564*T - 21.1094347*T*log(T) + 120740*T**(-1) - 0.008604142*T**2 + 1.118079e-06*T**3, And(T < 1300.0, 388.36 <= T)), (0, True)), ('S', 'ORTHORHOMBIC_S'): Piecewise((GHSERSS, And(T < 1300.0, 298.15 <= T)), (0, True)), ('SB', 'BCC_A2'): Piecewise((19874 + GHSERSB - 15.1*T, And(T < 2000.0, 298.15 <= T)), (0, True)), ('SB', 'BCT_A5'): Piecewise((13000 + GHSERSB - 8*T, And(T < 2000.0, 298.15 <= T)), (0, True)), ('SB', 'FCC_A1'): Piecewise((19874 + GHSERSB - 13.7*T, And(T < 2000.0, 298.15 <= T)), (0, True)), ('SB', 'HCP_A3'): Piecewise((19874 + GHSERSB - 13*T, And(T < 2000.0, 298.15 <= T)), (0, True)), ('SB', 'LIQUID'): Piecewise((19822.328 + GHSERSB - 21.923164*T - 1.74847e-20*T**7, And(T < 903.78, 298.15 <= T)), (8175.359 + 147.455986*T - 31.38*T*log(T), And(T < 2000.0, 903.78 <= T)), (0, True)), ('SB', 'RHOMBOHEDRAL_A7'): Piecewise((GHSERSB, And(T < 2000.0, 298.15 <= T)), (0, True)), ('SC', 'BCC_A2'): Piecewise((1979.728 + GHSERSC - 1.024135*T, And(T < 1000.0, 298.15 <= T)), (230161.408 - 2004.05469*T + 276.76664*T*log(T) - 33783257*T**(-1) - 0.167120107*T**2 + 1.5637371e-05*T**3, And(T < 1608.0, 1000.0 <= T)), (-25928.011 + 283.642312*T - 44.2249*T*log(T), And(T < 2000.0, 1608.0 <= T)), (4587.235 + GHSERSC - 2.832026*T, And(T < 3200.0, 2000.0 <= T)), (0, True)), ('SC', 'HCP_A3'): Piecewise((GHSERSC, And(T < 3200.0, 298.15 <= T)), (0, True)), ('SC', 'LIQUID'): Piecewise((6478.66 + 45.427539*T - 10.7967803*T*log(T) - 158106*T**(-1) - 0.020636524*T**2 + 2.13106e-06*T**3, And(T < 1608.0, 298.15 <= T)), (-11832.111 + 275.871695*T - 44.2249*T*log(T), And(T < 2000.0, 1608.0 <= T)), (18683.135 + GHSERSC - 10.602643*T, And(T < 3200.0, 2000.0 <= T)), (0, True)), ('SE', 'HEXAGONAL_A8'): Piecewise((GHSERSE, And(T < 1000.0, 298.15 <= T)), (0, True)), ('SE', 'LIQUID'): Piecewise((50533.347 - 1178.28824*T + 194.107439*T*log(T) - 2224398*T**(-1) - 0.390268991*T**2 + 0.000119219297*T**3, And(T < 494.0, 298.15 <= T)), (-5228.304 + 183.72559*T - 35.1456*T*log(T), And(T < 800.0, 494.0 <= T)), (6965.166 + GHSERSE - 14.044576*T, And(T < 1000.0, 800.0 <= T)), (0, True)), ('SI', 'BCC_A2'): Piecewise((47000 + GHSERSI - 22.5*T, And(T < 3600.0, 298.15 <= T)), (0, True)), ('SI', 'CBCC_A12'): Piecewise((50208 + GHSERSI - 20.377*T, And(T < 3600.0, 298.15 <= T)), (0, True)), ('SI', 'CUB_A13'): Piecewise((47279 + GHSERSI - 20.377*T, And(T < 3600.0, 298.15 <= T)), (0, True)), ('SI', 'DIAMOND_A4'): Piecewise((GHSERSI, And(T < 3600.0, 298.15 <= T)), (0, True)), ('SI', 'FCC_A1'): Piecewise((51000 + GHSERSI - 21.8*T, And(T < 3600.0, 298.15 <= T)), (0, True)), ('SI', 'HCP_A3'): Piecewise((49200 + GHSERSI - 20.8*T, And(T < 3600.0, 298.15 <= T)), (0, True)), ('SI', 'LIQUID'): Piecewise((50696.36 + GHSERSI - 30.099439*T + 2.09307e-21*T**7, And(T < 1687.0, 298.15 <= T)), (40370.523 + 137.722298*T - 27.196*T*log(T), And(T < 3600.0, 1687.0 <= T)), (0, True)), ('SM', 'BCC_A2'): Piecewise((-4368.72 + 55.972523*T - 16.9298494*T*log(T) + 94209*T**(-1) - 0.025446016*T**2 + 3.579527e-06*T**3, And(T < 1190.0, 298.15 <= T)), (-15957.862 + 253.121044*T - 46.9445*T*log(T), And(T < 1345.0, 1190.0 <= T)), (111191.653 - 624.680805*T + 71.6856914*T*log(T) - 24870276*T**(-1) - 0.047314968*T**2 + 3.329865e-06*T**3, And(T < 2100.0, 1345.0 <= T)), (0, True)), ('SM', 'LIQUID'): Piecewise((3468.783 + 20.117456*T - 11.6968284*T*log(T) + 23528*T**(-1) - 0.032418177*T**2 + 4.544272e-06*T**3, And(T < 1190.0, 298.15 <= T)), (-11728.229 + 273.487076*T - 50.208*T*log(T), And(T < 1345.0, 1190.0 <= T)), (11327.85 + GHSERSM - 8.707299*T, And(T < 2100.0, 1345.0 <= T)), (0, True)), ('SM', 'RHOMB'): Piecewise((GHSERSM, And(T < 2100.0, 298.15 <= T)), (0, True)), ('SN', 'BCC_A2'): Piecewise((4400 + GHSERSN - 6*T, And(T < 3000.0, 100.0 <= T)), (0, True)), ('SN', 'BCT_A5'): Piecewise((GHSERSN, And(T < 3000.0, 100.0 <= T)), (0, True)), ('SN', 'DIAMOND_A4'): Piecewise((-9579.608 + 114.007785*T - 22.972*T*log(T) + 25615*T**(-1) - 0.00813975*T**2 + 2.7288e-06*T**3, And(T < 298.15, 100.0 <= T)), (-9063.001 + 104.84654*T - 21.5750771*T*log(T) - 2544*T**(-1) - 0.008575282*T**2 + 1.784447e-06*T**3, And(T < 800.0, 298.15 <= T)), (-10909.351 + 147.396535*T - 28.4512*T*log(T), And(T < 3000.0, 800.0 <= T)), (0, True)), ('SN', 'FCC_A1'): Piecewise((-345.135 + 56.983315*T - 15.961*T*log(T) - 61960*T**(-1) - 0.0188702*T**2 + 3.121167e-06*T**3, And(T < 250.0, 100.0 <= T)), (5510 + GHSERSN - 8.46*T, And(T < 3000.0, 250.0 <= T)), (0, True)), ('SN', 'HCP_A3'): Piecewise((3900 + GHSERSN - 4.4*T, And(T < 3000.0, 100.0 <= T)), (0, True)), ('SN', 'LIQUID'): Piecewise((7103.092 + GHSERSN - 14.087767*T + 1.47031e-18*T**7, And(T < 505.08, 100.0 <= T)), (6971.586 + GHSERSN - 13.814383*T + 1.2307e+25*T**(-9), And(T < 800.0, 505.08 <= T)), (-1285.372 + 125.182498*T - 28.4512*T*log(T), And(T < 3000.0, 800.0 <= T)), (0, True)), ('SN', 'RHOMBOHEDRAL_A7'): Piecewise((2035 + GHSERSN, And(T < 3000.0, 100.0 <= T)), (0, True)), ('SR', 'BCC_A2'): Piecewise((-6779.234 + 116.583654*T - 25.6708365*T*log(T) + 27649*T**(-1) - 0.003126762*T**2 + 2.2965e-07*T**3, And(T < 820.0, 298.15 <= T)), (-6970.594 + 122.067301*T - 26.57*T*log(T) + 16495*T**(-1) - 0.0019493*T**2 - 1.7895e-08*T**3, And(T < 1050.0, 820.0 <= T)), (8168.357 + 0.423037*T - 9.7788593*T*log(T) - 2414794*T**(-1) - 0.009539908*T**2 + 5.20221e-07*T**3, And(T < 3000.0, 1050.0 <= T)), (0, True)), ('SR', 'FCC_A1'): Piecewise((GHSERSR, And(T < 3000.0, 298.15 <= T)), (0, True)), ('SR', 'HCP_A3'): Piecewise((250 + GHSERSR + 0.7*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('SR', 'LIQUID'): Piecewise((2194.997 - 10.118994*T - 5.0668978*T*log(T) - 265559*T**(-1) - 0.031840595*T**2 + 4.981237e-06*T**3, And(T < 1050.0, 298.15 <= T)), (-10855.29 + 213.406219*T - 39.463*T*log(T), And(T < 3000.0, 1050.0 <= T)), (0, True)), ('TA', 'BCC_A2'): Piecewise((GHSERTA, And(T < 6000.0, 298.15 <= T)), (0, True)), ('TA', 'FCC_A1'): Piecewise((16000 + GHSERTA + 1.7*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('TA', 'HCP_A3'): Piecewise((12000 + GHSERTA + 2.4*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('TA', 'LIQUID'): Piecewise((29160.975 + GHSERTA - 7.578729*T, And(T < 1000.0, 298.15 <= T)), (43884.339 - 61.981795*T + 0.0279523*T*log(T) - 3523338*T**(-1) - 0.012330066*T**2 + 6.14599e-07*T**3, And(T < 3290.0, 1000.0 <= T)), (-6314.543 + 258.110873*T - 41.84*T*log(T), And(T < 6000.0, 3290.0 <= T)), (0, True)), ('TB', 'BCC_A2'): Piecewise((4167.835 + GHSERTB - 2.652707*T, And(T < 1200.0, 298.15 <= T)), (633060.245 - 5157.77779*T + 706.580596*T*log(T) - 103233571.0*T**(-1) - 0.373763517*T**2 + 3.4100235e-05*T**3, And(T < 1562.0, 1200.0 <= T)), (-23398.029 + 257.388486*T - 46.4842*T*log(T), And(T < 3000.0, 1562.0 <= T)), (0, True)), ('TB', 'HCP_A3'): Piecewise((GHSERTB, And(T < 3000.0, 298.15 <= T)), (0, True)), ('TB', 'LIQUID'): Piecewise((3945.831 + 29.867521*T - 14.252646*T*log(T) - 160724*T**(-1) - 0.020466105*T**2 + 2.17475e-06*T**3, And(T < 1562.0, 298.15 <= T)), (-13247.649 + 251.16889*T - 46.4842*T*log(T), And(T < 3000.0, 1562.0 <= T)), (0, True)), ('TC', 'BCC_A2'): Piecewise((18000 + GHSERTC - 4.5*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('TC', 'FCC_A1'): Piecewise((10000 + GHSERTC - 1.5*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('TC', 'HCP_A3'): Piecewise((GHSERTC, And(T < 4000.0, 298.15 <= T)), (0, True)), ('TC', 'LIQUID'): Piecewise((30402.134 + GHSERTC - 12.313*T - 9.62385e-22*T**7, And(T < 2430.0, 298.15 <= T)), (-12221.9 + 303.7538*T - 47*T*log(T), And(T < 4000.0, 2430.0 <= T)), (0, True)), ('TE', 'HEXAGONAL_A8'): Piecewise((GHSERTE, And(T < 1600.0, 298.15 <= T)), (0, True)), ('TE', 'LIQUID'): Piecewise((-17554.731 + 685.877639*T - 126.318*T*log(T) + 827930*T**(-1) + 0.2219435*T**2 - 9.42075e-05*T**3, And(T < 626.49, 298.15 <= T)), (-3165763.48 + 46756.357*T - 7196.41*T*log(T) + 258051000.0*T**(-1) + 7.09775*T**2 - 0.00130692833*T**3, And(T < 722.66, 626.49 <= T)), (180326.959 - 1500.57909*T + 202.743*T*log(T) - 24238450*T**(-1) - 0.142016*T**2 + 1.6129733e-05*T**3, And(T < 1150.0, 722.66 <= T)), (19110.036 + GHSERTE - 26.1929273*T, And(T < 1600.0, 1150.0 <= T)), (0, True)), ('TH', 'BCC_A2'): Piecewise((-2321.06 + 134.279995*T - 28.244*T*log(T) + 91190*T**(-1) + 0.00043775*T**2 - 5.3048e-07*T**3, And(T < 1633.0, 298.15 <= T)), (-115978.348 + 801.657849*T - 116.453*T*log(T) + 27512600*T**(-1) + 0.03098*T**2 - 2.536883e-06*T**3, And(T < 2023.0, 1633.0 <= T)), (-33602.796 + 209.523509*T - 35.813*T*log(T) + 11876950*T**(-1) - 0.00346655*T**2 + 1.66067e-07*T**3, And(T < 3600.0, 2023.0 <= T)), (-980.302 + GHSERTH - 0.049551*T, And(T < 4000.0, 3600.0 <= T)), (0, True)), ('TH', 'FCC_A1'): Piecewise((GHSERTH, And(T < 4000.0, 298.15 <= T)), (0, True)), ('TH', 'LIQUID'): Piecewise((5031.109 + 111.635146*T - 24.987*T*log(T) + 10865*T**(-1) - 0.00168345*T**2 - 9.09067e-07*T**3, And(T < 1499.8, 298.15 <= T)), (-15602.847 + 128.406516*T - 24.03*T*log(T) + 7111100*T**(-1) - 0.0136421*T**2 + 1.210117e-06*T**3, And(T < 2014.5, 1499.8 <= T)), (-17273.382 + 275.750074*T - 46.024*T*log(T), And(T < 2900.0, 2014.5 <= T)), (16079.931 + GHSERTH - 8.229771*T, And(T < 4000.0, 2900.0 <= T)), (0, True)), ('TI', 'BCC_A2'): Piecewise((-1272.064 + 134.71418*T - 25.5768*T*log(T) + 7208*T**(-1) - 0.000663845*T**2 - 2.78803e-07*T**3, And(T < 1155.0, 298.15 <= T)), (6667.385 + 105.366379*T - 22.3771*T*log(T) - 2002750*T**(-1) + 0.00121707*T**2 - 8.4534e-07*T**3, And(T < 1941.0, 1155.0 <= T)), (26483.26 - 182.426471*T + 19.0900905*T*log(T) + 1400501*T**(-1) - 0.02200832*T**2 + 1.228863e-06*T**3, And(T < 4000.0, 1941.0 <= T)), (0, True)), ('TI', 'BCT_A5'): Piecewise((4602.2 + GHSERTI, And(T < 3000.0, 298.15 <= T)), (0, True)), ('TI', 'CBCC_A12'): Piecewise((4602.2 + GHSERTI, And(T < 4000.0, 298.15 <= T)), (0, True)), ('TI', 'CUB_A13'): Piecewise((7531.2 + GHSERTI, And(T < 4000.0, 298.15 <= T)), (0, True)), ('TI', 'DIAMOND_A4'): Piecewise((25000 + GHSERTI, And(T < 4000.0, 298.15 <= T)), (0, True)), ('TI', 'FCC_A1'): Piecewise((6000 + GHSERTI - 0.1*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('TI', 'HCP_A3'): Piecewise((GHSERTI, And(T < 4000.0, 298.15 <= T)), (0, True)), ('TI', 'LIQUID'): Piecewise((12194.415 + GHSERTI - 6.980938*T, And(T < 900.0, 298.15 <= T)), (12194.416 + GHSERTI - 6.980938*T, And(T < 1300.0, 900.0 <= T)), (369519.198 - 2554.0225*T + 342.059267*T*log(T) - 67034516*T**(-1) - 0.163409355*T**2 + 1.2457117e-05*T**3, And(T < 1941.0, 1300.0 <= T)), (-19887.066 + 298.7367*T - 46.29*T*log(T), And(T < 4000.0, 1941.0 <= T)), (0, True)), ('TL', 'BCC_A2'): Piecewise((-9194.493 + 150.019517*T - 33.0508*T*log(T) + 82153*T**(-1) + 0.0172318*T**2 - 1.0115933e-05*T**3, And(T < 577.0, 200.0 <= T)), (-41836.403 + 482.633817*T - 79.2926704*T*log(T) + 3507810*T**(-1) + 0.026042993*T**2 - 2.359101e-06*T**3, And(T < 1800.0, 577.0 <= T)), (0, True)), ('TL', 'FCC_A1'): Piecewise((310 + GHSERTL, And(T < 1800.0, 200.0 <= T)), (0, True)), ('TL', 'HCP_A3'): Piecewise((GHSERTL, And(T < 1800.0, 200.0 <= T)), (0, True)), ('TL', 'LIQUID'): Piecewise((-946.623 + 0.755649*T - 7.44455*T*log(T) - 54228*T**(-1) - 0.044350292*T**2 + 1.4248046e-05*T**3, And(T < 577.0, 200.0 <= T)), (-614.74 + 98.472609*T - 25.8437*T*log(T) - 612570*T**(-1) - 0.00083662*T**2 + 9e-12*T**3, And(T < 1800.0, 577.0 <= T)), (0, True)), ('TM', 'HCP_A3'): Piecewise((GHSERTM, And(T < 2300.0, 298.15 <= T)), (0, True)), ('TM', 'LIQUID'): Piecewise((13199.249 + GHSERTM - 6.557671*T, And(T < 600.0, 298.15 <= T)), (22640.028 - 126.738485*T + 6.8744933*T*log(T) - 1585412*T**(-1) - 0.025487085*T**2 + 2.288172e-06*T**3, And(T < 1818.0, 600.0 <= T)), (-10090.305 + 214.184413*T - 41.37976*T*log(T), And(T < 2300.0, 1818.0 <= T)), (0, True)), ('U', 'BCC_A2'): Piecewise((-752.767 + 131.5381*T - 27.5152*T*log(T) + 204611*T**(-1) - 0.00835595*T**2 + 9.67907e-07*T**3, And(T < 1049.0, 298.15 <= T)), (-4698.365 + 202.685635*T - 38.2836*T*log(T), And(T < 3000.0, 1049.0 <= T)), (0, True)), ('U', 'LIQUID'): Piecewise((12355.5 + GHSERUU - 10.3239*T, And(T < 3000.0, 298.15 <= T)), (0, True)), ('U', 'ORTHORHOMBIC_A20'): Piecewise((GHSERUU, And(T < 3000.0, 298.15 <= T)), (0, True)), ('U', 'TETRAGONAL_U'): Piecewise((-5156.136 + 106.976316*T - 22.841*T*log(T) + 81944*T**(-1) - 0.01084475*T**2 + 2.7889e-08*T**3, And(T < 941.5, 298.15 <= T)), (-14327.309 + 244.16802*T - 42.9278*T*log(T), And(T < 3000.0, 941.5 <= T)), (0, True)), ('V', 'BCC_A2'): Piecewise((GHSERVV, And(T < 4000.0, 298.15 <= T)), (0, True)), ('V', 'CBCC_A12'): Piecewise((9000 + GHSERVV, And(T < 4000.0, 298.15 <= T)), (0, True)), ('V', 'CUB_A13'): Piecewise((10000 + GHSERVV, And(T < 4000.0, 298.15 <= T)), (0, True)), ('V', 'FCC_A1'): Piecewise((7500 + GHSERVV + 1.7*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('V', 'HCP_A3'): Piecewise((4000 + GHSERVV + 2.4*T, And(T < 4000.0, 298.15 <= T)), (0, True)), ('V', 'LIQUID'): Piecewise((20764.117 + GHSERVV - 9.455552*T - 5.19136e-22*T**7, And(T < 2183.0, 298.15 <= T)), (-19617.51 + 311.055983*T - 47.43*T*log(T), And(T < 4000.0, 2183.0 <= T)), (0, True)), ('W', 'BCC_A2'): Piecewise((GHSERWW, And(T < 6000.0, 298.15 <= T)), (0, True)), ('W', 'FCC_A1'): Piecewise((19300 + GHSERWW + 0.63*T, And(T < 6000.0, 298.15 <= T)), (0, True)), ('W', 'HCP_A3'): Piecewise((14750 + GHSERWW, And(T < 6000.0, 298.15 <= T)), (0, True)), ('W', 'LIQUID'): Piecewise((52160.584 + GHSERWW - 14.10999*T - 2.713468e-24*T**7, And(T < 3695.0, 298.15 <= T)), (-30436.051 + 375.175*T - 54*T*log(T), And(T < 6000.0, 3695.0 <= T)), (0, True)), ('Y', 'BCC_A2'): Piecewise((-833.658863 + 123.667346*T - 25.5832578*T*log(T) + 27340.0687*T**(-1) - 0.00237175965*T**2 + 9.10372497e-09*T**3, And(T < 1000.0, 100.0 <= T)), (-1297.79829 + 134.528352*T - 27.3038477*T*log(T) - 0.000541757644*T**2 - 3.05012175e-07*T**3, And(T < 1795.15, 1000.0 <= T)), (15389.4975 + 0.981325399*T - 8.88296647*T*log(T) - 2542575.96*T**(-1) - 0.00904576576*T**2 + 4.02944768e-07*T**3, And(T < 3700.0, 1795.15 <= T)), (0, True)), ('Y', 'HCP_A3'): Piecewise((GHSERYY, And(T < 3700.0, 100.0 <= T)), (0, True)), ('Y', 'LIQUID'): Piecewise((2098.50738 + 119.41873*T - 24.6467508*T*log(T) + 23713.7332*T**(-1) - 0.00347023463*T**2 - 8.12981167e-07*T**3, And(T < 1000.0, 100.0 <= T)), (7386.44846 + 19.4520171*T - 9.0681627*T*log(T) - 0.0189533369*T**2 + 1.7595327e-06*T**3, And(T < 1795.15, 1000.0 <= T)), (-12976.5957 + 257.400783*T - 43.0952*T*log(T), And(T < 3700.0, 1795.15 <= T)), (0, True)), ('YB', 'BCC_A2'): Piecewise((-965.99 - 21.293677*T - 3.8534432*T*log(T) - 334650*T**(-1) - 0.030009694*T**2 + 4.743871e-06*T**3, And(T < 1033.0, 298.15 <= T)), (-13368.113 + 188.313864*T - 36.1079*T*log(T), And(T < 1097.0, 1033.0 <= T)), (-3911.847 + 113.174165*T - 25.7402233*T*log(T) - 1553668*T**(-1) - 0.004743348*T**2 + 3.63044e-07*T**3, And(T < 2000.0, 1097.0 <= T)), (0, True)), ('YB', 'FCC_A1'): Piecewise((GHSERYB, And(T < 2000.0, 298.15 <= T)), (0, True)), ('YB', 'LIQUID'): Piecewise((7030.788 - 40.615571*T - 1.8061816*T*log(T) - 370554*T**(-1) - 0.03250938*T**2 + 5.136665e-06*T**3, And(T < 1033.0, 298.15 <= T)), (-6445.835 + 186.690398*T - 36.7774*T*log(T), And(T < 2000.0, 1033.0 <= T)), (0, True)), ('ZN', 'BCC_A2'): Piecewise((2886.96 + GHSERZN - 2.5104*T, And(T < 1700.0, 298.15 <= T)), (0, True)), ('ZN', 'BCT_A5'): Piecewise((2886.96 + GHSERZN - 2.5104*T, And(T < 1700.0, 298.15 <= T)), (0, True)), ('ZN', 'DIAMOND_A4'): Piecewise((GHSERZN + 30*T, And(T < 1700.0, 298.15 <= T)), (0, True)), ('ZN', 'FCC_A1'): Piecewise((2969.82 + GHSERZN - 1.56968*T, And(T < 1700.0, 298.15 <= T)), (0, True)), ('ZN', 'HCP_A3'): Piecewise((GHSERZN, And(T < 1700.0, 298.15 <= T)), (0, True)), ('ZN', 'LIQUID'): Piecewise((7157.213 + GHSERZN - 10.29299*T - 3.58958e-19*T**7, And(T < 692.68, 298.15 <= T)), (-3620.391 + 161.608594*T - 31.38*T*log(T), And(T < 1700.0, 692.68 <= T)), (0, True)), ('ZR', 'BCC_A2'): Piecewise((-525.539 + 124.9457*T - 25.607406*T*log(T) + 25233*T**(-1) - 0.000340084*T**2 - 9.729e-09*T**3 - 7.6143e-11*T**4, And(T < 2128.0, 130.0 <= T)), (-4620.034 + GHSERZR + 1.55998*T + 1.4103476e+32*T**(-9), And(T < 6000.0, 2128.0 <= T)), (0, True)), ('ZR', 'FCC_A1'): Piecewise((7600 + GHSERZR - 0.9*T, And(T < 6000.0, 130.0 <= T)), (0, True)), ('ZR', 'HCP_A3'): Piecewise((GHSERZR, And(T < 6000.0, 130.0 <= T)), (0, True)), ('ZR', 'LIQUID'): Piecewise((18147.69 + GHSERZR - 9.080812*T + 1.6275e-22*T**7, And(T < 2128.0, 130.0 <= T)), (-8281.26 + 253.812609*T - 42.144*T*log(T), And(T < 6000.0, 2128.0 <= T)), (0, True)), ('ZR', 'OMEGA'): Piecewise((-8878.082 + 144.432234*T - 26.8556*T*log(T) + 38376*T**(-1) - 0.002799446*T**2, And(T < 2128.0, 130.0 <= T)), (-3414.603 + GHSERZR + 2.566675*T + 8.517346e+31*T**(-9), And(T < 6000.0, 2128.0 <= T)), (0, True))}, 'SGTE91SER': {'/-': {'H298': 0.0, 'S298': 0.0, 'mass': 0.0, 'phase': 'ELECTRON_GAS'}, 'AG': {'H298': 5744.6, 'S298': 42.551, 'mass': 107.87, 'phase': 'FCC_A1'}, 'AL': {'H298': 4577.3, 'S298': 28.322, 'mass': 26.982, 'phase': 'FCC_A1'}, 'AM': {'H298': 0.0, 'S298': 0.0, 'mass': 243.06, 'phase': 'DHCP'}, 'AS': {'H298': 0.0, 'S298': 0.0, 'mass': 74.922, 'phase': 'RHOMBOHEDRAL_A7'}, 'AU': {'H298': 6016.6, 'S298': 47.488, 'mass': 196.97, 'phase': 'FCC_A1'}, 'B': {'H298': 1222.0, 'S298': 5.9, 'mass': 10.811, 'phase': 'BETA_RHOMBO_B'}, 'BA': {'H298': 0.0, 'S298': 0.0, 'mass': 137.33, 'phase': 'BCC_A2'}, 'BE': {'H298': 0.0, 'S298': 0.0, 'mass': 9.0122, 'phase': 'HCP_A3'}, 'BI': {'H298': 6426.6, 'S298': 56.735, 'mass': 208.98, 'phase': 'RHOMBOHEDRAL_A7'}, 'C': {'H298': 1054.0, 'S298': 5.74, 'mass': 12.011, 'phase': 'GRAPHITE'}, 'CA': {'H298': 6196.5, 'S298': 41.589, 'mass': 40.078, 'phase': 'FCC_A1'}, 'CD': {'H298': 6250.9, 'S298': 51.798, 'mass': 112.41, 'phase': 'HCP_A3'}, 'CE': {'H298': 0.0, 'S298': 0.0, 'mass': 140.11, 'phase': 'FCC_A1'}, 'CO': {'H298': 0.0, 'S298': 0.0, 'mass': 58.933, 'phase': 'HCP_A3'}, 'CR': {'H298': 4050.0, 'S298': 23.56, 'mass': 51.996, 'phase': 'BCC_A2'}, 'CS': {'H298': 7715.3, 'S298': 85.149, 'mass': 132.91, 'phase': 'BCC_A2'}, 'CU': {'H298': 5004.1, 'S298': 33.15, 'mass': 63.546, 'phase': 'FCC_A1'}, 'DY': {'H298': 0.0, 'S298': 0.0, 'mass': 162.5, 'phase': 'HCP_A3'}, 'ER': {'H298': 7392.3, 'S298': 73.178, 'mass': 167.26, 'phase': 'HCP_A3'}, 'EU': {'H298': 0.0, 'S298': 80.793, 'mass': 151.97, 'phase': 'BCC_A2'}, 'FE': {'H298': 4489.0, 'S298': 27.28, 'mass': 55.847, 'phase': 'BCC_A2'}, 'GA': {'H298': 5573.1, 'S298': 40.828, 'mass': 69.723, 'phase': 'ORTHORHOMBIC_GA'}, 'GD': {'H298': 0.0, 'S298': 0.0, 'mass': 157.25, 'phase': 'HCP_A3'}, 'GE': {'H298': 4627.5, 'S298': 31.087, 'mass': 72.61, 'phase': 'DIAMOND_A4'}, 'HF': {'H298': 0.0, 'S298': 0.0, 'mass': 178.49, 'phase': 'HCP_A3'}, 'HG': {'H298': 0.0, 'S298': 0.0, 'mass': 200.59, 'phase': 'LIQUID'}, 'HO': {'H298': 0.0, 'S298': 0.0, 'mass': 164.93, 'phase': 'HCP_A3'}, 'IN': {'H298': 6610.0, 'S298': 57.65, 'mass': 114.82, 'phase': 'TETRAGONAL_A6'}, 'IR': {'H298': 5267.7, 'S298': 35.505, 'mass': 192.22, 'phase': 'FCC_A1'}, 'K': {'H298': 7083.5, 'S298': 64.672, 'mass': 39.098, 'phase': 'BCC_A2'}, 'LA': {'H298': 0.0, 'S298': 0.0, 'mass': 138.91, 'phase': 'DHCP'}, 'LI': {'H298': 4623.3, 'S298': 29.095, 'mass': 6.941, 'phase': 'BCC_A2'}, 'LU': {'H298': 0.0, 'S298': 0.0, 'mass': 174.97, 'phase': 'HCP_A3'}, 'MG': {'H298': 4998.0, 'S298': 32.671, 'mass': 24.305, 'phase': 'HCP_A3'}, 'MN': {'H298': 4996.0, 'S298': 32.008, 'mass': 54.938, 'phase': 'CBCC_A12'}, 'MO': {'H298': 4589.0, 'S298': 28.56, 'mass': 95.94, 'phase': 'BCC_A2'}, 'N': {'H298': 4335.0, 'S298': 95.751, 'mass': 14.007, 'phase': '1/2_MOLE_N2(G)'}, 'NA': {'H298': 6447.5, 'S298': 51.447, 'mass': 22.99, 'phase': 'BCC_A2'}, 'NB': {'H298': 5220.0, 'S298': 36.27, 'mass': 92.906, 'phase': 'BCC_A2'}, 'ND': {'H298': 0.0, 'S298': 0.0, 'mass': 144.24, 'phase': 'DHCP'}, 'NI': {'H298': 4787.0, 'S298': 29.796, 'mass': 58.69, 'phase': 'FCC_A1'}, 'NP': {'H298': 0.0, 'S298': 0.0, 'mass': 237.05, 'phase': 'ORTHORHOMBIC_AC'}, 'O': {'H298': 4341.0, 'S298': 102.52, 'mass': 15.999, 'phase': '1/2_MOLE_O2(G)'}, 'OS': {'H298': 0.0, 'S298': 32.635, 'mass': 190.2, 'phase': 'HCP_A3'}, 'P': {'H298': 0.0, 'S298': 0.0, 'mass': 30.974, 'phase': 'WHITE_P'}, 'PA': {'H298': 0.0, 'S298': 0.0, 'mass': 231.04, 'phase': 'BCT_AA'}, 'PB': {'H298': 6878.5, 'S298': 64.785, 'mass': 207.2, 'phase': 'FCC_A1'}, 'PD': {'H298': 5468.5, 'S298': 37.823, 'mass': 106.42, 'phase': 'FCC_A1'}, 'PR': {'H298': 0.0, 'S298': 0.0, 'mass': 140.91, 'phase': 'DHCP'}, 'PT': {'H298': 5723.7, 'S298': 41.631, 'mass': 195.08, 'phase': 'FCC_A1'}, 'PU': {'H298': 0.0, 'S298': 0.0, 'mass': 244.06, 'phase': 'ALPHA_PU'}, 'RB': {'H298': 7489.4, 'S298': 76.776, 'mass': 85.468, 'phase': 'BCC_A2'}, 'RE': {'H298': 5355.5, 'S298': 36.526, 'mass': 186.21, 'phase': 'HCP_A3'}, 'RH': {'H298': 4920.4, 'S298': 31.505, 'mass': 102.91, 'phase': 'FCC_A1'}, 'RU': {'H298': 4602.4, 'S298': 28.535, 'mass': 101.07, 'phase': 'HCP_A3'}, 'S': {'H298': 0.0, 'S298': 0.0, 'mass': 32.066, 'phase': 'ORTHORHOMBIC_S'}, 'SB': {'H298': 5870.2, 'S298': 45.522, 'mass': 121.75, 'phase': 'RHOMBOHEDRAL_A7'}, 'SC': {'H298': 0.0, 'S298': 0.0, 'mass': 44.956, 'phase': 'HCP_A3'}, 'SE': {'H298': 5514.5, 'S298': 41.966, 'mass': 78.96, 'phase': 'HEXAGONAL_A8'}, 'SI': {'H298': 3217.5, 'S298': 18.82, 'mass': 28.085, 'phase': 'DIAMOND_A4'}, 'SM': {'H298': 0.0, 'S298': 0.0, 'mass': 150.36, 'phase': 'RHOMBOHEDRAL_SM'}, 'SN': {'H298': 6322.0, 'S298': 51.195, 'mass': 118.71, 'phase': 'BCT_A5'}, 'SR': {'H298': 0.0, 'S298': 0.0, 'mass': 87.62, 'phase': 'FCC_A1'}, 'TA': {'H298': 5681.9, 'S298': 41.472, 'mass': 180.95, 'phase': 'BCC_A2'}, 'TB': {'H298': 0.0, 'S298': 0.0, 'mass': 158.93, 'phase': 'HCP_A3'}, 'TC': {'H298': 0.0, 'S298': 0.0, 'mass': 97.907, 'phase': 'HCP_A3'}, 'TE': {'H298': 6121.2, 'S298': 49.497, 'mass': 127.6, 'phase': 'HEXAGONAL_A8'}, 'TH': {'H298': 0.0, 'S298': 0.0, 'mass': 232.04, 'phase': 'FCC_A1'}, 'TI': {'H298': 4810.0, 'S298': 30.648, 'mass': 47.88, 'phase': 'HCP_A3'}, 'TL': {'H298': 6828.3, 'S298': 64.183, 'mass': 204.38, 'phase': 'HCP_A3'}, 'TM': {'H298': 7397.3, 'S298': 74.015, 'mass': 168.93, 'phase': 'HCP_A3'}, 'U': {'H298': 0.0, 'S298': 0.0, 'mass': 238.03, 'phase': 'ORTHORHOMBIC_A20'}, 'V': {'H298': 4507.0, 'S298': 30.89, 'mass': 50.941, 'phase': 'BCC_A2'}, 'VA': {'H298': 0.0, 'S298': 0.0, 'mass': 0.0, 'phase': 'VACUUM'}, 'W': {'H298': 4970.0, 'S298': 32.62, 'mass': 183.85, 'phase': 'BCC_A2'}, 'Y': {'H298': 0.0, 'S298': 0.0, 'mass': 88.906, 'phase': 'HCP_A3'}, 'YB': {'H298': 0.0, 'S298': 0.0, 'mass': 173.04, 'phase': 'FCC_A1'}, 'ZN': {'H298': 5656.8, 'S298': 41.631, 'mass': 65.39, 'phase': 'HCP_A3'}, 'ZR': {'H298': 5566.3, 'S298': 39.181, 'mass': 91.224, 'phase': 'HCP_A3'}}, 'SGTE91Stable': {'AG': Piecewise((-7209.512 + 118.202013*T - 23.8463314*T*log(T) - 12011*T**(-1) - 0.001790585*T**2 - 3.98587e-07*T**3, And(T < 1234.93, 298.15 <= T)), (-15095.252 + 190.266404*T - 33.472*T*log(T) + 1.411773e+29*T**(-9), And(T < 3000.0, 1234.93 <= T)), (0, True)), 'AL': Piecewise((-7976.15 + 137.093038*T - 24.3671976*T*log(T) + 74092*T**(-1) - 0.001884662*T**2 - 8.77664e-07*T**3, And(T < 700.0, 298.15 <= T)), (-11276.24 + 223.048446*T - 38.5844296*T*log(T) + 74092*T**(-1) + 0.018531982*T**2 - 5.764227e-06*T**3, And(T < 933.47, 700.0 <= T)), (-11278.378 + 188.684153*T - 31.748192*T*log(T) - 1.230524e+28*T**(-9), And(T < 2900.0, 933.47 <= T)), (0, True)), 'AM': Piecewise((-6639.201 + 89.645685*T - 21.1868*T*log(T) - 30424*T**(-1) - 0.00559955*T**2 - 5.41038e-07*T**3, And(T < 1329.0, 298.15 <= T)), (-21702.938 + 241.107269*T - 41.84*T*log(T), And(T < 3000.0, 1329.0 <= T)), (0, True)), 'AS': Piecewise((-7270.447 + 122.211069*T - 23.3144*T*log(T) + 11600*T**(-1) - 0.00271613*T**2, And(T < 1090.0, 298.15 <= T)), (-10454.913 + 163.457433*T - 29.216037*T*log(T), And(T < 1200.0, 1090.0 <= T)), (0, True)), 'AU': Piecewise((-6938.856 + 106.830098*T - 22.75455*T*log(T) - 25097*T**(-1) - 0.00385924*T**2 + 3.79625e-07*T**3, And(T < 929.4, 298.15 <= T)), (-93586.481 + 1021.69543*T - 155.706745*T*log(T) + 10637210*T**(-1) + 0.08756015*T**2 - 1.1518713e-05*T**3, And(T < 1337.33, 929.4 <= T)), (314067.829 - 2016.37825*T + 263.252259*T*log(T) - 67999832*T**(-1) - 0.118216828*T**2 + 8.923844e-06*T**3, And(T < 1735.8, 1337.33 <= T)), (-12133.783 + 165.272524*T - 30.9616*T*log(T), And(T < 3200.0, 1735.8 <= T)), (0, True)), 'B': Piecewise((-7735.284 + 107.111864*T - 15.6641*T*log(T) + 370843*T**(-1) - 0.006864515*T**2 + 6.18878e-07*T**3, And(T < 1100.0, 298.15 <= T)), (-16649.474 + 184.801744*T - 26.6047*T*log(T) + 1748270*T**(-1) - 0.00079809*T**2 - 2.556e-08*T**3, And(T < 2348.0, 1100.0 <= T)), (-36667.582 + 231.336244*T - 31.5957527*T*log(T) + 11205883*T**(-1) - 0.00159488*T**2 + 1.34719e-07*T**3, And(T < 3000.0, 2348.0 <= T)), (-21530.653 + 222.396264*T - 31.4*T*log(T), And(T < 6000.0, 3000.0 <= T)), (0, True)), 'BA': Piecewise((-17685.226 + 233.78606*T - 42.889*T*log(T) + 705880*T**(-1) - 0.0018314*T**2 - 9.5e-11*T**3, And(T < 1000.0, 298.15 <= T)), (-64873.614 + 608.188389*T - 94.2824199*T*log(T) + 8220192*T**(-1) + 0.019504772*T**2 - 1.051353e-06*T**3, And(T < 2995.0, 1000.0 <= T)), (8083.889 + 136.780042*T - 32.2*T*log(T), And(T < 4000.0, 2995.0 <= T)), (0, True)), 'BE': Piecewise((-8553.651 + 137.560219*T - 21.204*T*log(T) + 293690*T**(-1) - 0.00284715*T**2 - 1.60413e-07*T**3, And(T < 1527.0, 298.15 <= T)), (-121305.858 + 772.405844*T - 103.9843*T*log(T) + 27251743*T**(-1) + 0.021078651*T**2 - 1.119065e-06*T**3, And(T < 3000.0, 1527.0 <= T)), (0, True)), 'BI': Piecewise((-7817.776 + 128.418925*T - 28.4096529*T*log(T) + 0.012338888*T**2 - 8.381598e-06*T**3, And(T < 544.55, 298.15 <= T)), (30208.022 - 393.650351*T + 51.8556592*T*log(T) + 1.66145e+25*T**(-9) - 3616168*T**(-1) - 0.075311163*T**2 + 1.3499885e-05*T**3, And(T < 800.0, 544.55 <= T)), (-11045.664 + 182.548971*T - 35.9824*T*log(T) + 1.66145e+25*T**(-9) + 0.0074266*T**2 - 1.046e-06*T**3, And(T < 1200.0, 800.0 <= T)), (-7581.312 + 124.77144*T - 27.196*T*log(T) + 1.66145e+25*T**(-9), And(T < 3000.0, 1200.0 <= T)), (0, True)), 'C': Piecewise((-17368.441 + 170.73*T - 24.3*T*log(T) + 12000000000.0*T**(-3) - 264300000.0*T**(-2) + 2562600*T**(-1) - 0.0004723*T**2, And(T < 6000.0, 298.15 <= T)), (0, True)), 'CA': Piecewise((-4955.062 + 72.794266*T - 16.3138*T*log(T) - 133574*T**(-1) - 0.01110455*T**2, And(T < 1115.0, 298.15 <= T)), (-107304.428 + 799.982066*T - 114.292247*T*log(T) + 18245540*T**(-1) + 0.023733814*T**2 - 1.2438e-06*T**3, And(T < 3000.0, 1115.0 <= T)), (0, True)), 'CD': Piecewise((-7083.469 + 99.506198*T - 22.0442408*T*log(T) - 6966*T**(-1) - 0.006273908*T**2, And(T < 594.22, 298.15 <= T)), (-20064.971 + 256.812233*T - 45.1611543*T*log(T) + 1241290*T**(-1) + 0.008832011*T**2 - 8.99604e-07*T**3, And(T < 1500.0, 594.22 <= T)), (-9027.489 + 148.20548*T - 29.7064*T*log(T), And(T < 1600.0, 1500.0 <= T)), (0, True)), 'CE': Piecewise((-7160.519 + 84.23022*T - 22.3664*T*log(T) - 18117*T**(-1) - 0.0067103*T**2 - 3.20773e-07*T**3, And(T < 1000.0, 298.15 <= T)), (-79678.506 + 659.4604*T - 101.32248*T*log(T) + 11531707*T**(-1) + 0.026046487*T**2 - 1.930297e-06*T**3, And(T < 2000.0, 1000.0 <= T)), (-14198.639 + 190.370192*T - 37.6978*T*log(T), And(T < 4000.0, 2000.0 <= T)), (0, True)), 'CO': Piecewise((310.241 + 133.36601*T - 25.0861*T*log(T) + 72527*T**(-1) - 0.002654739*T**2 - 1.7348e-07*T**3, And(T < 1768.0, 298.15 <= T)), (-17197.666 + 253.28374*T - 40.5*T*log(T) + 9.3488e+30*T**(-9), And(T < 6000.0, 1768.0 <= T)), (0, True)), 'CR': Piecewise((-8856.94 + 157.48*T - 26.908*T*log(T) + 139250*T**(-1) + 0.00189435*T**2 - 1.47721e-06*T**3, And(T < 2180.0, 298.15 <= T)), (-34869.344 + 344.18*T - 50*T*log(T) - 2.88526e+32*T**(-9), And(T < 6000.0, 2180.0 <= T)), (0, True)), 'CS': Piecewise((-17373.82 + 436.899787*T - 90.5212584*T*log(T) + 245245*T**(-1) + 0.2029422*T**2 - 0.000127907669*T**3, And(T < 301.59, 200.0 <= T)), (-13553.817 + 218.689955*T - 46.7273304*T*log(T) + 7.8016e+21*T**(-9) + 181528*T**(-1) + 0.02043269*T**2 - 4.074846e-06*T**3, And(T < 2000.0, 301.59 <= T)), (0, True)), 'CU': Piecewise((-7770.458 + 130.485235*T - 24.112392*T*log(T) + 52478*T**(-1) - 0.00265684*T**2 + 1.29223e-07*T**3, And(T < 1357.77, 298.15 <= T)), (-13542.026 + 183.803828*T - 31.38*T*log(T) + 3.64167e+29*T**(-9), And(T < 3200.0, 1357.77 <= T)), (0, True)), 'DY': Piecewise((-7937.16586 + 102.307412*T - 26.3917167*T*log(T) + 4010.90565*T**(-1) - 0.000761683657*T**2 - 5.86914125e-07*T**3, And(T < 1000.0, 100.0 <= T)), (-13733.328 + 214.012934*T - 43.8283359*T*log(T) + 0.0173619874*T**(-1) + 0.0166909801*T**2 - 3.49702836e-06*T**3, And(T < 1654.15, 1000.0 <= T)), (-404681.371 + 2032.1415*T - 272.123952*T*log(T) + 109616238.0*T**(-1) + 0.0578301681*T**2 - 2.76169148e-06*T**3, And(T < 3000.0, 1654.15 <= T)), (0, True)), 'ER': Piecewise((-8489.136 + 116.698964*T - 28.3846744*T*log(T) + 9581*T**(-1) + 0.000995792*T**2 - 9.52557e-07*T**3, And(T < 1802.0, 298.15 <= T)), (-445688.206 + 2233.10212*T - 298.135131*T*log(T) + 123973199.0*T**(-1) + 0.065950553*T**2 - 3.041405e-06*T**3, And(T < 3200.0, 1802.0 <= T)), (0, True)), 'EU': Piecewise((-9864.965 + 135.836737*T - 32.8418896*T*log(T) + 102717*T**(-1) + 0.00931735*T**2 - 4.006564e-06*T**3, And(T < 1095.0, 298.15 <= T)), (-287423.476 + 2174.73304*T - 309.357101*T*log(T) + 48455305*T**(-1) + 0.114530917*T**2 - 8.809866e-06*T**3, And(T < 1900.0, 1095.0 <= T)), (0, True)), 'FE': Piecewise((1225.7 + 124.134*T - 23.5143*T*log(T) + 77359*T**(-1) - 0.00439752*T**2 - 5.8927e-08*T**3, And(T < 1811.0, 298.15 <= T)), (-25383.581 + 299.31255*T - 46*T*log(T) + 2.29603e+31*T**(-9), And(T < 6000.0, 1811.0 <= T)), (0, True)), 'GA': Piecewise((-21312.331 + 585.263691*T - 108.228783*T*log(T) + 439954*T**(-1) + 0.227155636*T**2 - 0.000118575257*T**3, And(T < 302.91, 200.0 <= T)), (-7055.643 + 132.73019*T - 26.0692906*T*log(T) + 1.64547e+23*T**(-9) - 118332*T**(-1) + 0.0001506*T**2 - 4.0173e-08*T**3, And(T < 4000.0, 302.91 <= T)), (0, True)), 'GD': Piecewise((-6834.5855 + 97.13101*T - 24.7214131*T*log(T) - 8665.73348*T**(-1) - 0.00285240521*T**2 - 3.14674076e-07*T**3, And(T < 1000.0, 200.0 <= T)), (-6483.25362 + 95.6919924*T - 24.6598297*T*log(T) - 0.00185225011*T**2 - 6.61211607e-07*T**3, And(T < 1508.15, 1000.0 <= T)), (-123124.992 + 699.125537*T - 101.800197*T*log(T) + 29356890.3*T**(-1) + 0.0150644246*T**2 - 6.39165948e-07*T**3, And(T < 3600.0, 1508.15 <= T)), (0, True)), 'GE': Piecewise((-9486.153 + 165.635573*T - 29.5337682*T*log(T) + 163298*T**(-1) + 0.005568297*T**2 - 1.513694e-06*T**3, And(T < 900.0, 298.15 <= T)), (-5689.239 + 102.86087*T - 19.8536239*T*log(T) - 0.003672527*T**2, And(T < 1211.4, 900.0 <= T)), (-9548.204 + 156.708024*T - 27.6144*T*log(T) - 8.59809e+28*T**(-9), And(T < 3200.0, 1211.4 <= T)), (0, True)), 'HF': Piecewise((-6987.297 + 110.744026*T - 22.7075*T*log(T) - 22590*T**(-1) - 0.004146145*T**2 - 4.77e-10*T**3, And(T < 2506.0, 298.15 <= T)), (-1446776.33 + 6193.60999*T - 787.536383*T*log(T) + 501742495.0*T**(-1) + 0.1735215*T**2 - 7.575759e-06*T**3, And(T < 3000.0, 2506.0 <= T)), (0, True)), 'HG': Piecewise((82356.855 - 3348.19466*T + 618.193308*T*log(T) - 2366612*T**(-1) - 2.0282337*T**2 + 0.00118398213*T**3, And(T < 234.32, 200.0 <= T)), (-8961.207 + 135.232291*T - 32.257*T*log(T) + 6670*T**(-1) + 0.0097977*T**2 - 3.20695e-06*T**3, And(T < 400.0, 234.32 <= T)), (-7970.627 + 112.33345*T - 28.414*T*log(T) - 41095*T**(-1) + 0.00318535*T**2 - 1.077802e-06*T**3, And(T < 700.0, 400.0 <= T)), (-7161.338 + 90.797305*T - 24.87*T*log(T) - 27495*T**(-1) - 0.00166775*T**2 + 8.737e-09*T**3, And(T < 2000.0, 700.0 <= T)), (0, True)), 'HO': Piecewise((-7612.429 + 86.593171*T - 23.4879*T*log(T) - 0.00827315*T**2 + 2.375467e-06*T**3, And(T < 600.0, 298.15 <= T)), (-10917.688 + 182.475691*T - 39.6932*T*log(T) + 0.01820065*T**2 - 4.829733e-06*T**3, And(T < 900.0, 600.0 <= T)), (46646.188 - 421.474473*T + 48.0595*T*log(T) - 7185900*T**(-1) - 0.0424634*T**2 + 3.233133e-06*T**3, And(T < 1200.0, 900.0 <= T)), (27786.061 - 156.162846*T + 8.28608*T*log(T) - 6183850*T**(-1) - 0.01082725*T**2 - 1.112352e-06*T**3, And(T < 1703.0, 1200.0 <= T)), (-825364.662 + 4248.37906*T - 558.950682*T*log(T) + 219952973.0*T**(-1) + 0.139111904*T**2 - 6.824652e-06*T**3, And(T < 3000.0, 1703.0 <= T)), (0, True)), 'IN': Piecewise((-6978.89 + 92.338115*T - 21.8386*T*log(T) - 22906*T**(-1) - 0.00572566*T**2 - 2.120321e-06*T**3, And(T < 429.75, 298.15 <= T)), (-7033.516 + 124.476588*T - 27.4562*T*log(T) + 3.53116e+22*T**(-9) - 211708*T**(-1) + 0.00054607*T**2 - 8.367e-08*T**3, And(T < 3800.0, 429.75 <= T)), (0, True)), 'IR': Piecewise((-6936.288 + 118.780119*T - 22.7944*T*log(T) - 20083*T**(-1) - 0.003091976*T**2, And(T < 1215.0, 298.15 <= T)), (-8123.73 + 140.066697*T - 26.085*T*log(T) - 4.7969e-07*T**3, And(T < 2719.0, 1215.0 <= T)), (290529.037 - 1258.35297*T + 152.498874*T*log(T) - 92987250*T**(-1) - 0.047176402*T**2 + 1.844977e-06*T**3, And(T < 4000.0, 2719.0 <= T)), (0, True)), 'K': Piecewise((-16112.929 + 389.624197*T - 77.0571464*T*log(T) + 243385*T**(-1) + 0.146211135*T**2 - 8.4949147e-05*T**3, And(T < 336.53, 200.0 <= T)), (-11122.441 + 192.586544*T - 39.2885968*T*log(T) + 1.19223e+22*T**(-9) + 43251*T**(-1) + 0.012167386*T**2 - 2.64387e-06*T**3, And(T < 2200.0, 336.53 <= T)), (0, True)), 'LA': Piecewise((-7968.403 + 120.284604*T - 26.34*T*log(T) - 0.001295165*T**2, And(T < 550.0, 298.15 <= T)), (-3381.413 + 59.06113*T - 17.1659411*T*log(T) - 399448*T**(-1) - 0.008371705*T**2 + 6.8932e-07*T**3, And(T < 2000.0, 550.0 <= T)), (-15608.882 + 181.390071*T - 34.3088*T*log(T), And(T < 4000.0, 2000.0 <= T)), (0, True)), 'LI': Piecewise((-10583.817 + 217.637482*T - 38.940488*T*log(T) + 159994*T**(-1) + 0.035466931*T**2 - 1.9869816e-05*T**3, And(T < 453.6, 200.0 <= T)), (-559579.123 + 10547.8799*T - 1702.88865*T*log(T) + 33885874*T**(-1) + 2.25832944*T**2 - 0.000571066077*T**3, And(T < 500.0, 453.6 <= T)), (-9062.994 + 179.278285*T - 31.2283718*T*log(T) - 102387*T**(-1) + 0.002633221*T**2 - 4.38058e-07*T**3, And(T < 3000.0, 500.0 <= T)), (0, True)), 'LU': Piecewise((-8788.329 + 146.536283*T - 29.812*T*log(T) + 39723*T**(-1) + 0.00519165*T**2 - 1.790717e-06*T**3, And(T < 700.0, 298.15 <= T)), (-9043.057 + 142.327643*T - 29.0095*T*log(T) + 141549*T**(-1) + 0.00371416*T**2 - 1.50147e-06*T**3, And(T < 1700.0, 700.0 <= T)), (6940.092 - 46.91844*T - 1.83986*T*log(T) - 0.0119001*T**2, And(T < 1936.0, 1700.0 <= T)), (-404023.691 + 1829.37943*T - 239.019502*T*log(T) + 124825465.0*T**(-1) + 0.041800748*T**2 - 1.661174e-06*T**3, And(T < 3700.0, 1936.0 <= T)), (0, True)), 'MG': Piecewise((-8367.34 + 143.675547*T - 26.1849782*T*log(T) + 78950*T**(-1) + 0.0004858*T**2 - 1.393669e-06*T**3, And(T < 923.0, 298.15 <= T)), (-14130.185 + 204.716215*T - 34.3088*T*log(T) + 1.038192e+28*T**(-9), And(T < 3000.0, 923.0 <= T)), (0, True)), 'MN': Piecewise((-8115.28 + 130.059*T - 23.4582*T*log(T) + 69827*T**(-1) - 0.00734768*T**2, And(T < 1519.0, 298.15 <= T)), (-28733.41 + 312.2648*T - 48*T*log(T) + 1.656847e+30*T**(-9), And(T < 2000.0, 1519.0 <= T)), (0, True)), 'MO': Piecewise((-7746.302 + 131.9197*T - 23.56414*T*log(T) + 65812*T**(-1) - 0.003443396*T**2 + 5.66283e-07*T**3 - 1.30927e-10*T**4, And(T < 2896.0, 298.15 <= T)), (-30556.41 + 283.559746*T - 42.63829*T*log(T) - 4.849315e+33*T**(-9), And(T < 5000.0, 2896.0 <= T)), (0, True)), 'N': Piecewise((-3750.675 - 9.45425*T - 12.7819*T*log(T) - 32374*T**(-1) - 0.00176686*T**2 + 2.681e-09*T**3, And(T < 950.0, 298.15 <= T)), (-7358.85 + 17.2003*T - 16.3699*T*log(T) + 563070*T**(-1) - 0.00065107*T**2 + 3.0097e-08*T**3, And(T < 3350.0, 950.0 <= T)), (-16392.8 + 50.26*T - 20.4695*T*log(T) + 4596375*T**(-1) + 0.000239754*T**2 - 8.333e-09*T**3, And(T < 6000.0, 3350.0 <= T)), (0, True)), 'NA': Piecewise((-11989.434 + 260.548732*T - 51.0393608*T*log(T) + 132154*T**(-1) + 0.072306633*T**2 - 4.3638283e-05*T**3, And(T < 370.87, 200.0 <= T)), (-11009.884 + 199.619999*T - 38.1198801*T*log(T) + 1.65071e+23*T**(-9) + 34342*T**(-1) + 0.009745854*T**2 - 1.70664e-06*T**3, And(T < 2300.0, 370.87 <= T)), (0, True)), 'NB': Piecewise((-8519.353 + 142.045475*T - 26.4711*T*log(T) + 93399*T**(-1) + 0.000203475*T**2 - 3.5012e-07*T**3, And(T < 2750.0, 298.15 <= T)), (-37669.3 + 271.720843*T - 41.77*T*log(T) + 1.528238e+32*T**(-9), And(T < 6000.0, 2750.0 <= T)), (0, True)), 'ND': Piecewise((-8402.93 + 111.10239*T - 27.0858*T*log(T) + 34887*T**(-1) + 0.000556125*T**2 - 2.6923e-06*T**3, And(T < 900.0, 298.15 <= T)), (-6984.083 + 83.662617*T - 22.7536*T*log(T) - 0.00420402*T**2 - 1.802e-06*T**3, And(T < 1128.0, 900.0 <= T)), (-225610.846 + 1673.04075*T - 238.182873*T*log(T) + 38810350*T**(-1) + 0.078615997*T**2 - 6.048207e-06*T**3, And(T < 1799.0, 1128.0 <= T)), (-25742.331 + 276.257088*T - 48.7854*T*log(T), And(T < 1800.0, 1799.0 <= T)), (0, True)), 'NI': Piecewise((-5179.159 + 117.854*T - 22.096*T*log(T) - 0.0048407*T**2, And(T < 1728.0, 298.15 <= T)), (-27840.655 + 279.135*T - 43.1*T*log(T) + 1.12754e+31*T**(-9), And(T < 3000.0, 1728.0 <= T)), (0, True)), 'NP': Piecewise((241.888 - 57.531347*T + 4.0543*T*log(T) - 402857*T**(-1) - 0.04127725*T**2, And(T < 553.0, 298.15 <= T)), (-57015.112 + 664.27337*T - 102.523*T*log(T) + 4796910*T**(-1) + 0.0284592*T**2 - 2.483917e-06*T**3, And(T < 1799.0, 553.0 <= T)), (-12092.736 + 255.780866*T - 45.3964*T*log(T), And(T < 4000.0, 1799.0 <= T)), (0, True)), 'O': Piecewise((-3480.87 - 25.503038*T - 11.1355*T*log(T) - 38365*T**(-1) - 0.005098875*T**2 + 6.61845833e-07*T**3, And(T < 1000.0, 298.15 <= T)), (-6568.763 + 12.659879*T - 16.8138*T*log(T) + 262905*T**(-1) - 0.0005957975*T**2 + 6.781e-09*T**3, And(T < 3300.0, 1000.0 <= T)), (-13986.728 + 31.259624*T - 18.9536*T*log(T) + 4383200*T**(-1) - 0.000425243*T**2 + 1.0721e-08*T**3, And(T < 6000.0, 3300.0 <= T)), (0, True)), 'OS': Piecewise((-7196.978 + 126.369531*T - 23.5710242*T*log(T) - 0.00190427*T**2, And(T < 3306.0, 298.15 <= T)), (644910.07 - 1935.2137*T + 224.998034*T*log(T) - 312569031.0*T**(-1) - 0.042489827*T**2 + 1.173861e-06*T**3, And(T < 5500.0, 3306.0 <= T)), (0, True)), 'P': Piecewise((-43821.799 + 1026.69389*T - 178.426*T*log(T) + 1632695*T**(-1) + 0.290708*T**2 - 0.000104022667*T**3, And(T < 317.3, 250.0 <= T)), (-9587.448 + 152.341487*T - 28.7335301*T*log(T) + 172966*T**(-1) + 0.001715669*T**2 - 2.2829e-07*T**3, And(T < 1000.0, 317.3 <= T)), (-8093.075 + 135.876831*T - 26.326*T*log(T), And(T < 3000.0, 1000.0 <= T)), (0, True)), 'PA': Piecewise((-7681.561 + 111.973215*T - 23.9116*T*log(T) - 0.00621325*T**2, And(T < 1443.0, 298.15 <= T)), (27955.763 - 177.320253*T + 16.305*T*log(T) - 5908900*T**(-1) - 0.0263416*T**2 + 1.884933e-06*T**3, And(T < 2176.0, 1443.0 <= T)), (-29949.683 + 288.308639*T - 47.2792*T*log(T), And(T < 4000.0, 2176.0 <= T)), (0, True)), 'PB': Piecewise((-7650.085 + 101.700244*T - 24.5242231*T*log(T) - 0.00365895*T**2 - 2.4395e-07*T**3, And(T < 600.61, 298.15 <= T)), (-10531.095 + 154.243182*T - 32.4913959*T*log(T) + 8.05448e+25*T**(-9) + 0.00154613*T**2, And(T < 1200.0, 600.61 <= T)), (4157.616 + 53.139072*T - 18.9640637*T*log(T) + 8.05448e+25*T**(-9) - 2696755*T**(-1) - 0.002882943*T**2 + 9.8144e-08*T**3, And(T < 2100.0, 1200.0 <= T)), (0, True)), 'PD': Piecewise((-10204.027 + 176.076315*T - 32.211*T*log(T) + 168687*T**(-1) + 0.007120975*T**2 - 1.919875e-06*T**3, And(T < 900.0, 298.15 <= T)), (917.062 + 49.659892*T - 13.5708*T*log(T) - 1112465*T**(-1) - 0.00717522*T**2 + 1.91115e-07*T**3, And(T < 1828.0, 900.0 <= T)), (-67161.018 + 370.102147*T - 54.2067086*T*log(T) + 18683526*T**(-1) + 0.002091396*T**2 - 6.2811e-08*T**3, And(T < 4000.0, 1828.0 <= T)), (0, True)), 'PR': Piecewise((-18803.379 + 356.587384*T - 68.9176*T*log(T) + 507385*T**(-1) + 0.072929*T**2 - 2.5184333e-05*T**3, And(T < 500.0, 298.15 <= T)), (-7246.848 + 82.427384*T - 22.8909*T*log(T) - 0.00497126*T**2 - 1.22951e-06*T**3, And(T < 800.0, 500.0 <= T)), (95411.023 - 1073.55111*T + 146.764*T*log(T) - 11588800*T**(-1) - 0.1288205*T**2 + 1.5592233e-05*T**3, And(T < 1068.0, 800.0 <= T)), (-481663.131 + 4234.33311*T - 606.120311*T*log(T) + 70926840*T**(-1) + 0.305181506*T**2 - 3.0994702e-05*T**3, And(T < 1204.0, 1068.0 <= T)), (-20014.678 + 227.685155*T - 42.9697*T*log(T), And(T < 3800.0, 1204.0 <= T)), (0, True)), 'PT': Piecewise((-7595.631 + 124.388275*T - 24.5526*T*log(T) + 7974*T**(-1) - 0.00248297*T**2 - 2.0138e-08*T**3, And(T < 1300.0, 298.15 <= T)), (-9253.174 + 161.529615*T - 30.2527*T*log(T) - 272106*T**(-1) + 0.002321665*T**2 - 6.56946e-07*T**3, And(T < 2041.5, 1300.0 <= T)), (-222048.216 + 1019.35892*T - 136.192996*T*log(T) + 71539020*T**(-1) + 0.020454938*T**2 - 7.59259e-07*T**3, And(T < 4000.0, 2041.5 <= T)), (0, True)), 'PU': Piecewise((-7396.309 + 80.301382*T - 18.1258*T*log(T) - 0.02241*T**2, And(T < 400.0, 298.15 <= T)), (-16605.962 + 236.786603*T - 42.4187*T*log(T) + 579325*T**(-1) - 0.00134493*T**2 + 2.63443e-07*T**3, And(T < 944.0, 400.0 <= T)), (-14462.156 + 232.961553*T - 42.248*T*log(T), And(T < 3000.0, 944.0 <= T)), (0, True)), 'RB': Piecewise((-21669.733 + 583.580988*T - 115.282589*T*log(T) + 385754*T**(-1) + 0.26277612*T**2 - 0.000152236932*T**3, And(T < 312.46, 200.0 <= T)), (-7823.397 + 117.050578*T - 29.1775424*T*log(T) - 5.55029e+22*T**(-9) - 126310*T**(-1) + 0.000412369*T**2 - 4.6822e-07*T**3, And(T < 900.0, 312.46 <= T)), (-39488.142 + 450.974149*T - 77.7006456*T*log(T) - 5.55029e+22*T**(-9) + 3778006*T**(-1) + 0.033795632*T**2 - 4.829082e-06*T**3, And(T < 1600.0, 900.0 <= T)), (-159742.511 + 1287.78947*T - 191.262774*T*log(T) - 5.55029e+22*T**(-9) + 27738456*T**(-1) + 0.08161687*T**2 - 8.61653e-06*T**3, And(T < 2100.0, 1600.0 <= T)), (0, True)), 'RE': Piecewise((-7695.279 + 128.421589*T - 24.348*T*log(T) + 32915*T**(-1) - 0.00253505*T**2 + 1.92818e-07*T**3, And(T < 1200.0, 298.15 <= T)), (-15775.998 + 194.667426*T - 33.586*T*log(T) + 1376270*T**(-1) + 0.00224565*T**2 - 2.81835e-07*T**3, And(T < 2400.0, 1200.0 <= T)), (-70882.739 + 462.110749*T - 67.956*T*log(T) + 18075200*T**(-1) + 0.01184945*T**2 - 7.88955e-07*T**3, And(T < 3458.0, 2400.0 <= T)), (346325.888 - 1211.37186*T + 140.831655*T*log(T) - 134548866.0*T**(-1) - 0.033764567*T**2 + 1.053726e-06*T**3, And(T < 5000.0, 3458.0 <= T)), (-78564.296 + 346.997842*T - 49.519*T*log(T), And(T < 6000.0, 5000.0 <= T)), (0, True)), 'RH': Piecewise((-7848.828 + 132.020923*T - 24.0178336*T*log(T) + 55846*T**(-1) - 0.003424186*T**2 - 1.68032e-07*T**3, And(T < 1200.0, 298.15 <= T)), (-28367.852 + 305.771019*T - 48.3766632*T*log(T) + 3348162*T**(-1) + 0.00966345*T**2 - 1.512774e-06*T**3, And(T < 2237.0, 1200.0 <= T)), (-6237470.48 + 30151.6342*T - 3874.21058*T*log(T) + 1880362180.0*T**(-1) + 1.04921361*T**2 - 5.3978814e-05*T**3, And(T < 2450.0, 2237.0 <= T)), (-44863.489 + 344.889895*T - 50.58456*T*log(T), And(T < 2500.0, 2450.0 <= T)), (0, True)), 'RU': Piecewise((-7561.873 + 127.866233*T - 22.9143287*T*log(T) + 56377*T**(-1) - 0.004062566*T**2 + 1.7641e-07*T**3, And(T < 1500.0, 298.15 <= T)), (-59448.103 + 489.516214*T - 72.3241219*T*log(T) + 11063885*T**(-1) + 0.018726245*T**2 - 1.952433e-06*T**3, And(T < 2607.0, 1500.0 <= T)), (-38588773 + 168610.517*T - 21329.705*T*log(T) + 13082992600.0*T**(-1) + 5.221639*T**2 - 0.000240245985*T**3, And(T < 2740.0, 2607.0 <= T)), (-55768.304 + 364.482314*T - 51.8816*T*log(T), And(T < 4500.0, 2740.0 <= T)), (0, True)), 'S': Piecewise((-5228.956 + 55.417762*T - 11.007*T*log(T) - 0.026529*T**2 + 7.754333e-06*T**3, And(T < 368.3, 298.15 <= T)), (-6513.769 + 94.692922*T - 17.941839*T*log(T) + 39910*T**(-1) - 0.010895125*T**2 + 1.402558e-06*T**3, And(T < 1300.0, 368.3 <= T)), (0, True)), 'SB': Piecewise((-9242.858 + 156.154689*T - 30.5130752*T*log(T) + 100625*T**(-1) + 0.007748768*T**2 - 3.003415e-06*T**3, And(T < 903.78, 298.15 <= T)), (-11738.83 + 169.485872*T - 31.38*T*log(T) + 1.616849e+27*T**(-9), And(T < 2000.0, 903.78 <= T)), (0, True)), 'SC': Piecewise((-8689.547 + 153.48097*T - 28.1882*T*log(T) + 72177*T**(-1) + 0.00321892*T**2 - 1.64531e-06*T**3, And(T < 800.0, 298.15 <= T)), (-7511.295 + 132.759582*T - 24.9132*T*log(T) - 0.000573295*T**2 - 8.59345e-07*T**3, And(T < 1608.0, 800.0 <= T)), (261143.04 - 1817.92245*T + 241.441051*T*log(T) - 50607159*T**(-1) - 0.117529396*T**2 + 8.7398e-06*T**3, And(T < 2000.0, 1608.0 <= T)), (-30515.246 + 286.474338*T - 44.2249*T*log(T), And(T < 3200.0, 2000.0 <= T)), (0, True)), 'SE': Piecewise((-9376.371 + 174.205877*T - 33.6527*T*log(T) + 102249*T**(-1) + 0.02424314*T**2 - 1.5318461e-05*T**3, And(T < 494.0, 298.15 <= T)), (-37546.134 + 507.111538*T - 81.2006585*T*log(T) + 2614263*T**(-1) + 0.037144892*T**2 - 5.611026e-06*T**3, And(T < 800.0, 494.0 <= T)), (-12193.47 + 197.770166*T - 35.1456*T*log(T), And(T < 1000.0, 800.0 <= T)), (0, True)), 'SI': Piecewise((-8162.609 + 137.236859*T - 22.8317533*T*log(T) + 176667*T**(-1) - 0.001912904*T**2 - 3.552e-09*T**3, And(T < 1687.0, 298.15 <= T)), (-9457.642 + 167.281367*T - 27.196*T*log(T) - 4.20369e+30*T**(-9), And(T < 3600.0, 1687.0 <= T)), (0, True)), 'SM': Piecewise((-3872.013 - 32.10748*T - 1.6485*T*log(T) - 82168*T**(-1) - 0.050254*T**2 + 1.010345e-05*T**3, And(T < 700.0, 298.15 <= T)), (-50078.215 + 627.869894*T - 102.665*T*log(T) + 3861770*T**(-1) + 0.0474522*T**2 - 7.538383e-06*T**3, And(T < 1190.0, 700.0 <= T)), (289719.819 - 2744.50976*T + 381.41982*T*log(T) - 40102102*T**(-1) - 0.254986338*T**2 + 2.7512152e-05*T**3, And(T < 1345.0, 1190.0 <= T)), (-23056.079 + 282.194375*T - 50.208*T*log(T), And(T < 2100.0, 1345.0 <= T)), (0, True)), 'SN': Piecewise((-7958.517 + 122.765451*T - 25.858*T*log(T) + 18440*T**(-1) + 0.00051185*T**2 - 3.192767e-06*T**3, And(T < 250.0, 100.0 <= T)), (-5855.135 + 65.443315*T - 15.961*T*log(T) - 61960*T**(-1) - 0.0188702*T**2 + 3.121167e-06*T**3, And(T < 505.08, 250.0 <= T)), (2524.724 + 4.005269*T - 8.2590486*T*log(T) - 1.2307e+25*T**(-9) - 1081244*T**(-1) - 0.016814429*T**2 + 2.623131e-06*T**3, And(T < 800.0, 505.08 <= T)), (-8256.959 + 138.99688*T - 28.4512*T*log(T) - 1.2307e+25*T**(-9), And(T < 3000.0, 800.0 <= T)), (0, True)), 'SR': Piecewise((-7532.367 + 107.183879*T - 23.905*T*log(T) - 2055*T**(-1) - 0.00461225*T**2 - 1.67477e-07*T**3, And(T < 820.0, 298.15 <= T)), (-13380.102 + 153.196104*T - 30.0905432*T*log(T) + 850134*T**(-1) - 0.003251266*T**2 + 1.84189e-07*T**3, And(T < 3000.0, 820.0 <= T)), (0, True)), 'TA': Piecewise((-7285.889 + 119.139857*T - 23.7592624*T*log(T) - 3293*T**(-1) - 0.002623033*T**2 + 1.70109e-07*T**3, And(T < 1300.0, 298.15 <= T)), (-22389.955 + 243.88676*T - 41.137088*T*log(T) + 2429586*T**(-1) + 0.006167572*T**2 - 6.55136e-07*T**3, And(T < 2500.0, 1300.0 <= T)), (229382.886 - 722.59722*T + 78.5244752*T*log(T) - 93813648*T**(-1) - 0.017983376*T**2 + 1.95033e-07*T**3, And(T < 3290.0, 2500.0 <= T)), (-1042384.01 + 2985.49125*T - 362.159132*T*log(T) + 554714342.0*T**(-1) + 0.043117795*T**2 - 1.055148e-06*T**3, And(T < 6000.0, 3290.0 <= T)), (0, True)), 'TB': Piecewise((-20842.158 + 409.309555*T - 77.5006*T*log(T) + 562430*T**(-1) + 0.0832265*T**2 - 2.5672833e-05*T**3, And(T < 600.0, 298.15 <= T)), (-8772.606 + 102.61162*T - 25.8659*T*log(T) + 172355*T**(-1) - 0.002757005*T**2 - 8.05838e-07*T**3, And(T < 1200.0, 600.0 <= T)), (-7944.942 + 101.7776*T - 25.9584*T*log(T) - 0.001676335*T**2 - 1.067632e-06*T**3, And(T < 1562.0, 1200.0 <= T)), (-265240.309 + 1456.04268*T - 200.215695*T*log(T) + 65043790*T**(-1) + 0.041615159*T**2 - 2.044697e-06*T**3, And(T < 3000.0, 1562.0 <= T)), (0, True)), 'TC': Piecewise((-7947.794 + 132.5101*T - 24.3394*T*log(T) + 63855*T**(-1) - 0.002954747*T**2, And(T < 2430.0, 298.15 <= T)), (-47759.99 + 318.286*T - 47*T*log(T) + 6.63829e+32*T**(-9), And(T < 4000.0, 2430.0 <= T)), (0, True)), 'TE': Piecewise((-10544.679 + 183.372894*T - 35.6687*T*log(T) + 155015*T**(-1) + 0.01583435*T**2 - 5.240417e-06*T**3, And(T < 722.66, 298.15 <= T)), (9160.595 - 129.265373*T + 13.004*T*log(T) - 1286810*T**(-1) - 0.0362361*T**2 + 5.006367e-06*T**3, And(T < 1150.0, 722.66 <= T)), (-12781.349 + 174.901226*T - 32.5596*T*log(T), And(T < 1600.0, 1150.0 <= T)), (0, True)), 'TH': Piecewise((-7732.08 + 117.022775*T - 24.841*T*log(T) + 13010*T**(-1) - 0.00236725*T**2 - 5.2883e-07*T**3, And(T < 1633.0, 298.15 <= T)), (-37352.871 + 237.654918*T - 39.107*T*log(T) + 7981000*T**(-1) - 0.00358025*T**2 + 2.36893e-07*T**3, And(T < 2900.0, 1633.0 <= T)), (-33353.313 + 283.979845*T - 46.024*T*log(T), And(T < 4000.0, 2900.0 <= T)), (0, True)), 'TI': Piecewise((-8059.921 + 133.615208*T - 23.9933*T*log(T) + 72636*T**(-1) - 0.004777975*T**2 + 1.06716e-07*T**3, And(T < 900.0, 298.15 <= T)), (-7811.815 + 132.988068*T - 23.9887*T*log(T) + 42680*T**(-1) - 0.0042033*T**2 - 9.0876e-08*T**3, And(T < 1155.0, 900.0 <= T)), (908.837 + 66.976538*T - 14.9466*T*log(T) - 1477660*T**(-1) - 0.0081465*T**2 + 2.02715e-07*T**3, And(T < 1941.0, 1155.0 <= T)), (-124526.786 + 638.806871*T - 87.2182461*T*log(T) + 36699805*T**(-1) + 0.008204849*T**2 - 3.04747e-07*T**3, And(T < 4000.0, 1941.0 <= T)), (0, True)), 'TL': Piecewise((-8104.038 + 107.140405*T - 25.2274*T*log(T) + 42058*T**(-1) - 0.0033063*T**2 - 1.21807e-07*T**3, And(T < 577.0, 200.0 <= T)), (-15406.859 + 196.771926*T - 38.4130658*T*log(T) + 729665*T**(-1) + 0.005228106*T**2 - 5.19136e-07*T**3, And(T < 1800.0, 577.0 <= T)), (0, True)), 'TM': Piecewise((-10016.715 + 151.037648*T - 34.3664974*T*log(T) + 95982*T**(-1) + 0.012110965*T**2 - 3.831156e-06*T**3, And(T < 700.0, 298.15 <= T)), (-14701.965 + 147.957496*T - 32.1951269*T*log(T) + 1091664*T**(-1) + 0.000444753*T**2 - 3.96694e-07*T**3, And(T < 1600.0, 700.0 <= T)), (-8669.227 + 97.98144*T - 25.1816969*T*log(T) - 0.003384563*T**2, And(T < 1818.0, 1600.0 <= T)), (727125.608 - 4147.40063*T + 534.082763*T*log(T) - 180382220.0*T**(-1) - 0.19093039*T**2 + 1.1689185e-05*T**3, And(T < 2300.0, 1818.0 <= T)), (0, True)), 'U': Piecewise((-8407.734 + 130.955151*T - 26.9182*T*log(T) + 38568*T**(-1) + 0.00125156*T**2 - 4.42605e-06*T**3, And(T < 955.0, 298.15 <= T)), (-22521.8 + 292.121093*T - 48.66*T*log(T), And(T < 3000.0, 955.0 <= T)), (0, True)), 'V': Piecewise((-7930.43 + 133.346053*T - 24.134*T*log(T) + 69460*T**(-1) - 0.003098*T**2 + 1.2175e-07*T**3, And(T < 790.0, 298.15 <= T)), (-7967.842 + 143.291093*T - 25.9*T*log(T) + 6.25e-05*T**2 - 6.8e-07*T**3, And(T < 2183.0, 790.0 <= T)), (-41689.864 + 321.140783*T - 47.43*T*log(T) + 6.44389e+31*T**(-9), And(T < 4000.0, 2183.0 <= T)), (0, True)), 'W': Piecewise((-7646.311 + 130.4*T - 24.1*T*log(T) + 44500*T**(-1) - 0.001936*T**2 + 2.07e-07*T**3 - 5.33e-11*T**4, And(T < 3695.0, 298.15 <= T)), (-82868.801 + 389.362335*T - 54*T*log(T) + 1.528621e+33*T**(-9), And(T < 6000.0, 3695.0 <= T)), (0, True)), 'Y': Piecewise((-8011.09379 + 128.572856*T - 25.6656992*T*log(T) + 26911.509*T**(-1) - 0.00175716414*T**2 - 4.17561786e-07*T**3, And(T < 1000.0, 100.0 <= T)), (-7179.74574 + 114.497104*T - 23.4941827*T*log(T) - 0.0038211802*T**2 - 8.2534534e-08*T**3, And(T < 1795.15, 1000.0 <= T)), (-67480.7761 + 382.124727*T - 56.9527111*T*log(T) + 18077162.6*T**(-1) + 0.00231774379*T**2 - 7.22513088e-08*T**3, And(T < 3700.0, 1795.15 <= T)), (0, True)), 'YB': Piecewise((-9370.941 + 189.327664*T - 40.0791*T*log(T) + 0.04227115*T**2 - 2.2242e-05*T**3, And(T < 553.0, 298.15 <= T)), (-8192.154 + 121.065655*T - 26.7591*T*log(T) - 0.00256065*T**2, And(T < 1033.0, 553.0 <= T)), (16034.89 - 89.478241*T + 2.7623966*T*log(T) - 3631462*T**(-1) - 0.017961331*T**2 + 1.421719e-06*T**3, And(T < 2000.0, 1033.0 <= T)), (0, True)), 'ZN': Piecewise((-7285.787 + 118.470069*T - 23.701314*T*log(T) - 0.001712034*T**2 - 1.264963e-06*T**3, And(T < 692.68, 298.15 <= T)), (-11070.559 + 172.34566*T - 31.38*T*log(T) + 4.70514e+26*T**(-9), And(T < 1700.0, 692.68 <= T)), (0, True)), 'ZR': Piecewise((-7827.595 + 125.64905*T - 24.1618*T*log(T) + 34971*T**(-1) - 0.00437791*T**2, And(T < 2128.0, 130.0 <= T)), (-26085.921 + 262.724183*T - 42.144*T*log(T) - 1.342896e+31*T**(-9), And(T < 6000.0, 2128.0 <= T)))}, 'SR2016': {('CU', 'FCC_A1'): Piecewise((GHSERCU, And(1.0 <= T, T < 10000.0)), (0, True)), ('CU', 'HCP_A3'): Piecewise((-10441.4393392344 - 0.321147237334052*T + 8.7685671186*T*log(-1.0 + exp(155.1404/T)) + 16.1968683846*T*log(-1.0 + exp(290.9421/T)) - 0.00121182291077191*T**2 - 3.38438862938597e-07*T**3, And(T < 298.15, 0.01 <= T)), (-7170.458 + 130.685235*T - 24.112392*T*log(T) + 52478*T**(-1) - 0.00265684*T**2 + 1.29223e-07*T**3, And(T < 1357.77, 298.15 <= T)), (-12942.0252504739 + 184.003828*T - 31.38*T*log(T) + 3.64167e+29*T**(-9), And(T < 3200.0, 1357.77 <= T)), (0, True)), ('CU', 'LIQUID'): Piecewise((2379.36422209194 - 10.033338832193*T + 8.7685671186*T*log(-1.0 + exp(155.1404/T)) + 16.1968683846*T*log(-1.0 + exp(290.9421/T)) - 0.00121066539331185*T**2 - 3.40056501515466e-07*T**3, And(T < 298.15, 0.01 <= T)), (5650.32106235287 + 120.973331*T - 24.112392*T*log(T) + 52478*T**(-1) - 0.00265684*T**2 + 1.29223e-07*T**3 - 5.8489e-21*T**7, And(T < 1357.77, 298.15 <= T)), (409.498458129716 + 173.881484*T - 31.38*T*log(T), And(T < 3200.0, 1357.77 <= T)), (0, True)), ('MG', 'FCC_A1'): Piecewise((-8158.16393259455 + 0.246565697987779*T + 3.2404446864*T*log(-1.0 + exp(95.82831/T)) + 21.6535319868*T*log(-1.0 + exp(247.8675/T)) - 6.21802726222479e-05*T**2 - 2.18283562784578e-06*T**3, And(T < 298.15, 0.01 <= T)), (-5767.34 + 142.775547*T - 26.1849782*T*log(T) + 78950*T**(-1) + 0.0004858*T**2 - 1.393669e-06*T**3, And(T < 922.205302616508, 298.15 <= T)), (-11530.1836392866 + 203.816215*T - 34.3088*T*log(T) + 1.038192e+28*T**(-9), And(T < 3000.0, 922.205302616508 <= T)), (0, True)), ('MG', 'HCP_A3'): Piecewise((GHSERMG, And(1.0 <= T, T < 10000.0)), (0, True)), ('MG', 'LIQUID'): Piecewise((-2555.58510336379 - 7.6943066168765*T + 3.2404446864*T*log(-1.0 + exp(95.82831/T)) + 21.6535319868*T*log(-1.0 + exp(247.8675/T)) - 4.63131660076452e-05*T**2 - 2.2050100179942e-06*T**3, And(T < 298.15, 0.01 <= T)), (-165.096999676889 + 134.838617*T - 26.1849782*T*log(T) + 78950*T**(-1) + 0.0004858*T**2 - 1.393669e-06*T**3 - 8.0176e-20*T**7, And(T < 922.205302616508, 298.15 <= T)), (-5439.86911093575 + 195.324057*T - 34.3088*T*log(T), And(T < 10000.0, 922.205302616508 <= T)), (0, True))}, 'SR2016Stable': {'CU': Piecewise((-11038.0904080745 + 8.7685671186*T*log(-1.0 + exp(155.1404/T)) + 16.1968683846*T*log(-1.0 + exp(290.9421/T)) - 0.0010514335*T**2, And(T < 103.57591, 0.01 <= T)), (-11042.8822142647 + 0.574637617323048*T - 0.13879113947248*T*log(T) + 8.7685671186*T*log(-1.0 + exp(155.1404/T)) + 16.1968683846*T*log(-1.0 + exp(290.9421/T)) + 0.000288560900942072*T**2 - 2.15621953171362e-06*T**3, And(T < 210.33309, 103.57591 <= T)), (-11002.7543747764 - 2.20049706600083*T + 0.4335558862135*T*log(T) + 8.7685671186*T*log(-1.0 + exp(155.1404/T)) + 16.1968683846*T*log(-1.0 + exp(290.9421/T)) - 0.002432585*T**2, And(T < 1357.77, 210.33309 <= T)), (-12730.2995781851 + 183.555483717662*T - 31.38*T*log(T) + 7.42232714807953e+28*T**(-9), And(T < 3200.0, 1357.77 <= T)), (0, True)), 'MG': Piecewise((-10652.1012810789 + 3.2404446864*T*log(-1.0 + exp(95.82831/T)) + 21.6535319868*T*log(-1.0 + exp(247.8675/T)) + 0.0047195465*T**2, And(T < 36.71926, 0.01 <= T)), (-10653.6226154894 + 0.385723396310737*T - 0.124294531845816*T*log(T) + 3.2404446864*T*log(-1.0 + exp(95.82831/T)) + 21.6535319868*T*log(-1.0 + exp(247.8675/T)) + 0.00810454205399037*T**2 - 1.53643054262276e-05*T**3, And(T < 143.18844, 36.71926 <= T)), (-10563.4100984519 - 8.0518972866125*T + 1.765785080115*T*log(T) + 3.2404446864*T*log(-1.0 + exp(95.82831/T)) + 21.6535319868*T*log(-1.0 + exp(247.8675/T)) - 0.0050954035*T**2, And(T < 922.205302616508, 143.18844 <= T)), (-13775.4156328263 + 204.341485347575*T - 34.3088*T*log(T) + 9.4687256586798e+27*T**(-9), And(T < 10000.0, 922.205302616508 <= T)), (0, True))}, 'Symbol': <class 'symengine.lib.symengine_wrapper.Symbol'>, 'T': T, '__annotations__': {}, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BaseExceptionGroup': <class 'BaseExceptionGroup'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EOFError': <class 'EOFError'>, 'Ellipsis': Ellipsis, 'EncodingWarning': <class 'EncodingWarning'>, 'EnvironmentError': <class 'OSError'>, 'Exception': <class 'Exception'>, 'ExceptionGroup': <class 'ExceptionGroup'>, 'False': False, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'FutureWarning': <class 'FutureWarning'>, 'GeneratorExit': <class 'GeneratorExit'>, 'IOError': <class 'OSError'>, 'ImportError': <class 'ImportError'>, 'ImportWarning': <class 'ImportWarning'>, 'IndentationError': <class 'IndentationError'>, 'IndexError': <class 'IndexError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'KeyError': <class 'KeyError'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NameError': <class 'NameError'>, 'None': None, 'NotADirectoryError': <class 'NotADirectoryError'>, 'NotImplemented': NotImplemented, 'NotImplementedError': <class 'NotImplementedError'>, 'OSError': <class 'OSError'>, 'OverflowError': <class 'OverflowError'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, types, exceptions, and other objects.\n\nThis module provides direct access to all 'built-in'\nidentifiers of Python; for example, builtins.len is\nthe full name for the built-in function len().\n\nThis module is not normally accessed explicitly by most\napplications, but can be useful in modules that provide\nobjects with the same name as a built-in value, but in\nwhich the built-in of that name is also needed.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'aiter': <built-in function aiter>, 'all': <built-in function all>, 'anext': <built-in function anext>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2023 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <class 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <class 'range'>, 'repr': <built-in function repr>, 'reversed': <class 'reversed'>, 'round': <built-in function round>, 'set': <class 'set'>, 'setattr': <built-in function setattr>, 'slice': <class 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'sum': <built-in function sum>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'vars': <built-in function vars>, 'zip': <class 'zip'>}, '__cached__': '/home/docs/checkouts/readthedocs.org/user_builds/espei/checkouts/latest/espei/__pycache__/refdata.cpython-312.pyc', '__doc__': '\nThe refdata module contains pure-element reference state data.\n', '__file__': '/home/docs/checkouts/readthedocs.org/user_builds/espei/checkouts/latest/espei/refdata.py', '__loader__': <_frozen_importlib_external.SourceFileLoader object>, '__name__': 'espei.refdata', '__package__': 'espei', '__spec__': ModuleSpec(name='espei.refdata', loader=<_frozen_importlib_external.SourceFileLoader object>, origin='/home/docs/checkouts/readthedocs.org/user_builds/espei/checkouts/latest/espei/refdata.py'), '__warningregistry__': {'version': 150}, 'exp': <cyfunction exp>, 'find_and_insert_user_refstate': <function find_and_insert_user_refstate>, 'log': <class 'symengine.lib.symengine_wrapper.log'>})#

Discover user reference states entered as a setuptools entry_point

Parameters:
  • entry_point_plugin_name (str) – Name of the key in the setuptools.setup entry_points dictionary.

  • namespace (dict) – A dictionary that the stable reference state and lattice stabilities will be added to. Defaults to globals(), which is this module’s namespace.

Notes

By default, it will enter the data into the globals() namespace, meaning this module’s namespace. Since ESPEI looks up reference states by something like getattr(espei.refdata, 'SGTE91Stable'), this is usually the desired behavior.

Some helpful links on how this works:

Packages wanting to hook into this should add the following keyword argument to their setuptools.setup function call in their setup.py file: entry_points={'espei.reference_states': 'BOCK2015 = refstate'}, where BOCK2015 is the name of the reference state and refstate is the name of the module containing the dictionaries for BOCK2015Stable, BOCK2015 and BOCK2015SER, which define the reference states.

espei.rstate module#

espei.shadow_functions module#

Fast versions of equilibrium and calculate that “override” the equivalent pycalphad functions for very fast performance.

espei.shadow_functions.calculate_(species: Sequence[Species], phases: Sequence[str], str_statevar_dict: Dict[str, ndarray], models: Dict[str, Model], phase_records: Dict[str, PhaseRecord], output: str | None = 'GM', points: Dict[str, ndarray] | None = None, pdens: int | None = 50, broadcast: bool | None = True, fake_points: bool | None = False) LightDataset#

Quickly sample phase internal degree of freedom with virtually no overhead.

espei.shadow_functions.constrained_equilibrium(phase_records: Dict[str, PhaseRecord], conditions: Dict[StateVariable, ndarray], grid: LightDataset)#

Perform an equilibrium calculation with just a single composition set that is constrained to the global composition condition

espei.shadow_functions.equilibrium_(phase_records: Dict[str, PhaseRecord], conditions: Dict[StateVariable, ndarray], grid: LightDataset) LightDataset#

Perform a fast equilibrium calculation with virtually no overhead.

espei.shadow_functions.no_op_equilibrium_(phase_records: Dict[str, PhaseRecord], conditions: Dict[StateVariable, ndarray], grid: LightDataset) LightDataset#

Perform a fast “equilibrium” calculation with virtually no overhead that doesn’t refine the solution or do global minimization, but just returns the starting point.

Notes

Uses a placeholder first argument for the same signature as _equilibrium, but species are not needed.

espei.shadow_functions.update_phase_record_parameters(phase_records: Dict[str, PhaseRecord], parameters: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) None#

espei.sublattice_tools module#

Utilities for manipulating sublattice models.

espei.sublattice_tools.canonical_sort_key(x)#

Wrap strings in tuples so they’ll sort.

Parameters:

x (list) – List of strings to sort

Returns:

tuple of strings that can be sorted

Return type:

tuple

espei.sublattice_tools.canonicalize(configuration, equivalent_sublattices)#

Sort a sequence with symmetry. This routine gives the sequence a deterministic ordering while respecting symmetry.

Parameters:
  • configuration ([str]) – Sublattice configuration to sort.

  • equivalent_sublattices ({{int}}) – Indices of ‘configuration’ which should be equivalent by symmetry, i.e., [[0, 4], [1, 2, 3]] means permuting elements 0 and 4, or 1, 2 and 3, respectively, has no effect on the equivalence of the sequence.

Returns:

sorted tuple that has been canonicalized.

Return type:

str

espei.sublattice_tools.endmembers_from_interaction(configuration)#

For a given configuration with possible interactions, return all the endmembers

espei.sublattice_tools.generate_endmembers(sublattice_model, symmetry=None)#

Return all the unique endmembers by symmetry for a given sublattice model.

Parameters:
  • sublattice_model (list of lists) – General sublattice model, with each sublattice as a sublist.

  • symmetry (list of lists, optional) – List of lists containing symmetrically equivalent sublattice indices. If None (default), all endmembers will be returned.

Returns:

List of endmember tuples

Return type:

list

Examples

>>> subl_model = [['A', 'B'], ['A','B']]
>>> generate_endmembers(subl_model)  # four endmembers
[('A', 'A'), ('A', 'B'), ('B', 'A'), ('B', 'B')]
>>> # three endmembers, ('A', 'B') is equivalent to ('B', 'A') by symmetry.
>>> generate_endmembers(subl_model, [[0, 1]])  # the first and second sublattices are symmetrically equivalent.
[('A', 'A'), ('A', 'B'), ('B', 'B')]
espei.sublattice_tools.generate_interactions(endmembers, order, symmetry, forbid_cross_interactions=None)#

Returns a list of sorted interactions of a certain order

Parameters:
  • endmembers (list) – List of tuples/strings of all endmembers (including symmetrically equivalent)

  • order (int) – Highest expected interaction order, e.g. ternary interactions should be 3

  • symmetry (list of lists) – List of lists containing symmetrically equivalent sublattice indices, e.g. [[0, 1], [2, 3]] means that sublattices 0 and 1 are equivalent and sublattices 2 and 3 are also equivalent.

  • forbid_cross_interactions (Optiona[bool]) – If True, will prevent cross interations from being generated. If None, automatically determine based on the symmetry. If there is no symmetry, cross interactions are forbidden. Symmetry usually implies that there is a disordered state that is interesting, so cross interactions are allowed.

Returns:

List of interaction tuples, e.g. [(‘A’, (‘A’, ‘B’))]

Return type:

list

espei.sublattice_tools.generate_symmetric_group(configuration: Sequence[Any], symmetry: None | Sequence[Sequence[int]])#

For a particular configuration and list of sublattices that are symmetric, generate all the symmetrically equivalent configurations.

Parameters:
  • configuration (Sequence[Any]) – Typically a constituent array. The length should correspond to the number of sublattices in the phase.

  • symmetry (Union[None, Sequence[Sequence[int]]]) – A list of lists giving the indices of symmetrically equivalent sublattices. For example: a symmetry of [[0, 1, 2, 3]] means that the first four sublattices are symmetric to each other. If multiple sublattices are given, the sublattices are internally equivalent and the sublattices themselves are assumed interchangeble. That is, for a symmetry of [[0, 1], [2, 3]], sublattices 0 and 1 are equivalent to each other (i.e. [0, 1] == [1, 0]) and similarly for sublattices 2 and 3. It also implies that the sublattices are interchangeable, (i.e. [[0, 1], [2, 3]] == [[2, 3], [0, 1]]), but note that constituents cannot change sublattices (i.e. [[0, 1], [2, 3]] != [[0, 3], [2, 1]]). If symmetry=None is given, no new configurations are generated.

Returns:

Tuple of configuration tuples that are all symmetrically equivalent.

Return type:

tuple

Notes

In the general case, equivalency between sublattices, for example ([[0, 1], [2, 3]] == [[2, 3], [0, 1]]), is not necessarily required. It could be that sublattices 0 and 1 represent equivalent substitutional sublattices, while 2 and 3 represent equivalent interstitial sites. Interchanging sublattices between substitutional sublattices is allowed, but the substitutional sites would not be interchangeable with the interstitial sites. To achieve this kind of effect with this function, you would need to call it once with the equivalent substitutional sublattices, then for each generated configuration, call this function again, giving the unique configurations for symmetric interstitial sublattices.

espei.sublattice_tools.interaction_test(configuration, order=None)#

Returns True if the configuration has an interaction

Parameters:

order (int, optional) – Specific order to check for. E.g. a value of 3 checks for ternary interactions

Returns:

True if there is an interaction.

Return type:

bool

Examples

>>> configuration = [['A'], ['A','B']]
>>> interaction_test(configuration)
True
>>> interaction_test(configuration, order=2)
True
>>> interaction_test(configuration, order=3)
False
espei.sublattice_tools.recursive_tuplify(x)#

Recursively convert a nested list to a tuple

espei.sublattice_tools.sorted_interactions(interactions, max_interaction_order, symmetry)#

Return interactions sorted by interaction order

Parameters:
  • interactions (list) – List of tuples/strings of potential interactions

  • max_interaction_order (int) – Highest expected interaction order, e.g. ternary interactions should be 3

  • symmetry (list of lists) – List of lists containing symmetrically equivalent sublattice indices, e.g. [[0, 1], [2, 3]] means that sublattices 0 and 1 are equivalent and sublattices 2 and 3 are also equivalent.

Returns:

Sorted list of interactions

Return type:

list

Notes

Sort by number of full interactions, e.g. (A:A,B) is before (A,B:A,B) The goal is to return a sort key that can sort through multiple interaction orders, e.g. (A:A,B,C), which should be before (A,B:A,B,C), which should be before (A,B,C:A,B,C).

espei.sublattice_tools.tuplify(x)#

Convert a list to a tuple, or wrap an object in a tuple if it’s not a list or tuple.

espei.typing module#

espei.utils module#

Utilities for ESPEI

Classes and functions defined here should have some reuse potential.

class espei.utils.ErrorModel(*args, **kwargs)#

Bases: Model

The only purpose of this class is to raise an exception when getting the molar Gibbs energy

It is used by the tests.

class espei.utils.ImmediateClient(address=None, loop=None, timeout=_NoDefault.no_default, set_as_default=True, scheduler_file=None, security=None, asynchronous=False, name=None, heartbeat_interval=None, serializers=None, deserializers=None, extensions={'pubsub': <class 'distributed.pubsub.PubSubClientExtension'>}, direct_to_workers=None, connection_limit=512, **kwargs)#

Bases: Client

A subclass of distributed.Client that automatically unwraps the Futures returned by map.

map(f, *iterators, **kwargs)#

Map a function on a sequence of arguments.

Any keyword arguments are passed to distributed.Client.map

exception espei.utils.ModelTestException#

Bases: Exception

class espei.utils.PickleableTinyDB(*args, **kwargs)#

Bases: TinyDB

A pickleable version of TinyDB that uses MemoryStorage as a default.

espei.utils.bib_marker_map(bib_keys, markers=None)#

Return a dict with reference keys and marker dicts

Parameters:
  • bib_keys

  • markers (list) – List of 2-tuples of (‘fillstyle’, ‘marker’) e.g. [(‘top’, ‘o’), (‘full’, ‘s’)]. Defaults to cycling through the filled markers, the different fill styles.

Returns:

Dictionary with bib_keys as keys, dict values of formatted strings and marker dicts

Return type:

dict

Examples

>>> mm = bib_marker_map(['otis2016', 'bocklund2018'])
>>> mm == {'bocklund2018': {'formatted': 'bocklund2018', 'markers': {'fillstyle': 'none', 'marker': 'o'}}, 'otis2016': {'formatted': 'otis2016', 'markers': {'fillstyle': 'none', 'marker': 'v'}}}
True
espei.utils.build_sitefractions(phase_name, sublattice_configurations, sublattice_occupancies)#

Convert nested lists of sublattice configurations and occupancies to a list of dictionaries. The dictionaries map SiteFraction symbols to occupancy values. Note that zero occupancy site fractions will need to be added separately since the total degrees of freedom aren’t known in this function.

Parameters:
  • phase_name (str) – Name of the phase

  • sublattice_configurations ([[str]]) – sublattice configuration

  • sublattice_occupancies ([[float]]) – occupancy of each sublattice

Returns:

a list of site fractions over sublattices

Return type:

[[float]]

espei.utils.database_symbols_to_fit(dbf, symbol_regex='^V[V]?([0-9]+)$')#

Return names of the symbols to fit that match the regular expression

Parameters:
  • dbf (Database) – pycalphad Database

  • symbol_regex (str) – Regular expression of the fitting symbols. Defaults to V or VV followed by one or more numbers.

Returns:

Context dictionary for different methods of calculation the error.

Return type:

dict

espei.utils.extract_aliases(phase_models)#

Map possible phase name aliases to the desired phase model phase name.

This function enforces that each alias is only claimed by one phase. Each phase name in the phase models is added as an alias for itself to support an “identity” operation.

Parameters:

phase_models – Phase models ESPEI uses to initialize databases. Must contain a mapping of phase names to phase data (sublattices, site ratios, aliases)

Return type:

Dict[str, str]

espei.utils.formatted_constituent_array(constituent_array)#

Given a constituent array of Species, return the classic CALPHAD-style interaction.

Parameters:

constituent_array (list) – List of sublattices, which are lists of Species in that sublattice

Returns:

String of the constituent array formatted in the classic CALPHAD style

Return type:

str

Examples

>>> from pycalphad import variables as v
>>> const_array = [[v.Species('CU'), v.Species('MG')], [v.Species('MG')]]
>>> formatted_constituent_array(const_array)
'CU,MG:MG'
espei.utils.formatted_parameter(dbf, symbol, unique=True)#

Get the deconstructed pretty parts of the parameter/term a symbol belongs to in a Database.

Parameters:
  • dbf (pycalphad.Database) –

  • symbol (string or symengine.Symbol) – Symbol in the Database to get the parameter for.

  • unique (bool) – If True, will raise if more than one parameter containing the symbol is found.

Returns:

A named tuple with the following attributes: phase_name, interaction, symbol, term, parameter_type or term_symbol (which is just the Symbol * temperature term)

Return type:

FormattedParameter

espei.utils.get_model_dict(phase_models: dict) Dict[str, Type[Model]]#

Return a pycalphad-style model dictionary mapping phase names to model classes.

If a phase’s “model” key is not specified, no entry is created. In practice, the behavior of the defaults would be handled by pycalphad.

Parameters:

phase_models (dict) – ESPEI-style phase models dictionary

Return type:

Any

espei.utils.import_qualified_object(obj_path: str) Any#

Import an object from a fully qualified import path.

Examples

>>> from espei.utils import import_qualified_object
>>> Mod = import_qualified_object('pycalphad.model.Model')
>>> from pycalphad.model import Model
>>> assert Mod is Model
espei.utils.optimal_parameters(trace_array, lnprob_array, kth=0)#

Return the optimal parameters in the trace based on the highest likelihood. If kth is specified, return the kth set of unique optimal parameters.

Parameters:
  • trace_array (ndarray) – Array of shape (number of chains, iterations, number of parameters)

  • lnprob_array (ndarray) – Array of shape (number of chains, iterations)

  • kth (int) – Zero-indexed optimum. 0 (the default) is the most optimal solution. 1 is the second most optimal, etc.. Only unique solutions will be returned.

Return type:

Array of optimal parameters

Notes

It is ok if the calculation did not finish and the arrays are padded with zeros. The number of chains and iterations in the trace and lnprob arrays must match.

Examples

>>> from espei.utils import optimal_parameters
>>> trace = np.array([[[1, 0], [2, 0], [3, 0], [0, 0]], [[0, 2], [0, 4], [0, 6], [0, 0]]])  # 3 iterations of 4 allocated
>>> lnprob = np.array([[-6, -4, -2, 0], [-3, -1, -2, 0]])
>>> np.all(np.isclose(optimal_parameters(trace, lnprob), np.array([0, 4])))
True
espei.utils.parameter_term(expression, symbol)#

Determine the term, e.g. T*log(T) that belongs to the symbol in expression

Parameters:
  • expression

  • symbol

espei.utils.sigfigs(x, n)#

Round x to n significant digits

espei.utils.unpack_piecewise(x)#

espei.validation module#

Module contents#

ESPEI