Convection project update 03-16-2020: EOS test

Problem

When astrobear initialize, it does primitive form → conservative form and back, which can cause some problem.
The root of the problem is P(D, E) and E(D, P) have some troubles with self-consistency.
Technically speaking, P(D, T) and T(D, P); E(D, T) and T(D, E) both have this problem also, but they are directly invert of the inversion algorithm, so the numerical effects are much better.

https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03162020/How_EOS_tables_obtained.png

Most obvious consequence: energy is not conserved.

Test of self-consistency

Choose

-12 ⇐ log(rho) ⇐ -3
3 ⇐ log(pressure) ⇐ 8
0 ⇐ log(T) ⇐ 8

And discard everything outside our original table P(DT) and E(DT)

Flipping between P(D, E) and E(D, P) 200 times:
Input P0, calculate E0, then use E0 to find P1, then P1 to find E1 … Then so on and so forth, until the index reaches 200.
Plotted histogram the difference between P0 - P200 and E0 - E200

Similarly, do the same for P(D, T) and E(D, T)

PDE - EDP
Pressure https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03162020/Pressure_PDE_panta.png
Energy https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03162020/Energy_PDE_panta.png
PDT - TDP
Temperature https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03162020/Temperature_TDP_panta.png
Pressure https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03162020/Pressure_TDP_panta.png

Conclusion: PDE - EDP has a worse self-consistency then PDT - TDP.

Potential solutions

  • flip the EOS until reaching equilibrium
  • use one of PDE or EDP, and invert that EOS (this will give consistancy between PDE and EDP, but not the chain)

NOT Potential solutions

(Where I tried and failed)

  • changing the inversion interpolation routine to bicubic. This actually increases the numerical problem
  • Adding resolution to final table directly (cubic interpolate and sample better). In some sense, it will reduce numerical noise, but the improvement is minimal comparing to the memory used (double resolution increases file size by 4)

MESA profile

  • Tried to rewrite the get profile script in python, but encountering some understanding issue of the problem setup..

Comments

No comments.