andreww / slurry

Simple calculations on a slurry in the F-layer
MIT License
0 stars 0 forks source link

Analytical integral for free energy #18

Closed andreww closed 7 months ago

andreww commented 3 years ago

Increasing the accuracy of the numerical integration in thermodynamics.endmember_free_energy() has removed most of the steps in e.g. the liquidus curve for the f-layer. However, there are some residual 'steps' in the equilibrium solid volume. These mostly go away if I go from 1200 points to 12000 points for integration. But the time to do this becomes annoying (and you can still see some steps).

No we have an approximate analytical function for volume given the pressure (see vinet_eos_volumes) which is only a polynomial in P, we should be able to write down the definite integral analytically. This ought to massively speed things up and get rid of the artefacts. But that's a long function to do the antiderivative of. Anybody fancy giving it a go?

It's worth a line in the paper.

andreww commented 7 months ago

Done - ref in manuscript, code in repo