-
Notifications
You must be signed in to change notification settings - Fork 114
ENH: Molar volume #466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Molar volume #466
Conversation
…ludes tests for the molar volume and volume energy contribution.
Codecov Report
@@ Coverage Diff @@
## develop #466 +/- ##
===========================================
+ Coverage 90.25% 90.29% +0.03%
===========================================
Files 50 50
Lines 7726 7768 +42
===========================================
+ Hits 6973 7014 +41
- Misses 753 754 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thanks for your work. Where do you need the exponential integral function to complete the implementation? [Ed. Note: In this thread we worked out that I was looking at the wrong paper. The correct paper was added as a link in the PR text.] We may be able to rewrite or approximate the expression in terms of supported functions. Is it just the Debye function? I'll start taking a look at the code now. When combined with the new dot derivative support in #432, we'll be able to compute coefficients of thermal expansion (CTEs) in the vicinity of the magnetic transition. |
If it's just the Debye function, I'll note some recent work investigating integral-free forms of the Debye function: https://www.mdpi.com/2227-7390/10/10/1745 In particular, Equation 71 in that paper shows how we could write the Debye function in terms of several polylogarithms, which isn't itself novel; the problem has always been that polylogarithms are difficult to implement numerically over the entire domain of |
@richardotis, the model uses the exponential integral function, actually the paper appears to use the E1. And its inverse. There may be some what to transform it into a Debye function, but there are numerical implementations of the exponential integral as well, such as this one: https://link.springer.com/article/10.1007/s11075-017-0331-z I've played around a bit with the full implementation in Lu's paper and haven't yet found the magic combinations of the VC and VK parameters that match the experimental results he presents for iron using Scipy's exponential integral functions. It's entirely possible I'm missing something obvious, but my results thus far are incorrect. They're in the right ballpark, but I'm just not able to fit the experimental data with the parameters provided in the paper. I thought at least having the atmospheric molar volume model implemented into pycalphad was a good first step, with a note for future implementation of the pressure dependence. |
We can proceed without adding more features to this PR. I just wanted the problem documented for future reference. Where in the paper do you see the E1 function? I keep missing it. |
Equation 6 in the paper defines Ei(z), but the equation itself matches the definition of E1(z). They're pretty similar though, with Ei(-z) = -E1(z). https://dlmf.nist.gov/6.2#E1 has more. I'm not terribly familiar with this function, so I could be misinterpreting. |
We're talking about this paper, right? https://dx.doi.org/10.1016/j.actamat.2005.01.049 |
Oh I see, you probably mean https://doi.org/10.1016/j.calphad.2005.04.001 - they were very productive that year, good reminder on the importance of DOIs! |
Ahh I see the confusion. Lu was lead author on 3 different papers on this topic in 2005. I'm actually referring to this paper: https://www.sciencedirect.com/science/article/abs/pii/S0364591605000349. which I think is actually the definition of the E1. |
…ntribution to the Gibbs free energy.
Thank you! |
This PR is a partial implementation of the molar volume model from Lu, Selleby, and Sundman (2005). It includes the nonmagnetic thermal expansion, magnetic contribution to molar volume, and the contribution to the Gibbs free energy in cases where the molar volume is independent of pressure. Tests for these terms are also included. There are no required changes to the dependencies of pycalphad. This PR is inclusive of PR #423.
The pressure dependence of the molar volume can be implemented in the future via VC and VK parameters and Equations 9, 10, and 12 of the reference paper. It will require the exponential integral to be implemented into symengine.