Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Two sublattice ionic liquid fixes and tests #273

Merged
merged 10 commits into from Apr 20, 2020
Merged

Conversation

bocklund
Copy link
Collaborator

This PR fixes two bugs in the implementation of ionic liquid two sublattice model

  1. Neutral species in the anion sublattice can be specified in the TDB using one sublattice parameters. These are special cased now in Model to be valid parameters and to correct their sublattice index in the Redlich-Kister sum to produce the correct v.SiteFraction objects.
  2. A sorting bug was fixed in the anion lattice, where the model from Sundman [1] describes the anion sublattice being sorted by first charged species, then vacancies, then anion species. Within each species group, the species are sorted alphabetically as usual. This is changed within Model itself, rather than the TDB which sorts the parameters at parse time. Because it's specific to this implementation of the Model, I think it makes sense to put it in the Model class corresponding to any phase with the ionic_liquid_2SL model hint applied.

This PR includes

  • tests that compare the energy to the energies computed by the same database in Thermo-Calc
  • some documentation improvements and cleanup for the ionic liquid

[1] Sundman, "Modification of the two-sublattice model for liquids", Calphad 15(2) (1991) 109-119 https://doi.org/d3jppb

pycalphad/io/tdb.py Show resolved Hide resolved
@bocklund bocklund merged commit 023f957 into develop Apr 20, 2020
@bocklund bocklund deleted the fix-ionic-2sl branch Nov 24, 2020
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.

None yet

2 participants