Simplify Navier-Stokes BC imposition#3108
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3108 +/- ##
=======================================
Coverage 96.84% 96.84%
=======================================
Files 662 663 +1
Lines 51197 51203 +6
=======================================
+ Hits 49579 49585 +6
Misses 1618 1618
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for bringing this up! I was thinking: Do we have any boundary condition, where the combination of momentum and energy/heat boundary condition actually has an influence? So I was wondering if we could reduce redundancy by only implementing e.g. no slip, adiabatic, isothermal etc. individually and then just call them after another. |
Good question - not that I know of. However, I was actually thinking it might be simpler and clearer to just combine them together with At the moment, I can't think of too many other combinations that we use. Implementing these three individual cases is more redundant, but I think the API for calling one BC after another might introduce more complexity too. |
|
Actually I was thinking about some additional BCs - namely a "do-nothing" equivalent for the momentum, analogous to the Adiabatic one. This would be used for cases where we would want free offstream. This would naturally be combined with Adiabatic heat BC. Next, I would like to add a radiation-equilibrium BC for the temperature (which would be combined with a no-slip wall). |
|
Nice! If you're thinking of adding more options, then yes - calling separate momentum/energy BCs makes sense. |
DanielDoehring
left a comment
There was a problem hiding this comment.
Thanks for refactoring this ! :)
For Trixi.jl's implementation, the "divergence" boundary condition for Navier-Stokes is the same for both
GradientVariablesPrimitiveandGradientVariablesEntropy. This removes some duplicate implementations while also enabling slip wall BCs forGradientVariablesEntropy.Todo: add 3D tests.