Comments (7)
Great to hear from you, Eli. The good news is you will be able to perform your calculations with pycalphad soon, perhaps in the next 10 days.
In the current stable version of pycalphad (0.1.1.post1), there is no way to calculate chemical potentials. The next version of pycalphad (0.2) will be released very soon, hopefully by the end of the month. The new version features a completely rewritten equilibrium engine and will always return the chemical potentials. You're correct that development is going on in the "fitting" branch, but the new solver is only 90% finished and only returns estimated potentials at the moment.
For (1), the new equilibrium()
routine will return chemical potentials as the MU
attribute. For driving force, I haven't yet added it, but you can get the same result by performing a separate equilibrium()
call with each phase by itself, then computing the difference (weighted sum of chemical potentials minus the energy of the phase by itself at that composition). I will write an example for this with the 0.2 documentation because it's a popular question.
For (2), this is possible by making repeated calls to the Model
class with the parameters
keyword argument. Example:
mod = Model(dbf, ['FE', 'C', 'VA'], 'FCC_A1', parameters={'GABCD': 1e4})
Then you pass the model
keyword argument to the equilibrium()
routine (again, not yet available in the stable version). Example:
mod = Model(dbf, ['FE', 'C', 'VA'], 'FCC_A1', parameters={'GABCD': 1e4})
phases = ['FCC_A1', 'HCP_A3', ...] # other phases here
eq = equilibrium(dbf, ['C', 'FE', 'VA'] , phases, {v.X('C'): (0, 1), v.T: (300, 1400)}, model=[{'FCC_A1': mod}, Model])
The model
argument tells pycalphad to use your special instance of Model
with the modified parameter for phase FCC_A1
and to use the defaults from the database for the other phases. You can change the parameter by making another Model
instance with a different parameter value and calling equilibrium()
again.
I will send you an e-mail when the new version is released which makes all of this possible.
P.S. By your request, the new version also features progress indicators for the user (issue #16) which can be turned on and off (on by default).
from pycalphad.
Thank you very much Richard,
I am looking forward to tho new version.
Best regards,
Eli
On Fri, Jul 24, 2015 at 4:48 PM, Richard Otis [email protected]
wrote:
Great to hear from you, Eli. The good news is you will be able to perform
your calculations with pycalphad soon, perhaps in the next 10 days.In the current stable version of pycalphad (0.1.1.post1), there is no way
to calculate chemical potentials. The next version of pycalphad (0.2) will
be released very soon, hopefully by the end of the month. The new version
features a completely rewritten equilibrium engine and will always return
the chemical potentials. You're correct that development is going on in the
"fitting" branch, but the new solver is only 90% finished and only returns
estimated potentials at the moment.For (1), the new equilibrium() routine will return chemical potentials as
the MU attribute. For driving force, I haven't yet added it, but you can
get the same result by performing a separate equilibrium() call with each
phase by itself, then computing the difference (weighted sum of chemical
potentials minus the energy of the phase by itself at that composition). I
will write an example for this with the 0.2 documentation because it's a
popular question.For (2), this is possible by making repeated calls to the Model class
with the parameters keyword argument. Example:mod = Model(dbf, ['FE', 'C', 'VA'], 'FCC_A1', parameters={'GABCD': 1e4})
Then you pass the model keyword argument to the equilibrium() routine
(again, not yet available in the stable version). Example:mod = Model(dbf, ['FE', 'C', 'VA'], 'FCC_A1', parameters={'GABCD': 1e4})
phases = ['FCC_A1', 'HCP_A3', ...] # other phases here
eq = equilibrium(dbf, ['C', 'FE', 'VA'] , phases, {v.X('C'): (0, 1), v.T: (300, 1400)}, model=[{'FCC_A1': mod}, Model])The model argument tells pycalphad to use your special instance of Model
with the modified parameter for phase FCC_A1 and to use the defaults from
the database for the other phases. You can change the parameter by making
another Model instance with a different parameter value and calling
equilibrium() again.I will send you an e-mail when the new version is released which makes all
of this possible.P.S. By your request, the new version also features progress indicators
for the user (issue #16
https://github.com/richardotis/pycalphad/issues/16) which can be turned
on and off (on by default).—
Reply to this email directly or view it on GitHub
https://github.com/richardotis/pycalphad/issues/18#issuecomment-124526944
.
from pycalphad.
@broshe, I wanted to give you an update on what is possible in pycalphad now. Check out this example of computing equilibrium carbon activity as a function of pressure: https://github.com/richardotis/pycalphad/blob/3a6fc83e973b527e797b0e4baa69106e2dc21a3e/research/BroshPressureTest.ipynb
At the moment this will only work in the latest fitting
branch, but I hope to push a stable release soon. There is a performance issue I need to work out with mapping over T, P and composition simultaneously before I'm comfortable releasing, but it otherwise works.
It should also be possible to compute driving force for phases but I don't know of a good example to try. Any suggestions?
It would be great if you could reproduce the same carbon activity calculation in Thermo-Calc to verify that the activities are correct. I don't currently have convenient access to check it.
from pycalphad.
Hi Richard,
What is the reference state for the activity calculation?
Eli
On Wed, Aug 5, 2015 at 2:13 AM, Richard Otis [email protected]
wrote:
@broshe https://github.com/broshe, I wanted to give you an update on
what is possible in pycalphad now. Check out this example of computing
equilibrium carbon activity as a function of pressure:
https://github.com/richardotis/pycalphad/blob/3a6fc83e973b527e797b0e4baa69106e2dc21a3e/research/BroshPressureTest.ipynbAt the moment this will only work in the latest fitting branch, but I
hope to push a stable release soon. There is a performance issue I need to
work out with mapping over T, P and composition simultaneously before I'm
comfortable releasing, but it otherwise works.It should also be possible to compute driving force for phases but I don't
know of a good example to try. Any suggestions?It would be great if you could reproduce the same carbon activity
calculation in Thermo-Calc to verify that the activities are correct. I
don't currently have convenient access to check it.—
Reply to this email directly or view it on GitHub
https://github.com/richardotis/pycalphad/issues/18#issuecomment-127792205
.
from pycalphad.
The reference state is the pure elements in their standard state at 300 K and 1 atm, or whatever is the reference energy you set in your TDB file. I used the default reference state in this case.
from pycalphad.
Hi Richard,
Here is the C activity relative to SER calculated with Thermo-calc:
Phase Region for:
FCC_A1
col-1=P, col-2=AC(C),
1.00000E+05 2.87082E-04
2.50098E+08 3.43702E-04
5.00095E+08 4.11376E-04
7.50092E+08 4.92240E-04
1.00009E+09 5.88842E-04
1.25009E+09 7.04217E-04
1.50008E+09 8.41978E-04
1.75008E+09 1.00643E-03
2.00008E+09 1.20270E-03
2.25008E+09 1.43688E-03
2.50008E+09 1.71624E-03
2.75007E+09 2.04941E-03
3.00007E+09 2.44668E-03
3.25007E+09 2.92025E-03
3.50006E+09 3.48467E-03
3.75006E+09 4.15723E-03
4.00006E+09 4.95845E-03
4.25006E+09 5.91275E-03
4.50006E+09 7.04914E-03
4.75005E+09 8.40209E-03
5.00005E+09 1.00125E-02
5.25005E+09 1.19290E-02
5.50004E+09 1.42094E-02
5.75004E+09 1.69221E-02
6.00004E+09 2.01484E-02
6.25004E+09 2.39849E-02
6.50004E+09 2.85461E-02
6.75003E+09 3.39678E-02
7.00003E+09 4.04112E-02
7.25003E+09 4.80674E-02
7.50002E+09 5.71628E-02
7.75002E+09 6.79661E-02
8.00002E+09 8.07956E-02
8.25002E+09 9.60286E-02
8.50002E+09 1.14112E-01
8.75001E+09 1.35576E-01
9.00001E+09 1.61047E-01
9.25001E+09 1.91268E-01
9.50000E+09 2.27120E-01
9.75000E+09 2.69643E-01
1.00000E+10 3.20071E-01
Best regards,
Eli
On Wed, Aug 5, 2015 at 4:33 PM, Richard Otis [email protected]
wrote:
The reference state is the pure elements in their standard state at 300 K
and 1 atm, or whatever is the reference energy you set in your TDB file. I
used the default reference state in this case.
On Aug 5, 2015 4:13 AM, broshe [email protected] wrote:Hi
Richard,
What is the reference state for the activity calculation?
EliOn Wed, Aug 5, 2015 at 2:13 AM, Richard Otis [email protected]
wrote:@broshe https://github.com/broshe, I wanted to give you an update on
what is possible in pycalphad now. Check out this example of computing
equilibrium carbon activity as a function of pressure:At the moment this will only work in the latest fitting branch, but I
hope to push a stable release soon. There is a performance issue I need
to
work out with mapping over T, P and composition simultaneously before
I'm
comfortable releasing, but it otherwise works.It should also be possible to compute driving force for phases but I
don't
know of a good example to try. Any suggestions?It would be great if you could reproduce the same carbon activity
calculation in Thermo-Calc to verify that the activities are correct. I
don't currently have convenient access to check it.—
Reply to this email directly or view it on GitHub
<
https://github.com/richardotis/pycalphad/issues/18#issuecomment-127792205>.
—Reply to this email directly or view it on GitHub.
—
Reply to this email directly or view it on GitHub
https://github.com/richardotis/pycalphad/issues/18#issuecomment-127998000
.
from pycalphad.
0.2 has been released, so the concerns in this issue should be addressed.
from pycalphad.
Related Issues (20)
- write_tdb function outputs incorrect tdb due to symengine HOT 6
- 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
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.