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

Dont adapt Flat direction advection scheme plus better summary for FluxFormAdvection #3908

Merged
merged 5 commits into from
Nov 10, 2024

Conversation

glwagner
Copy link
Member

@glwagner glwagner commented Nov 7, 2024

Before this PR, a simple two-dimensional turbulence simulation emits the following display:

julia> model = NonhydrostaticModel(; grid, advection=WENO(order=5), tracers=:c)
[ Info: Using the advection scheme Upwind Biased reconstruction order 1 in the x-direction because size(grid, 3) = 1
NonhydrostaticModel{CPU, RectilinearGrid}(time = 0 seconds, iteration = 0)
├── grid: 128×128×1 RectilinearGrid{Float64, Periodic, Periodic, Flat} on CPU with 3×3×0 halo
├── timestepper: RungeKutta3TimeStepper
├── advection scheme: FluxFormAdvection{3, Float64, WENO{3, Float64, Nothing, Nothing, Nothing, Nothing, WENO{2, Float64, Nothing, Nothing, Nothing, Nothing, UpwindBiased{1, Float64, Nothing, Nothing, Nothing, Nothing, Centered{1, Float64, Nothing, Nothing, Nothing, Nothing}}, Centered{1, Float64, Nothing, Nothing, Nothing, Nothing}}, Centered{2, Float64, Nothing, Nothing, Nothing, Centered{1, Float64, Nothing, Nothing, Nothing, Nothing}}}, WENO{3, Float64, Nothing, Nothing, Nothing, Nothing, WENO{2, Float64, Nothing, Nothing, Nothing, Nothing, UpwindBiased{1, Float64, Nothing, Nothing, Nothing, Nothing, Centered{1, Float64, Nothing, Nothing, Nothing, Nothing}}, Centered{1, Float64, Nothing, Nothing, Nothing, Nothing}}, Centered{2, Float64, Nothing, Nothing, Nothing, Centered{1, Float64, Nothing, Nothing, Nothing, Nothing}}}, UpwindBiased{1, Float64, Nothing, Nothing, Nothing, Nothing, Centered{1, Float64, Nothing, Nothing, Nothing, Nothing}}}
├── tracers: c
├── closure: Nothing
├── buoyancy: Nothing
└── coriolis: Nothing

After this PR we see

julia> model = NonhydrostaticModel(; grid, advection=WENO(order=5), tracers=:c)
NonhydrostaticModel{CPU, RectilinearGrid}(time = 0 seconds, iteration = 0)
├── grid: 128×128×1 RectilinearGrid{Float64, Periodic, Periodic, Flat} on CPU with 3×3×0 halo
├── timestepper: RungeKutta3TimeStepper
├── advection scheme: WENO(order=5)
├── tracers: c
├── closure: Nothing
├── buoyancy: Nothing
└── coriolis: Nothing

if the grid is Flat in the vertical. Also if we do adapt the advection order, it cleans this up:

julia> model = NonhydrostaticModel(; grid, advection=WENO(order=5), tracers=:c)
[ Info: Using the advection scheme UpwindBiased(order=1) in the x-direction because size(grid, 3) = 1
NonhydrostaticModel{CPU, RectilinearGrid}(time = 0 seconds, iteration = 0)
├── grid: 128×128×1 RectilinearGrid{Float64, Periodic, Periodic, Bounded} on CPU with 3×3×1 halo
├── timestepper: RungeKutta3TimeStepper
├── advection scheme: FluxFormAdvection(x=WENO(order=5), y=WENO(order=5), z=UpwindBiased(order=1))
├── tracers: c
├── closure: Nothing
├── buoyancy: Nothing
└── coriolis: Nothing

@navidcy
Copy link
Collaborator

navidcy commented Nov 7, 2024

Yes!!

@navidcy navidcy merged commit 7316917 into main Nov 10, 2024
46 checks passed
@navidcy navidcy deleted the glw/flux-form-summary branch November 10, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants