-
Notifications
You must be signed in to change notification settings - Fork 104
Port some Hermes-3 finite volume operators #3200
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
base: next
Are you sure you want to change the base?
Conversation
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.
clang-tidy made some suggestions
b1379ba to
7d8f81d
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.
clang-tidy made some suggestions
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.
clang-tidy made some suggestions
|
I think this operator needs that the parallel slices for the metric coefficients are set. That is only done for |
| // Div_par operators require B parallel slices: | ||
| // Coordinates::geometry doesn't ensure this (yet) | ||
| auto& Bxy = mesh->getCoordinates()->Bxy; | ||
| auto& J = mesh->getCoordinates()->J; |
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.
Note that communicating J is likely wrong for any realistic grid. You need #3197
For a simple slab test, that may well work, but not for real grids.
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.
What's the issue? And what's required to fix it?
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.
The parallel slices can have a completely different geometry. Thus one needs J from the traced parallel slices. The communication interpolates J, which works for lab-based quantities, but not for mesh based quantities.
One solution is to also write out the parallel metric components in zoidberg, and read them in in BOUT++, and prevent them from being overwritten:
https://github.com/boutproject/zoidberg/blob/more-6/zoidberg/zoidberg.py#L421
https://github.com/boutproject/BOUT-dev/blob/f3dwy/src/mesh/parallel/fci.cxx#L134
|
I've tried this version of the penalty term for Does anyone have a derivation of this term, or where it comes from? Here's what the penalty term itself looks like, compared to the solution:
And here's the result and the error:
So the penalty term dominates the error, which I guess is expected. But maybe a grid-scale independent dissipation is not desirable? @bendudson Any ideas for ways forward here? Is this another case where an oscillatory solution is not realistic, and this method is more suited to monotonic(ish) fields? We could just set the order for this method to be 1 and be done with it, but that feels less than ideal |
- Include all relevant headers, remove unused ones, add some forward declarations - Make data `private` instead of `protected` - Add getter instead of `const` member - Change member reference to pointer - Move ctor to .cxx file - Use `std::array` instead of C array - Bunch of other small clang-tidy fixes
The Div_par operators use parallel slices of B -- with 2D metrics, these are just the field itself, in 3D we need the actual slices. While `Coordinates::geometry` does communicate the fields, it puts off calculating the parallel slices because that needs the fully constructed `Coordinates`. Upcoming changes should fix this and remove the need to explicitly communicate `Coordinates` members.
Co-authored-by: David Bold <dschwoerer@users.noreply.github.com>
This allows the user to control the clipping, allowing some overshoot Also restore the FCI MMS test with this interpolator
Includes bug fix: ```diff - BoutReal gL = n.c - n.L; - BoutReal gR = n.R - n.c; + BoutReal gL = n.c - n.m; + BoutReal gR = n.p - n.c; ```
Damp gradients of velocity rather than gradients of momentum
56d7f5b to
21cb28a
Compare
|
I think the conclusion of |



Includes #3196
Ports the following from Hermes-3
fci-more-fixes-update-more:FV::Div_par_modFV::Div_par_fvvDiv_par_K_Grad_par_mod(not strictly FV!)FV::SuperbeePlus adds MMS tests for these and the existing FV operators:
FV::Div_parFV::Div_par_K_Grad_parwith all the available slope limiters, as appropriate.
Because the slope limiters kind of necessarily introduce inaccuracies, I've reduced the expected order of the operators, with
Upwindhaving order 1 and the rest 1.5. This feels like a bit of a fudge, but it's not clear to me how to treat this better.The ported operators will obviously conflict with the Hermes-3 ones. So 2/3 things to do:
bout::FV::namespacehermes::FV::namespace