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
calculating activities of ternary system #279
Comments
Hi @dpttw, if all of your output chemical potentials are |
This might be caused by |
Very small or zero conditions will be silently changed to be within numerical limits: pycalphad/pycalphad/core/equilibrium.py Lines 27 to 28 in d217b4b
However, even that change will give you |
@richardotis you're right. Maybe this is another example case of #271, but instead of converging to a wrong answer, it doesn't converge at all. Anecdotally, I've seen this come up several times. |
Checking this with the development version ( dbf = Database('mc_ni_v2.034.pycalphad.tdb')
comps = ['NI', 'AL', 'CR', 'VA']
phases = sorted(set(dbf.phases.keys()) - {'BCC_B2'}) # workaround for https://github.com/pycalphad/pycalphad/issues/345
ref_eq = equilibrium(dbf, comps, phases, {v.X('AL'): 1-2e-10, v.X('CR'): 0, v.T: 674, v.P: 101325}) One possible solution to this issue is analogous to how we modify |
It looks like it's not solver related, but it's because the solver doesn't even run because of this check: pycalphad/pycalphad/core/eqsolver.pyx Line 197 in 373d121
|
Not that this doesn't affect the solver as well - I commented out that check and it still fails to converge. It looks like the |
Hi,
I followed the example to calculate the activities of Ni-Al-Cr
setup: ref_eq = equilibrium(TDB, elements, AllPhases, {v.X('AL'): 1, v.X('CR'): 0, v.T: 674, v.P: 101325})
result:
(N: 1, P: 1, T: 1, X_AL: 1, X_CR: 1, vertex: 4, component: 3)
refeq.MU.values.ravel(): [nan nan nan]
engine: pycalphad 0.8.3
Is there anything I am missing?
The text was updated successfully, but these errors were encountered: