Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bottom_heights from the immersed boundary method don't look right with a coarse grid #3537

Closed
francispoulin opened this issue Apr 3, 2024 · 1 comment

Comments

@francispoulin
Copy link
Collaborator

francispoulin commented Apr 3, 2024

Below is a simple script that defines an immersed boundary method for the case of a linearly sloping bottom. Nothing fancy but the resolution is very coarse.

using Oceananigans
Lx, Lz = 1000, 200
bottom(x) = -Lz +  2e-2*x
underlying_grid = RectilinearGrid(size = (5, 5), x = (0, Lx), z = (-Lz, 0),
                                  topology = (Bounded, Flat, Bounded))
grid = ImmersedBoundaryGrid(underlying_grid, GridFittedBottom(bottom))

The z levels are correct.

julia> underlying_grid.zᵃᵃᶠ[1:6, 1, 1]
6-element Vector{Float64}:
 -200.0
 -160.0
 -120.0
  -80.0
  -40.0
    0.0

However, the bottom heights can't be right as they do not align with the level heights. Can someone help me find exactly where the bottom_heights are computed?

julia> grid.immersed_boundary.bottom_height.data[1:6,1,1]
6-element Vector{Float64}:
 -198.0
 -194.0
 -190.0
 -186.0
 -182.0
 -182.0
```
  
@francispoulin
Copy link
Collaborator Author

Sorry! I see that these are the heights of the topography, which are correct, but not the heights used by the GridFittedBottom, as I thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant