Open ali-ramadhan opened 2 weeks ago
Nice. I think, these fixes are enough for a rigid lid to work because pressure_correct_velocities!
does nothing by default.
Maybe we can also add a
pressure_correct_velocities!(model::RigidLidHFSM, Δt) = nothing
in the barotropic_pressure_correction.jl
file, to be explicit about what is happening in case of a rigid lid, although it is not needed
Awesome! I can start a PR to support rigid lids then.
A rigid lid requires a solver for barotropic pressure and a pressure correction step.
Ah is it worth doing something with #3740 then so the model doesn't error with free_surface = nothing
or would that just be misleading?
I can also update the PR to get rid of rigid_lid.jl
to avoid confusing users into thinking a rigid lid mode exists.
A rigid lid requires a solver for barotropic pressure and a pressure correction step.
Right, I blundered a bit here. Should we even allow free_surface = nothing
then with non prescribed velocities?
Hmmmmmmmm
Right, if we really want to do stuff with a rigid lid then we need to add another field to HydrostaticFreeSurfaceModel
to hold the barotropic pressure (a 2D field in x, y) and get the algorithm working for that... it's definitely possible...
As for free_surface=nothing
, this should be ok in fact if we are using PrescribedVelocityFields
, but otherwise I think it should error (until we support rigid lids?)
I noticed a file called
rigid_lid.jl
exists (https://github.com/CliMA/Oceananigans.jl/blob/b3be950ef6a1f2139c2f65e083f20f1f7958ea55/src/Models/HydrostaticFreeSurfaceModels/rigid_lid.jl) so I was curious whetherHydrostaticFreeSurfaceModel
can run with a free surface, presumably by passingfree_surface = nothing
.It does error (see MWE below) but with a couple of extra function definitions (see far below) it seems to time step. Are these fixes enough for a working rigid lid? If not, does it make sense to remove the
rigid_lid.jl
file?Note: The documentation also mentions a rigid lid here: https://clima.github.io/OceananigansDocumentation/stable/numerical_implementation/elliptic_solvers/#Rigid-lid-pressure-operator
Minimal working example to reproduce the error:
Error:
"Fixes":
Environment: Oceananigans.jl v0.91.11 and