Giter VIP home page Giter VIP logo

Comments (7)

richardotis avatar richardotis commented on May 23, 2024

Hi ∃teslos,

Thank you for your report (#1!). The problem is that plotting was
semi-intentionally broken in recent commits while I am rewriting the
equilibrium module. binplot(which I removed from init.py but it
still exists in pycalphad.plot.binary) relies on a function called eq()
which is a bit of a mess while I'm rewriting it for performance reasons.

I have started getting many more inquiries like yours in recent weeks,
and I'm starting to realize I cannot treat pycalphad like a small
personal project anymore (which is very exciting). Once I have
re-stabilized the equilibrium module, I will split off my next set of
features (improved miscibility gap detection) into a develop branch
while I'm working on them.

I should be able to finish this over the weekend. Once I do, I will push
a new commit and notify you.

Again, thanks for reaching out. It's very motivating to have people
showing interest in pycalphad, even if (especially if) it's to report bugs!

Regards,

Richard Otis

On 12/12/2014 11:11 AM, ∃teslos wrote:

Dear Richard,

The pycalphad is really great project, so I wanted to test it out. I
do have problems with the pycalphad examples. I am running Mac Pro
with Python 2.7.8 (default, Nov 12 2014, 14:36:21)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin, with
standard scipy stack.
When I run BinTest for example I get:

|ImportError Traceback (most recent call last)
in ()
1 get_ipython().magic(u'matplotlib inline')
----> 2 from pycalphad import Database, binplot
3
4 db = Database('alzn_mey.tdb')
5 my_phases = ['FCC_A1', 'HCP_A3', 'LIQUID']

ImportError: cannot import name binplot
|

It seems that binplot is not found. I did installation with: python
setup.py install from current github repository.

Thank you very much for your help, and keep up the great work!
Best regards,
∃t


Reply to this email directly or view it on GitHub
richardotis#1.

from pycalphad.

Teslos avatar Teslos commented on May 23, 2024

Dear Richard,

Thank you for reply! I read the code and saw that optimiser is implemented in C++.
Which algorithm have you used for the Gibss energy minimization? I would be interested in the
Gibbs energy minimiser with additional thermodynamic constraints like surface area...
(see for example) in R. Pajarre et al. / Computer Coupling of Phase Diagrams and Thermochemistry 30 (2006) 196–200.

Best regards,
∃t

from pycalphad.

richardotis avatar richardotis commented on May 23, 2024

The original optimizer is in C++ but everything has since been rewritten to use Python. The C++ code is still sitting in master because it was convenient for me to reference during porting, but I should remove it soon.

The minimization routine uses an approach based upon calculating the convex hull of the Gibbs energy surfaces of all phases. It's similar conceptually to Prevevoschikova et al, 2012, http://www.sciencedirect.com/science/article/pii/S0927025612001978

However my approach lets you handle phases with multiple sublattices and other internal degrees of freedom, so you can treat phases with variable degrees of ordering correctly. We can also do sophisticated constraints and automatically detect miscibility gaps. So far only constant composition, T and P constraints are supported.

I saw in one of your repos you want to work with surface energies and ionic liquids. My algorithm allows for charged species but I haven't implemented it yet. It is possible to handle surface terms by subclassing Model and adding new routines that take surface energy terms from Database objects and constructs a SymPy object. Once I have finalized the interface for Model I will write an example to show how to do that.

If you want to add an additional degree of freedom to G like a particle radius that gets dynamically calculated during minimization, it will hopefully be possible once I've finished restructuring the equilibrium module. Once I've fixed this bug we can open new issues to track progress on some of the new features you're interested in.

from pycalphad.

richardotis avatar richardotis commented on May 23, 2024

Also, it would be great if you could install nose and run "nosetests" in the pycalphad directory to verify that all the unit tests pass. That way we can be sure you won't run into any other issues after I've applied the fix.

from pycalphad.

Teslos avatar Teslos commented on May 23, 2024

I never used nose unit tests but I think that is very good idea. Do you plan to have unit tests in your main repo or you mean that I have my own unit tests in my own branch..

The repo ChemSurf was simple implementation of additional surface energies for the 2 component system. By using Thermocalc TQ interface I could add surface gibbs energy to bulk gibbs energy and use the Thermocalc minimiser (which is proprietary) to calculate phase diagrams. But this works only for
2 component systems, for higher systems it is necessary to get surface area e.a. particle radius as constraint to calculate a phase equilibrium.

BR
∃t

from pycalphad.

richardotis avatar richardotis commented on May 23, 2024

In this case I just mean to run the unit tests that are already in the pycalphad master branch. I haven't configured the buildbot to test on OSX (only on Linux so far), so verifying that tests/test_energy.py has passing tests on your machine makes it more likely that everything will work.

from pycalphad.

richardotis avatar richardotis commented on May 23, 2024

Please check that the latest commit fixes your problem. If not you should reopen this issue. If you find a different bug or want to work on some of the features we talked about, you can open them as separate issues.

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.