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

Implements Robin boundary condition for implicit free surface in the nonhydrostatic model #4166

Open
wants to merge 1 commit into
base: glw/nh-free-surface
Choose a base branch
from

Conversation

shriyafruitwala
Copy link

No description provided.

nonhydrostatic_pressure_solver(arch, grid::XYZRegularRG) = FFTBasedPoissonSolver(grid)
#nonhydrostatic_pressure_solver(arch, grid::XYZRegularRG) = FFTBasedPoissonSolver(grid)
nonhydrostatic_pressure_solver(arch, grid::XYZRegularRG) =
FourierTridiagonalPoissonSolver(grid)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -43,7 +43,7 @@ end
Nz = size(grid, 3)

# Using a homogeneous Neumann (zero Gradient) boundary condition:
@inbounds D[i, j, 1] = -1 / Δzᵃᵃᶠ(i, j, 2, grid) - Δzᵃᵃᶜ(i, j, 1, grid) * (λx[i] + λy[j])
@inbounds D[i, j, 1] = -1 / Δzᵃᵃᶠ(i, j, 2, grid) - Δzᵃᵃᶜ(i, j, 1, grid) * (λx[i] + λy[j]) + (1 / (g * Δt^2))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. You'll have to hard code your g and Δt here since they aren't available. When we adapt this code to be merged into main we will design an interface that allows this to be input upon model construction. We will also have to forbid adaptive time-stepping, or better yet implement a way to update the pressure solver if the time-step changes.

@glwagner
Copy link
Member

glwagner commented Mar 8, 2025

hi @shriyafruitwala, #4169 is merged which should make it easier to set up the FourierTridiagonalPoissonSolver with any grid you like.

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

Successfully merging this pull request may close these issues.

2 participants