You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the test is imperfect because 1) it does not test velocity components in non-periodic directions and 2) it uses a too-loose tolerance.
We can improve this test by tapering the initial condition for the field in question to zero for velocity fields in bounded directions.
EDIT: a little thought goes a long way: in Bounded directions, momentum is not conserved in general unless pressure at the boundaries is zero. Perhaps we should be happy just to test momentum conservation in periodic directions. This is still an important test that ensures the no flux condition is correctly implemented.
Also, we can make the tolerance more strict. Finally, once this test works well, we can get rid of the tracer_conserved_in_channel test in test_time_stepping.jl.
The text was updated successfully, but these errors were encountered:
I don't think it should because the issue here is whether we conserve tracers when we have explicit diffusion and should probably use no flux boundary conditions. The tests on PR #1486 test whether fluxes across boundaries are correctly prescribed (and uses closure=nothing).
The tests are pretty similar though and resolving this issue is a priority now. We also need to extend the tests mentioned in this issue to other models and grids.
I'm closing this issue because I'm judging that it's not of current, timely relevance to Oceananigans development. If you would like to make it a higher priority or if you think the issue was closed in error please feel free to re-open.
In
test_dynamics.jl
we test budgets for tracers and momentum variables:Oceananigans.jl/test/test_dynamics.jl
Lines 25 to 41 in 0807552
However, the test is imperfect because 1) it does not test velocity components in non-periodic directions and 2) it uses a too-loose tolerance.
We can improve this test by tapering the initial condition for the field in question to zero for velocity fields in bounded directions.EDIT: a little thought goes a long way: in
Bounded
directions, momentum is not conserved in general unless pressure at the boundaries is zero. Perhaps we should be happy just to test momentum conservation in periodic directions. This is still an important test that ensures the no flux condition is correctly implemented.Also, we can make the tolerance more strict. Finally, once this test works well, we can get rid of the
tracer_conserved_in_channel
test intest_time_stepping.jl
.The text was updated successfully, but these errors were encountered: