FormingWorlds / PROTEUS

Coupled atmosphere-interior framework to simulate the temporal evolution of rocky planets.
https://fwl-proteus.readthedocs.io
Apache License 2.0
12 stars 1 forks source link

Slow start when using Spada tracks #259

Closed nichollsh closed 1 week ago

nichollsh commented 1 week ago

When using the Spada tracks (via MORS), the model is very slow to start. It hangs on the "preparing stellar models" step for a minute or two, while with the Baraffe tracks it does not.

To reproduce, just run PROTEUS with the configuration star.mors.tracks = "spada".

This is mostly just annoying, but I can see it becoming a larger issue when running grids of simulations or using PROTEUS as a forward model.

@lsoucasse could this be related to the interpolation of the tracks?

Tested environment:

lsoucasse commented 1 week ago

Hi @nichollsh, Yes this is due to the use of the ForwardEuler method for time integration in Mors/Spada which uses a fixed temporal grid of about 10,000 points. Before we use the Rosenbrock method which dynamically computes an adaptive time grid of about 400 points but it is not reproducible between platforms. In his last message, Colin suggested we could actually adapt the Rosenbrock scheme to work with a fixed time grid, that would solve the issue.

nichollsh commented 1 week ago

Ah right - that makes sense. I guess this might require some work though, so maybe we can leave this for now. It's more important that the code is reproducible than it is fast.

Thank you!

lsoucasse commented 1 week ago

I have set up an issue in Mors to track this #FormingWorlds/MORS/27 and asked Colin if he can give some guidance in this matter.