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

Enforce total buoyancy flux BC in tilted geometry example #3581

Merged
merged 11 commits into from
May 8, 2024

Conversation

hdrake
Copy link
Contributor

@hdrake hdrake commented May 5, 2024

This example includes no explicit modification to the BCs on buoyancy, meaning that it defaults to a no-flux BC (or FluxBoundaryCondition()) on buoyancy.

Following equation (6) of Wenegrat and Thomas (2020), we instead enforce a no-normal diffusive flux boundary condition on the total buoyancy, i.e. the perturbation plus the constantly-stratified BackgroundField. Because Oceananigans.jl does not allow diffusion to act on BackgroundFields, the background part of the no-flux BC is missing. However, we here can enforce it by specifying a perturbation flux BC that matches the implied background flux.

Other minor changes:

  • Added equally-spaced buoyancy surfaces to movie panels
  • Guess timestep by minimum of advective and diffusive timescales, instead of just the advective timescale

This addresses the problem with the tilted_bottom_boundary_layer.jl example identified by @liuchihl and noted in #3568. Recommend closing that issue but perhaps continuing some of the discussion in a "Discussion" post.

Henri Drake and others added 2 commits May 5, 2024 15:05
This example includes no explicit modification to the BCs on buoyancy,
meaning that it defaults to a no-flux BC (or `FluxBoundaryCondition()`)
on buoyancy.

Following equation (6) of Wenegrat and Thomas (2020), we instead enforce
a no-normal diffusive flux boundary condition on the *total* buoyancy, i.e.
the perturbation plus the constantly-stratified `BackgroundField`. Because
Oceananigans.jl does not allow diffusion to act on `BackgroundField`s, the
background part of the no-flux BC is missing. However, we here can enforce it
by specifying a perturbation flux BC that matches the implied background flux.

Other minor changes:
- Added equally-spaced buoyancy surfaces to movie panels
- Guess timestep by minimum of advective and diffusive timescales,
instead of just the advective timescale
Copy link
Member

@glwagner glwagner left a comment

Choose a reason for hiding this comment

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

Great contribution, thanks for clarifying the boundary conditions and helping users set up experiments more intentionally.

@navidcy navidcy added the documentation 📜 The sacred scrolls label May 6, 2024
@hdrake
Copy link
Contributor Author

hdrake commented May 6, 2024

LGTM, thanks for reviewing @glwagner

@glwagner
Copy link
Member

glwagner commented May 6, 2024

I'll try to figure out what's going on with the distributed tests

@glwagner glwagner merged commit fb2c670 into CliMA:main May 8, 2024
46 checks passed
@glwagner
Copy link
Member

glwagner commented May 8, 2024

Nice work @hdrake !

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

Successfully merging this pull request may close these issues.

3 participants