-
Notifications
You must be signed in to change notification settings - Fork 193
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
Modular and unified user interface for advection schemes #2454
Comments
This sounds great. What do you think of having |
That makes sense! |
@simone-silvestri if we want to unify the user interface across all models, we could introduce the type advection = AdvectionScheme(momentum=WENO5(grid), tracers=UpwindBiasedThirdOrder())
model = NonhydrostaticModel(; grid, advection) Or, model = NonhydrostaticModel(; grid, advection=WENO5()) which the model constructor interprets as advection = AdvectionScheme(momentum=WENO5(grid), tracers=WENO5(grid)) (this is nice too, because we can build We could also always "regularize" the advection scheme with advection = AdvectionScheme(momentum=WENO5(), tracers=UpwindBiasedThirdOrder())
model = NonhydrostaticModel(; grid, advection) translates to advection = AdvectionScheme(momentum=WENO5(grid), tracers=UpwindBiasedThirdOrder()) under the hood. |
I'm also open to other names than |
The name seems very clear and I like how this is structured. |
Done |
We need to overhaul the way we specify advection schemes, whose current limitations were exposed when "WENO vector invariant" was implemented. I propose that we implement a hierarchical specification system using a new object called
AdvectionScheme
that specifiesVectorInvariant
orFluxForm
for momentum, alwaysFluxForm
for tracers)FluxForm
, the reconstruction scheme for the advected componentVectorInvariant
, the stencil for computing vorticity, as well as the method for reconstructing vorticity at the momentum locationsVectorInvariant
with WENO reconstruction, the type of the smoothness stencil (vorticity or velocity)We also may want to specify how we reconstruction advecting velocities for flux form momentum advection (right now we use centered advection with an accuracy one order lower than the accuracy of the advected component reconstruction --- ie with
UpwindBiasedFifthOrder()
we reconstruct advecting components with a centered fourth order scheme).Finally, we need to allow different schemes for every tracer.
This modular design will allow more detailed specification of an advection scheme and also us to remove the option for WENO reconstruction for vector invariant more easily, which @simone-silvestri pointed out is experimental.
We also would like to explore alternative discretization for the continuity equation. For this we need a "mass" reconstruction scheme, and the advecting scheme for tracers needs to reconstruct
advected_velocity
in a way that's consistent with the mass reconstruction.Here's a sketch of what these new types might look like:
The text was updated successfully, but these errors were encountered: