Continuing simulations from h5 files

47 views
Skip to first unread message

Andrew Cook

unread,
May 4, 2026, 1:52:33 PM (12 days ago) May 4
to Dedalus Users
Hi all,
I have been running simulations for the Compressible navier stokes equations with time dependent boundary conditions, (they are periodic in time). To solve from the 0 initial condition, it takes 500 cycles to reach the expected periodic orbit. So I wanted to start at the last cycle and only solve 1 cycle to find the periodic orbit. I have tried that, but I did not get the periodic orbit. If I run for 10 cycles at the last cycle of the larger simulation I am able to recreate the periodic orbit, but I'd prefer to only need to run 1 cycle.
I figure that the errors come from the time stepping not having the previous iterations. I was sure how to exactly do this in dedalus. I did see there is load_state function in the solver class, but I wasn't able to figure how to use that to do what I want.
Anyway I have attached both the longer simulation script and the shorter simulation script, and my post processing script(this is finding the mean response and the oscillatory response of the velocity and the pressure). DNS_Small_Amplitude.py is the longer simulation script ,DNS_Small_Amplitude_Time.py is shorter simulation script, and PostProcessDNS.py is the post process script I use to find the mean and oscillatory responses of the velocity and pressure.
-Andrew
DNS_Small_Amplitude_Time.py
DNS_Small_Amplitude.py
PostProcessDNS.py

Keaton Burns

unread,
May 4, 2026, 3:51:24 PM (12 days ago) May 4
to dedalu...@googlegroups.com
Hi Andrew,

I think you’re correct — when using a multistep scheme and restarting, you have to build up the timestep history again, since this is not saved with the snapshots. If you use one of the Runge-Kutta schemes, however, you should be able to restart fine since no history is required. And typically you can take a longer timestep with the RK schemes.

Best,
-Keaton


--
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dedalus-users/3316f3a1-51af-462f-a82d-1f036385f908n%40googlegroups.com.

Andrew Cook

unread,
May 4, 2026, 4:02:19 PM (12 days ago) May 4
to Dedalus Users
HI keaton,
Is there way I can manually input the timestep history using the load_state function? I can't use the Runge-Kutta schemes as I need to implicily integrate to handle the stiff terms I believe, and I did try using runge-kutta with smaller time step which did not help either. I have tried all the timesteppers and from my memory for this specific problem SBDF4 works our the best. Just to be clear when I say work, I mean I am comparing against the known periodic orbit, using the perturbation approach to solve the mean oscillatory responses.
-Andrew

Keaton Burns

unread,
May 4, 2026, 4:08:47 PM (12 days ago) May 4
to dedalu...@googlegroups.com
Hi Andrew,

Unfortunately there’s not currently any build-in functionality for that. If you must stick with the multistep schemes, the best strategy is probably to slow the timestep upon restart (by say 4x) and then slowly ramp it back up to the previous timestep (or let the CFL handler do this).

As an aside, the Runge-Kutta schemes are IMEX schemes, so will be implicitly integrating the same terms as the SBDF schemes do. But their stability regions of course different, and they use more memory (storing one matrix factorization for each substage).

Best,
-Keaton


Andrew Cook

unread,
May 4, 2026, 4:35:21 PM (12 days ago) May 4
to dedalu...@googlegroups.com
Hi Keaton, 
yes this worked thank you for the quick responses. I was wondering if you had any good references to better understand the stability regions of timesteppers besides the papers that you reference in the dedalus documentation?
-Andrew

Reply all
Reply to author
Forward
0 new messages