Giter VIP home page Giter VIP logo

Comments (9)

richardotis avatar richardotis commented on May 27, 2024

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.

bocklund avatar bocklund commented on May 27, 2024

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.

richardotis avatar richardotis commented on May 27, 2024

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.

bocklund avatar bocklund commented on May 27, 2024

from pycalphad.

bocklund avatar bocklund commented on May 27, 2024

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.

bocklund avatar bocklund commented on May 27, 2024

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.

Cr-Ti-V

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.

bocklund avatar bocklund commented on May 27, 2024

Thermo-Calc actually has some trouble with the BCC miscibility gap also

tc-ti-cr-v

from pycalphad.

bocklund avatar bocklund commented on May 27, 2024

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.

richardotis avatar richardotis commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.