Re: Wrong dt convergence for Runge Kutta 3 in the GravitationalWave sample

15 views
Skip to first unread message

Kishore G

unread,
Apr 22, 2025, 8:56:09 AMApr 22
to pencil-code-discuss, Tonino Midiri
Hi Antonino.

I can also reproduce this issue in the GravitationalWaves sample.

Interestingly, simpler setups (e.g. 1d-tests/sod_10 , considering urms) show
the expected dt^3 scaling. I had to set REAL_PRECISION=double and boost the
precision of the output in print.in to see the scaling, though.

--
Kishore G.
வெள்ளி, 28 மார்ச், 2025 10:53:15 PM இந்திய நிலையான நேரம், Tonino Midiri எழுதியது
(on Friday, 28 March 2025 22:53:15 IST Tonino Midiri wrote):
> Good evening,
> while doing some testing of various Runge Kutta orders and convergence in
> time discretization for different variables I realized that the sample
> "GravitationalWaves" does not give a dt^3 convergence for the rms of the
> fields but a linear convergence when running with itorder=3.
> I am running the sample GravitationalWaves with the current public version
> of the code with the sole modification of using a fixed dt. I have been
> doing 8 simulations (with the same final time 1e-2) for different dt
> values: 1e-3, 1e-3/2, 1e-3/4, 1e-3/8, 1e-3/16, 1e-3/32, 1e-3/64 and
> 1e-3/128.
> Both the rms of the vector potential computed after taking the snapshots
> and the magnetic energy density EEM from the timeseries scale as dt.
> [When I talk about scaling of a quantity I refer to the relative difference
> of the rms of the quantity computed at a time t with a certain dt with
> respect to the rms of that quantity at the same time t computed with the
> smallest dt available (1e-3/128 in my case)]
> I don't understand the origin of such a behavior since I was expecting a
> dt^3 scaling for the relative errors.
>
> Thanks for your attention,
> Antonino Midiri


Reply all
Reply to author
Forward
0 new messages