{"action":"created","issue":{"url":"https://api.github.com/repos/idaholab/moose/issues/5787","labels_url":"https://api.github.com/repos/idaholab/moose/issues/5787/labels{/name}","comments_url":"https://api.github.com/repos/idaholab/moose/issues/5787/comments","events_url":"https://api.github.com/repos/idaholab/moose/issues/5787/events","html_url":"https://github.com/idaholab/moose/issues/5787","id":110253791,"number":5787,"title":"Add PyCALPHAD as an (optional?) submodule and add interface class to the phase field module","user":{"login":"dschwen","id":202302,"avatar_url":"https://avatars.githubusercontent.com/u/202302?v=3","gravatar_id":"","url":"https://api.github.com/users/dschwen","html_url":"https://github.com/dschwen","followers_url":"https://api.github.com/users/dschwen/followers","following_url":"https://api.github.com/users/dschwen/following{/other_user}","gists_url":"https://api.github.com/users/dschwen/gists{/gist_id}","starred_url":"https://api.github.com/users/dschwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschwen/subscriptions","organizations_url":"https://api.github.com/users/dschwen/orgs","repos_url":"https://api.github.com/users/dschwen/repos","events_url":"https://api.github.com/users/dschwen/events{/privacy}","received_events_url":"https://api.github.com/users/dschwen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/idaholab/moose/labels/C:%20Modules","name":"C: Modules","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"dschwen","id":202302,"avatar_url":"https://avatars.githubusercontent.com/u/202302?v=3","gravatar_id":"","url":"https://api.github.com/users/dschwen","html_url":"https://github.com/dschwen","followers_url":"https://api.github.com/users/dschwen/followers","following_url":"https://api.github.com/users/dschwen/following{/other_user}","gists_url":"https://api.github.com/users/dschwen/gists{/gist_id}","starred_url":"https://api.github.com/users/dschwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschwen/subscriptions","organizations_url":"https://api.github.com/users/dschwen/orgs","repos_url":"https://api.github.com/users/dschwen/repos","events_url":"https://api.github.com/users/dschwen/events{/privacy}","received_events_url":"https://api.github.com/users/dschwen/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-10-07T15:36:34Z","updated_at":"2015-10-07T16:20:48Z","closed_at":null,"body":"I just met @richardotis, the developer of https://github.com/richardotis/pycalphad at a conference. This package can give us free energy expressions from standardized TDB CALPHAD data files. The package deals with parsing the database files and can construct an AST for the free energy expression for us. We can translate this into a auto-diffable expression for example using ```ExpressionBuilder```.\r\n\r\nI'm thinking of resurrecting @aeslaughter's PR where he demoed python calls from C++ (@friedmud you are probably not going to like this ;-) ).\r\n\r\nAt first glance the PyCALPHAD code looks great. It is documented, is on GitHub, has unit tests (!), and examples. Here is a talk on the code from this year's SciPy conference: https://www.youtube.com/watch?v=iT1qeGg6Qbs\r\n\r\nThis is _big_. It will give us a capability we've been meaning to add for quite a while now."},"comment":{"url":"https://api.github.com/repos/idaholab/moose/issues/comments/146250425","html_url":"https://github.com/idaholab/moose/issues/5787#issuecomment-146250425","issue_url":"https://api.github.com/repos/idaholab/moose/issues/5787","id":146250425,"user":{"login":"richardotis","id":6405510,"avatar_url":"https://avatars.githubusercontent.com/u/6405510?v=3","gravatar_id":"","url":"https://api.github.com/users/richardotis","html_url":"https://github.com/richardotis","followers_url":"https://api.github.com/users/richardotis/followers","following_url":"https://api.github.com/users/richardotis/following{/other_user}","gists_url":"https://api.github.com/users/richardotis/gists{/gist_id}","starred_url":"https://api.github.com/users/richardotis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardotis/subscriptions","organizations_url":"https://api.github.com/users/richardotis/orgs","repos_url":"https://api.github.com/users/richardotis/repos","events_url":"https://api.github.com/users/richardotis/events{/privacy}","received_events_url":"https://api.github.com/users/richardotis/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T16:20:48Z","updated_at":"2015-10-07T16:20:48Z","body":"It was a pleasure meeting you as well @dschwen. The way I would recommend doing this is using the `pycalphad.Model` class to build the AST for a particular phase ( http://pycalphad.readthedocs.org/en/latest/api/pycalphad.html#module-pycalphad.model ). You can then access the `Model.energy` or `Model.ast` attribute to get a SymPy object which represents the molar Gibbs energy. From there you can either recursively walk the AST yourself (see SymPy docs for this) or use Python's built-in `str` on the object to get a (really long) string representing the function. If you want a list of all the degrees of freedom in the function, you can access `Model.variables`."}}