-
Notifications
You must be signed in to change notification settings - Fork 9
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
TVD slope limiters #1662
base: main
Are you sure you want to change the base?
TVD slope limiters #1662
Conversation
9ead12b
to
f1afa08
Compare
0b2a5ce
to
656b9a0
Compare
8f5ac73
to
9b77341
Compare
b9b86e1
to
165c168
Compare
165c168
to
ef55195
Compare
f4fcc8d
to
f268404
Compare
9231c2d
to
86ed761
Compare
dc12510
to
dd2a6be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charleskawczynski These are from a class of slope limiting fluxes which combine low-order (monotone) and high-order (not necessarily monotone) fluxes : the |
Ok, could we maybe also plot what the solution looks like without a limiter? That way we can see how each one improves over the baseline. |
Actually, maybe that is unstable? Perhaps this is fine? I just want to make sure that this is working, and I'd like to have some sort of test to confirm it. The plots look suspiciously ineffective. |
I'm not the best person to review this. @charleskawczynski @dennisYatunin Could any of you take a look at this PR ASAP? We hope to merge this before the end of tomorrow, thanks! |
d74a254
to
771b8a6
Compare
9c592f2
to
b202585
Compare
examples/column/vanleer_advection.jl
Outdated
if limiter_method != Operators.AlgebraicMean() | ||
@info "Extrema with $(limiter_method): $(extrema(q_final))" | ||
@assert maximum(q_final) <= FT(1) | ||
@assert isapprox(maximum(q_final .- 1), FT(0), atol = FT(0.05)) | ||
@assert isapprox(minimum(q_final .- 0), FT(0), atol = FT(0.05)) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! I'd expect a lower error than 5%, but maybe if Δt
is big for this particular problem, and if there are several stages that each introduce a bit of error, then this result makes sense. Could you also add a similar monotonicity check for the RZeroLimiter
in the TVD advection test, and any other limiters that should preserve monotonicity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this error decrease if you lower the value of Δt
? It would be good to have a unit test that demonstrates monotonicity preservation up to machine epsilon precision, if that's possible for a sufficiently small CFL number in this test case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dennisYatunin Updated with reduced cfl and info statements.
Hi @akshaysridhar, just a heads up: I'm going to rebase and push some changes |
Noted; I've added some commits addressing the unit test comments (I'll wait for the rebase update to push). Thanks @charleskawczynski |
I've pushed these changes @charleskawczynski |
a54026e
to
e0c0184
Compare
https://buildkite.com/clima/climacore-ci/builds/4847#0193e491-227b-43eb-a2a2-7fbb72315844 @charleskawczynski This job passes locally (runs all deformation flow configs with plots generated at the end of the simulation) but fails on buildkite - the assertion error is part of this pr, the convergence warnings are not (those are from the horizontal limiter implementations and are consistent with main branch outcomes) |
e8262d7
to
0226942
Compare
van Leer limiters as in Lin(1994) Update numerical flux stencils to use tvd limiters Update column examples and references Update deformation flow example to use limiters Co-authored-by: Charles Kawczynski <[email protected]> modified: src/Operators/finitedifference.jl Standard symbols : \scru_space -> u_space Move docstring modified: examples/column/vanleer_advection.jl modified: src/Operators/finitedifference.jl modified: examples/column/tvd_advection.jl modified: examples/hybrid/sphere/deformation_flow.jl modified: src/Operators/finitedifference.jl verbose op+method names modified: examples/column/vanleer_advection.jl Reduce cfl and show eps convergence for mono4, mono5 Remove some eltype conversions Fix name Docs formatting Apply julia formatter Update domain extent Fix names, move constraint outside of BCs Added and updated docs More fixes + info statements method -> constraint ; new kwarg Try Float64 Print info in failing tracer test Update factor in deformation flow tracer condition
0226942
to
084f693
Compare
Update flux correction stencils
Update column and deformation flow examples to use TVD limiters.