FormingWorlds / PROTEUS

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

SPIDER fails to find a solution for permanently-molten cases #61

Closed nichollsh closed 7 months ago

nichollsh commented 8 months ago

I have already been investigating this, but will make an issue here in case this continues to be a problem or re-emerges after being 'fixed'.

In some cases, SPIDER will fail to obtain a solution. Either of the two errors are possible in this case:

These occur under the following conditions:

Therefore, this issue most often occurs in the case of Type II planets, where the planet should stay molten and the net outgoing flux rapidly tends to zero within ~100 kyr. One way to mitigate this is to include a "steady-state break condition", which I've already done in a development branch. However, the model still fails in some cases.

This is still being investigated, but I expect that it should be resolved soon.

nichollsh commented 8 months ago

Some example plots taken from two cases, just to demonstrate this. The x-axes here are both Time, but I've not included the numbers because these are not from the same simulation setups.

What we want: image

What we get: image

nichollsh commented 7 months ago

This has been resolved, and the fix will be merged into master in the next PR. The solution is to introduce a form of 'step rejection', where the model can handle cases where SPIDER fails to find a solution. If this happens, the model will re-attempt the SPIDER step but with adjusted step sizes and tolerances. This can be done up to 7 times before giving up entirely. This approach has resolved the issue in all cases that have been tested.