Closed nichollsh closed 7 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:
What we get:
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.
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:
[CVODE ERROR] CVode At t = 4.95363e+07 and h = 0.000184003, the error test failed repeatedly or with |h| = hmin
PETSC ERROR: Nonlinear solver didn't converge: DIVERGED_FNORM_NAN
These occur under the following conditions:
F_atm
) is small (i.e. less than ~5 W m-2)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.