Computing CFL and using TimeStepWizards with ShallowWaterSimulation #2720
Replies: 3 comments 9 replies
-
Reading through some of the other issues it seems like there may still be some issues with how |
Beta Was this translation helpful? Give feedback.
-
Ok, one issue with the above example is that Here's a new snippet: using Oceananigans
using Oceananigans.Models: ShallowWaterModel
using Printf
grid = RectilinearGrid(size=(4, 4), x=(0, 2π), y=(0, 2π), topology=(Periodic, Bounded, Flat))
model = ShallowWaterModel(; grid, gravitational_acceleration=1)
set!(model, h=1)
advective_cfl = AdvectiveCFL(1.0)
@show advective_cfl(model) This also returns NaN. |
Beta Was this translation helpful? Give feedback.
-
Could this be because the halo regions contain zeros? I'm assuming a This gives
|
Beta Was this translation helpful? Give feedback.
-
I have been playing around with the Bickley Jet example and tried adding a
TimeStepWizard
and an output message with a CFL calculation.I saw in issue #2615 there are potentially some issues around
model.velocities
withShallowWaterModel
, so I was just wondering if calculating a CFL like thisShould work? I get Inf for CFL with this and the TimeStepWizard tries to compensate by setting the time step smaller and smaller, so something isn't working right for me currently.
Beta Was this translation helpful? Give feedback.
All reactions