Comments (9)
This hasn't been "fixed" but the old way of computing this diagram has been removed. The new equilibrium engine can in principle do this calculation, and it's something I'd like to reintroduce and get working well during the 0.3.x cycle for 0.4.
from pycalphad.
I tried to reproduce this using the NIMS database and was getting the error with this call to equilibrium:
equilibrium(dbf, ['CR', 'TI', 'V', 'VA'], dbf.phases.keys(), {v.T: 873, v.P: 101325, v.X('CR'): (0,1, 0.1), v.X('TI'): (0,1,0.1), })
---------------------------------------------------------------------------
UnboundLocalError Traceback (most recent call last)
<ipython-input-70-5621bdbd01a2> in <module>()
----> 1 result = equilibrium(dbf, comps, phases, {v.T: 873, v.P: 101325, v.X('CR'): (0,0.8, 0.1), v.X('TI'): (0,1,0.1), })#v.X('TI'): (0, 1, 0.1)})
/Users/brandon/Projects/pycalphad/pycalphad/core/equilibrium.py in equilibrium(dbf, comps, phases, conditions, output, model, verbose, broadcast, calc_opts, scheduler, parameters, compute_constraints, **kwargs)
340 [np.atleast_1d(sl)[ch] for ch, sl in zip(chunk, slices)])))]
341 job = delayed(_solve_eq_at_conditions, pure=False)(dbf, comps, prop_slice, phase_records,
--> 342 list(str_conds.keys()), verbose, diagnostic, compute_constraints)
343 res.append(job)
344 properties = delayed(_merge_property_slices, pure=False)(properties, chunk_grid, slices, list(str_conds.keys()), res)
/Users/brandon/Projects/pycalphad/pycalphad/core/eqsolver.pyx in pycalphad.core.eqsolver._solve_eq_at_conditions (pycalphad/core/eqsolver.c:12282)()
UnboundLocalError: local variable 'phases' referenced before assignment
I can do the binaries, but not the ternary. Am I missing something?
from pycalphad.
It looks like it's an issue with the handling for sum of compositions greater than 1. I think it's old code that got shuffled around and managed not to get caught in testing. It isn't necessary to use len(phases)
there; I think just using :
should work.
from pycalphad.
from pycalphad.
For now, I'll just patch around it. I think we'll handle this more elegantly when we add support for advanced conditions.
from pycalphad.
The plotting part of this issue is covered in #5 and #98.
There are still a fair amount of convergence failures on the triangular branch (develop branch core: 0f8f0e3) in the Cr-Ti-V database I used with the current pdens default of 500, but the solubility is much more correct. Overall this is much improved from an accuracy standpoint in the solubility region and the calculation was done in 5 minutes with the CompiledModel and 1 at. % step sizes in compositions.
There low alpha-Cr2Ti region is not so bad, but we do seem to have regressed a little in other places. Should we close this or come up some specific action items? Or maybe we could wait until after the fix memory branch is merged.
from pycalphad.
Thermo-Calc actually has some trouble with the BCC miscibility gap also
from pycalphad.
Now that I realized that #5 is for isopleth not isotherm, are there specific accuracy action items that we can set or will #98 close this?
from pycalphad.
I expect #98 will close this issue. You can put "fixes gh-98" or similar in the commit message for the squashed commit once the PR is approved, and GH will automatically close this issue when it is merged.
from pycalphad.
Related Issues (20)
- Duplicate Species name error when parsing FactSage DAT into Database HOT 4
- Solver: convergence failure in Cr-Ti-V HOT 5
- Incomplete phase diagram HOT 4
- Cannot zoom in - ternary phase diagram HOT 4
- Pseudo binary phase diagram HOT 1
- bug in core/halton.py HOT 3
- Equilibrium not correctly reached for some temperatures
- Bug with custom model calculating entropy HOT 7
- Database: parsing integer literals with leading zeros
- Issue with importing TDB file from TDBDB HOT 3
- Calculation assigns wrong colors to phases in the legend. Sorting does not help. HOT 3
- open MatCalc open database HOT 1
- Error in equilibrium with pycalphad 0.10.2 HOT 4
- Scheil solidification result problem: fraction liquid is always 1 HOT 4
- Local Equilibrium Failiure in Pycalphad 0.10.2
- Pycalphad equilibrium convergence (no phases are seen)
- Unexpected output for calculations on Python 3.11 HOT 1
- Charged phases that cannot charge balance raise errors HOT 3
- About phase diagrams in multicomponent systems
- Database: Issue importing tdb. file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycalphad.