Skip to content

ENH: Add Species support to parameter generation - #298

Open
bocklund wants to merge 2 commits into
PhasesResearchLab:masterfrom
bocklund:species-support
Open

bocklund wants to merge 2 commits into
PhasesResearchLab:masterfrom
bocklund:species-support

Conversation

@bocklund

Copy link
Copy Markdown
Member
  1. Phase models files can now provide a "species" key as input with a dictionary mapping species names to constituent elements and charge, mirroring how PyCalphad constructs species
  2. Species are now supported in database / parameter generation. Ionic liquids are not yet supported, but the current approach is amenable to that (we need to break ESPEI's assumption of constant site ratios to support ionic liquids and allow for adding model hints in phase models)
  3. Species are supported in the input data checker. "components" should be pure elements. Phase constituents (which can be elements or species) can be used in specifying site fractions.
  4. Better error when an element is not present in reference data (e.g. H which doesn't have an entry in ESPEI's SGTE91 data)

These changes need PyCalphad develop at or after 8a1a2c45 (#755) to get fixes for reference state support when the reference phase has multiple species for the pure component (e.g. oxygen GAS may have (O, O2, O3)) - PyCalphad and ESPEI use the lowest energy endmember here rather than computing internal equilibrium.

Fixed-configuration residuals sorted site fractions by species name, but
pycalphad sorts Model.site_fractions by escaped name (CU+1 -> CU_POS1).
Species whose escaped names sort differently, e.g. CU+1 and CU2O, had their
site fractions swapped.
Phase models accept `species` (name -> constituents and charge), which are
added to the Database. Components must be elements, and species constituents
must be components or input database elements.

Datasets list elements as components. Species in sublattice configurations are
looked up by name in the phase model and input database species, never parsed
as formulas. Without species (`espei --check-datasets` without the new
`--phase-models`), unresolved names emit a DatasetWarning and the dataset's
components are not checked.

Parameter generation references species endmembers to the GHSER functions of
their elements and finds existing parameters by species name. Elements without
reference data raise a ValueError unless the input database defines their
GHSER function. VA and /- get no GHSER function.

Species names in components are now an error.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant