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

WIP: Chemical potential conditions support #200

Merged
merged 106 commits into from
Mar 4, 2019
Merged

Conversation

richardotis
Copy link
Collaborator

@richardotis richardotis commented Jan 31, 2019

This PR adds a new, flexible constraint system via JIT-compiled functions. This new flexibility is used to add support for chemical potentials as conditions in an equilibrium calculation.

richardotis and others added 30 commits April 15, 2018 18:48
…traint functions to solver. Still many broken tests
richardotis and others added 20 commits February 17, 2019 17:10
@richardotis
Copy link
Collaborator Author

richardotis commented Feb 24, 2019

Thank you for the review. The quality of the code has been significantly improved.

  1. Yes, we can do grids of chemical potential calculations now. The approach for phase diagrams is largely up to you since I see no reason to put effort into the original approach with fast mapping around the corner. One question I don't know yet is the behavior for chemical potential conditions in the very dilute case (~1e-20 and below). I have not tested that case.
  2. Yes, I agree. I would like to defer this until the next advanced conditions PR so I can confirm no more design changes will be necessary in the short term.

In addition to another round of review in light of these revisions, I'd also like your concurrence explicitly on the proposed temporary SkipTest for test_dataset_can_hold_maximum_phases_allowed_by_gibbs_phase_rule.

While making changes to the solver to improve convergence, I found that the results of this test became unreliable and platform-dependent, requiring minute changes in the calculation temperature to resolve. I now believe that this test working at all was a bug, and for the given set of conditions equilibrium should never return more than two phases. Instead, the test should be rewritten to use NP conditions with temperature as a free variable. I propose that we skip this test for now and rewrite it for the NP PR.

@bocklund
Copy link
Collaborator

In addition to another round of review in light of these revisions, I'd also like your concurrence explicitly on the proposed temporary SkipTest for test_dataset_can_hold_maximum_phases_allowed_by_gibbs_phase_rule.

While making changes to the solver to improve convergence, I found that the results of this test became unreliable and platform-dependent, requiring minute changes in the calculation temperature to resolve. I now believe that this test working at all was a bug, and for the given set of conditions equilibrium should never return more than two phases. Instead, the test should be rewritten to use NP conditions with temperature as a free variable. I propose that we skip this test for now and rewrite it for the NP PR.

I think we have discussed this offline in the past and that freeing up another condition (T in this case) is the correct approach.

@richardotis richardotis merged commit 6b5e905 into develop Mar 4, 2019
@richardotis richardotis mentioned this pull request Apr 24, 2019
@bocklund bocklund deleted the advanced-conditions branch November 24, 2020 19:33
@bocklund bocklund restored the advanced-conditions branch November 24, 2020 19:33
@bocklund bocklund deleted the advanced-conditions branch March 15, 2021 03:07
bocklund added a commit to bocklund/pycalphad that referenced this pull request Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants