dedalus icon indicating copy to clipboard operation
dedalus copied to clipboard

Add more timesteppers

Open kburns opened this issue 5 years ago • 10 comments

We should review the literature and consult the experts (i.e. check out the schemes in DifferentialEquations.jl) to find any new time steppers that we can easily incorporate. It looks like there might be some new 4th and 5th order schemes in this recent Kennedy & Carpenter paper that could be easy to add in.

kburns avatar Nov 03 '20 21:11 kburns

I don't know if this is the right place. I have checked other open issues, but I would like to add an adaptive stepper to the list of possible timesteppers. Do you think this would be useful?

danvau98 avatar Sep 07 '24 11:09 danvau98

Yes I think in general there would be a lot of interest in adaptive schemes, but the complication is the simplest types of explicit schemes won't work -- we need mixed implicit-explicit schemes for differential-algebraic systems. I think some of the Rosenbrock methods like those in DifferentialEquations.jl might be best, but maybe there are other good options too.

kburns avatar Sep 07 '24 16:09 kburns

I had in mind creating a solver that uses the Dormand–Prince (RKDP - proposed tag) method, comparing the 4th-order solution to the 5th-order solution to determine whether the step size should be reduced or increased. However, I would also be happy to code some Rosenbrock methods for different orders.

danvau98 avatar Sep 07 '24 16:09 danvau98

The standard RKDP integrator is fully explicit. Dedalus requires IMEX schemes that support linearly implicit integration for algebraic constraints (like boundary conditions) and stiff terms (like diffusivities).

kburns avatar Sep 07 '24 18:09 kburns

I have coded the embedded schemes listed in Table 8 of the [Kennedy & Carpenter paper]. I have done some light testing, but I was wondering if there are any files in 'dedalus/tests' for testing new timesteppers?

danvau98 avatar Sep 10 '24 19:09 danvau98

That's great! Definitely feel free to open up a pull request for more detailed code discussion. There should be a test in "test_ivp.py" that loops over the implemented timestepping schemes, so that's the place to start.

kburns avatar Oct 02 '24 17:10 kburns

The scheme with adaptivity passes the 1D heat equation test. I have forked the repo and created a separate branch to work on the adaptive stepper. I will add more 1D tests that work similarly to the existing heat equation test. The error evaluation between the complete and the embedded scheme will not work on MPI.

danvau98 avatar Oct 03 '24 15:10 danvau98

Feel free to open up a PR if you want to discuss code details. Happy to review it and chat, even if its just draft form.

kburns avatar Oct 03 '24 20:10 kburns

Discussing the code would help integrate it properly into Dedalus.

danvau98 avatar Oct 04 '24 08:10 danvau98

Pull request has been opened as 'adaptive stepper' to discuss and review code.

danvau98 avatar Oct 09 '24 22:10 danvau98