Comments (12)
Hi Jing,
Thank you for your message. The difference is about 20 mJ/mol, which is below the current convergence limit for pycalphad's solver. In the future pycalphad's equilibrium results will be accurate to 1mJ/mol.
In the specific case you mentioned, since R is only specified to 6 significant figures, I would only compare the first 6 significant figures from the results. If you do that, they are the same.
from pycalphad.
Hi Otis,
Sorry for not mention about that the values above are directly from the Model.ast by substituting the variables in the Gibbs energy expression, instead of values from the equilibrium results. I have figured out what might be happening anyway.
There are contributions from the magnetic ordering in the Al-Ni system. I calculated the values of the Gibbs energy for the FCC_A1 phase in Al-Cu system, and no difference is observed. It seems that model for magnetic contribution in pycalphad (W. Xiong, 2011) is bit different from the one in Thermo-Calc in p version (IHJ model, I guess as I get the same values by using IHJ model.).
I have no idea about what kind of model for the magnetic ordering is using by a specific tdb file. Maybe the model (W. Xiong, 2011) is quite new and it failed to model the databases that were established before that. Anyway, I would have a look at whether Xiong's model is consistent with the IHJ model, or not.
Best wishes!
from pycalphad.
Thank you again for looking into this so carefully. The result is indeed interesting. pycalphad uses the IHJ model for magnetism by default, but there are some known precision issues due to the large exponents. It would be interesting to see the exact conditions you looked at so I can follow up.
from pycalphad.
To be clear, I copied the IHJ model from Wei Xiong's 2011 paper where he discussed his new model, but he had the older IHJ model in the background section.
from pycalphad.
So the Curie temperature of pure Ni is near 627 K, which is well below the calculation temperature of 873 K. I think this is due to pycalphad adding 0.1 K to the value of the computed Curie temperature to prevent singularities when the Curie temperature goes to zero. This changes the value of T/Tc which is used to do the calculation. I will do some thinking about how to address this. It's better to be off by 20 mJ/mol than for the calculation to fail, I think.
from pycalphad.
I can't reproduce your exact result because I don't have the same Al-Ni database as you, but I can reproduce a ~10mJ/mol difference by adjusting the 0.1 K numerical tolerance parameter I mentioned in the previous comment. If you are willing to provide your database or another database with the same issue, I can push a fix for the issue.
from pycalphad.
Sorry for the delay, but I still have something else in my hand. Also, I'm not authorized to post the tdb file here. But I'm still working on this problem and I hope I would figure it out by the end of this weekend.
from pycalphad.
That's okay. I will try to verify the fix independently.
from pycalphad.
I might locate the problem, which is from the mode.py.
'
define model parameters
p = phase.model_hints['ihj_magnetic_structure_factor']
A = 518/1125 + (11692/15975)*(1/p - 1)
'
It's no doubt that such an expression will cost the lost of precision for the type cast in the integer division. And A would always be zero.
from pycalphad.
The way it's written is fine in Python 2 and 3 because of this line at the top:
from __future__ import division
My guess is the culprit is here:
Line 473 in 82410c5
0.1 is added to all the Curie temperatures to prevent a singularity. I should probably use a smaller value.
from pycalphad.
Yes, that's true. I modify the integer to be float manually and pycalphad generate the same result as before. And I take away that 0.1 and pycalphad just gives the same result as thermo-calc.
Anyway, this could be the end of this issue.
from pycalphad.
Thanks for following up. I'll put together a fix and close this issue when I do.
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.