geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
227 stars 237 forks source link

Move pressure scaling #6135

Closed gassmoeller closed 1 week ago

gassmoeller commented 2 weeks ago

This is an alternative to #6116 that would be my suggestion for a fix for #6046. The PR consists of the following parts:

This is based on #6133, I will rebase and update tests when that one is merged.

gassmoeller commented 2 weeks ago

Thanks for the review and the testing! I worked a bit on reproducing the results of the nonlinear channel flow benchmark from your paper (and of course found and fixed a bunch of things that changed in the run and plotting scripts). But the good news is I get quite similar results to the paper. I noticed too late that I am now running with the GMG instead of the AMG solver, but I guess it is good news that there are only some minor differences between them.

Summarizing the differences:

In summary I am happy with this PR and would suggest we merge this if you agree with my changes to the benchmark scripts.

There is still #6139 to fix. I included a proposed fix in this PR, but will rebase the other PR after this one was merged to make sure the tests capture the parallel case.

For comparison the figures:

Fig.1 from Fraters et al. 2019: ggz183fig1

And my reproduction with GMG and ASPECT this branch: figure_t

Fig. 2 from Fraters et al. 2019: ggz183fig2

And my reproduction with GMG and ASPECT this branch: figure_v

gassmoeller commented 1 week ago

So this works now and since Menno approved I am going to merge. I am still working on rerunning the other Newton benchmarks and also to write a changelog entry, but I will bundle that in a separate PR to not make this larger than necessary.

MFraters commented 1 week ago

Great! I didn't have time yesterday evening and this morning to comment to on the benchmarking you did, but those are interesting results. Especially since the changes made to the stabilization should have improved the nonlinear convergence. Another guess it that it may have to do with the computation of the linear tolerance, but I would need to take a look at the logs for that. On the other hand it is great to see that the stabilized performed a lot better now in some cases.