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

Charged phases that cannot charge balance raise errors #503

Open
bocklund opened this issue Dec 13, 2023 Discussed in #502 · 3 comments · May be fixed by #432
Open

Charged phases that cannot charge balance raise errors #503

bocklund opened this issue Dec 13, 2023 Discussed in #502 · 3 comments · May be fixed by #432

Comments

@bocklund
Copy link
Collaborator

Discussed in #502

Originally posted by zliang1990 December 13, 2023
Hi Richard (@richardotis),

My name is Zhi Liang, Materials Design Engineer in QuesTek. When I recently attempted to run the attached V-O description (GitHub does not support .TDB so I zipped it) with Pycalphad, I noticed that the following error message will pop up if I only choose oxygen (and vacancy) as elements.

Upon debugging, it seems to do with the HALITE phase, whose sublattice model is V,V+2,V+3,VA : O-2,VA. When only choosing oxygen, first sublattice only allows VA while second sublattice allows O-2 and VA, which seemingly triggers the following error message. This issue can be a blocker if in a multicomponent system, certain phase only has sublattice model A,VA : O-2,VA, but the element selection only has element B and oxygen, and this error message will pop up as well (Sorry that I cannot provide our multicomponent database since it is proprietary).

Could you please help to see how we can resolve this?

Thanks!

Best,
Zhi

image
15YANG_V-O description.zip

@bocklund bocklund changed the title Pycalphad error message on phases with sublattices having vacancies on both sublattices Charged phases that cannot charge balance raise errors Dec 13, 2023
@bocklund
Copy link
Collaborator Author

From #502:

What's happening here is that when only vacancies and oxygen are entered as elements PyCalphad is treating CORUNDUM and HALITE as active phases (because there are active species in each sublattice).

For both phases, it's impossible to charge balance given these components (pure vacancy endmembers don't count, such as in the case for HALITE) and that gives array size errors because there are no feasible points. I'm creating an issue for this, since it's a bug. We should probably prevent phases that cannot charge balance from being included in the active set of phases.

@richardotis
Copy link
Collaborator

This should be easy to fix with the new sampler, as it only samples the feasible subspace of points. For these cases it would find no solution, so it would be easy to raise an error (or return zero points) so the phase is automatically excluded from the active set.

richardotis added a commit to richardotis/pycalphad that referenced this issue Dec 29, 2023
… is specified that causes the phase to have zero feasible points. Fixes pycalphadgh-503
@richardotis richardotis linked a pull request Dec 29, 2023 that will close this issue
2 tasks
@richardotis
Copy link
Collaborator

This is now fixed in #432

richardotis referenced this issue in sorkins/richardotis-pycalphad Dec 29, 2023
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 a pull request may close this issue.

2 participants