Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resilience experiments with Rayleigh-Benard convection #495

Merged
merged 14 commits into from
Oct 21, 2024

Conversation

brownbaerchen
Copy link
Contributor

This PR includes a configuration for Rayleigh-Benard convection (RBC) on a 256x128 grid with Rayleigh number of $2^4$. Reference solutions are computed for t=20 and t=21. Individual runs for fault experiments then start at t=20 and go to t=21. There is a convergence controller that makes sure the target time is reached to accuracy of $10^{-9}$, which is sufficiently accurate to use the reference solution. I verified that I get the order of the collocation problem relative to such a reference solution, even if the residual stays at order 1 during the runs. The latest theory is that this is because the problem is perturbed by the method that enforces the boundary conditions. This perturbation is missing in the residual and I haven't found a good way to represent it there (yet). This matters when the perturbation is not small, i.e. the resolution is insufficient in z-direction. The configuration used here, however, is sufficiently resolved for this not to cause any issues.

@pancetta
Copy link
Member

Hm, is anything of this tested somewhere?

@brownbaerchen
Copy link
Contributor Author

No, that's too expensive, I'm afraid. I had to choose a large resolution to get low residuals in the collocation problem and now these experiments take about 40s+ on my laptop each. Also, they need the reference solution. Computing that takes multiple hours, and checking it in is not great either.

@brownbaerchen
Copy link
Contributor Author

When doing experiments with work-precision plots, I noticed some issues with the reference solution. These are fixed now, there is now a test that the time that is supposed to be reached is actually reached very closely. The result is also more sensitivity to faults in RBC.
Also, I implemented a convergence controller that rounds the step size. The idea is that the cache of matrix factorisations gets a higher hit rate if there are fewer options for step sizes. I.e. if adaptivity wants a step size of 0.612412, but you have a factorisation for 0.6 in the cache, then it does not need to be recomputed if the step size is rounded to that value. This is also tested.
The parameters for the work-precision plot with RBC are not final, but since this includes some tests, I thought I add this already to this PR and change again in the future.

PROBLEM_PARAMS = {'Rayleigh': 2e4, 'nx': 256, 'nz': 128}


class ReachTendExactly(ConvergenceController):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No documentation here?

ax.legend(frameon=False)


def test_order(t=14, dt=1e-1, steps=6):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure you want to call this test_xxx ?

@pancetta pancetta merged commit 28901f1 into Parallel-in-Time:master Oct 21, 2024
86 checks passed
brownbaerchen added a commit to brownbaerchen/pySDC that referenced this pull request Oct 22, 2024
…ime#495)

* Added basic infrastructure for Rayleigh-Benard in resilience project

* Verified order and added configurations for dt-adaptivity and base
strategy

* Implemented configurations for faults in RBC

* Added plot of RBC solution

* Limit fault targets in space index

* Fix

* Fixed fault insertion time for Hot Rod

* Changed colormap for RBC plots in the paper

* Fixed bug in reference solution

* Changed RBC configurations

* A few more changes to RBC config

* Implemented some tests

* Restored behaviour of work_precision script

* Small fixes

#!!!!!! WARNING: FLAKEHEAVEN FAILED !!!!!!: 
#:
@brownbaerchen brownbaerchen deleted the RBC_resilience branch October 24, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants