Repository navigation
FIX: Fix fraction of solid when multiple solids are forming - #65
Merged
bocklund merged 2 commits intoOct 21, 2026
Merged
Conversation
…ing the step Each step equilibrates the remaining liquid, so each solid phase forms (1 - fs at the start of the step) * NP(phase). The fraction solid was updated inside the loop over stable phases, so every solid phase after the first was scaled by liquid already reduced by the previous phases. When two or more solid phases formed in one step, this undercounted the solid, broke mass balance, and made per-phase amounts depend on phase order. Add a test against the exact Scheil solution for an ideal liquid with pure-element solids, which goes through ALPHA + BETA forming together, and a mass balance test on the Chen A-B-C ternary monovariant. Reported in pycalphad#64.
GitHub Actions runners now use ubuntu-26.04 instead of ubuntu-24.04. System Python is upgraded from 3.12 to 3.14 and scheil depends on PyCalphad, which only installs well on <=3.13 right now because its symengine pin on 0.13 doesn't have 3.14+ wheels. This causes our smoke tests and doc builds to fail in CI. This pins the Python version for smoke tests and doc builds in CI, following pycalphad/pycalphad#748.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When more than one solid formed during Scheil solidification simulations, fraction of solid was updated in a way that double counted the
current_fraction_solid(the amount of solid accumulating in each time step). This PR makes the fix suggested in #64 and adds a test using pure solids that where the fractions of solid, liquid, and phase compositions can be known exactly.Closes #64.
Thanks to @BRZ1028 for reporting!