Open siddharthabishnu opened 1 year ago
This validation test essentially implements the tracer advection test:
but we should take care to make sure the boundary conditions are correct.
@siddharthabishnu @simone-silvestri can you document the progress we discussed yesterday on this issue?
Also, if there has been work do you think we can open a draft PR to track the progress?
(Possibly a PR that updates the tracer advection case is all we need for now to complete the first task. I don't think the tracer advection case works on main
currently.)
@glwagner I have opened a PR with the branch sb/cut-cells-experiment, on which I have been working on implementing the cut cells. To summarize the progress:
The two-dimensional tracer advection test case over a Gaussian bump is run successfully using the low resolution from the Adcroft paper and a relatively higher resolution. Both partial cells and full cells are used. Time evolution of the passive tracer concentration is visualized.
CutCellBottom is implemented in the ImmersedBoundary module similar to PartialCellBottom, and the tracer advection test case is repeated with cut cells. No noticeable difference in the results is detected so far (with the simulation using partial cells).
So, tasks 1 (a) and 2 (b) have been completed so far. Tasks 2(b) and 2(c) are being worked on right now, after completion of which tasks 1 (b) and 3 will be initiated.
Nice! Do you have an image that illustrates the problems at low resolution, ie a plot that reproduces the Adcroft result?
Nice! Do you have an image that illustrates the problems at low resolution, ie a plot that reproduces the Adcroft result?
Yes. Here they are. I improved the visualization on the latest commit and pushed it right now. The types of immersed boundary and plot are included in the filenames. The discrete version of the topography (i.e. the Gaussian bump for this test case) is detectable only for the heatmaps.
https://github.com/CliMA/Oceananigans.jl/assets/12926768/f94a6b92-cb5e-4197-9e5b-bd8ea1bad42a
https://github.com/CliMA/Oceananigans.jl/assets/12926768/c2d37eb9-931e-4efa-aa99-c113e38bf393
https://github.com/CliMA/Oceananigans.jl/assets/12926768/38771b36-e030-4877-8c9f-61944cd9aefc
https://github.com/CliMA/Oceananigans.jl/assets/12926768/baf6c24b-3fc1-4f4e-aec7-17826bd4da61
This paper describes a "cell merging" technique that can help reduce problems with very small cells: https://journals.ametsoc.org/view/journals/mwre/138/10/2010mwr3252.1.xml?tab_body=abstract-display
There are also some citations in there about an alternative method that they call the "thin wall" method.
Cut cells use piecewise linear representations of bathymetry (as opposed to full or partial cells which use piecewise constant ones).
Here’s a tentative work plan for implementing cut cells:
Develop the following test cases:
(a) Tracer advection with no momentum on a seamount (Adcroft or Schär configuration); (b) Internal wave or overflow with momentum;
Run these test cases for full and partial cells. As suggested by @jm-c, compare a simulation using low vertical resolution (~10 vertical layers) and partial cells with one using high vertical resolution (~500 vertical layers) and full cells at the same horizontal resolution (to verify the effectiveness of partial cells). To ensure that a stratified ocean remains at rest, implement the technique in Lin for partial cells.
Implement two-dimensional cut cells in the y-z plane:
(a) Implement
CutCellBottom
in ImmersedBoundary module similar to PartialCellBottom; (b) Implement a special compute_w_from_continuity forCutCellBottom
. https://github.com/CliMA/Oceananigans.jl/blob/8e6b5cd540b7a710955edf9846959966efbb6ea0/src/Models/HydrostaticFreeSurfaceModels/compute_w_from_continuity.jl#L15-L16(c) Implement the "algorithm" for partial cells to compute the hydrostatic pressure for
CutCellBottom
. https://github.com/CliMA/Oceananigans.jl/blob/8e6b5cd540b7a710955edf9846959966efbb6ea0/src/Models/NonhydrostaticModels/update_hydrostatic_pressure.jl#L24Extend the cut cell implementation to 3D and consider improving the pressure gradient calculation.
References
Advection on Cut-Cell Grids for an Idealized Mountain of Constant Slope A finite-volume integration method for computing pressure gradient force in general vertical coordinates A fourth-order Cartesian grid embedded boundary method for Poisson's equation A New Terrain-Following Vertical Coordinate Formulation for Atmospheric Prediction Models Comparison of Terrain-Following and Cut-Cell Grids Using a Nonhydrostatic Model Large-eddy simulations with ClimateMachine v0.2.0: a new open-source code for atmospheric simulations on GPUs and CPUs Medium range forecasts using cut-cells: a sensitivity study On methods for solving the oceanic equations of motion in generalized vertical coordinates Representation of topography by porous barriers and objective interpolation of topographic data Representation of Topography by Shaved Cells in a Height Coordinate Ocean Model Rescaled height coordinates for accurate representation of free-surface flows in ocean circulation models Sliding or stumbling on the staircase: numerics of ocean circulation along piecewise-constant coastlines