Skip to content

The “NaN error" problem #2832

Nov 18, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

@zwei961120 I would try reducing the cfl in the TimeStepWizard to cfl=0.5. It looks like your Δt is increasing just prior to blow up:

Iteration: 27200, time: 1.885 days, Δt: 6.969 seconds
Iteration: 27300, time: 1.893 days, Δt: 7.518 seconds
Iteration: 27400, time: 1.903 days, Δt: 8.321 seconds

A cfl=1.0 is at the very edge of the "practical CFL" for RK3. I'd recommend going no higher than cfl=0.8. But cfl=0.5 (or even just cfl=0.1, for sanity's sake) should provide a conservative buffer.

Also, to diagnose the problem I think you should look at slices of w, rather than the horizontal average or u (which is rather smoothed).

Other than that, nothing else pops out when I read your script. …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zwei961120
Comment options

Answer selected by zwei961120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants