-
Notifications
You must be signed in to change notification settings - Fork 119
Add Laplace diffusion in terms of entropy variables #2406
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: main
Are you sure you want to change the base?
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2406 +/- ##
==========================================
- Coverage 96.95% 96.92% -0.03%
==========================================
Files 504 508 +4
Lines 41721 41764 +43
==========================================
+ Hits 40448 40479 +31
- Misses 1273 1285 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I don't think the test failures are related to this PR... |
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.
I have two main suggestions:
-
For the standard Laplace we have the 3 files for the dimensions. Maybe do this also here?
-
Would it be possible to implement the Laplace operator similar to the Gradients for Navier-Stokes, i.e., with distinction between
GradientVariablesPrimitive
andGradientVariablesEntropy
?
Trixi.jl/src/equations/compressible_navier_stokes_1d.jl
Lines 9 to 10 in 5acf73a
CompressibleNavierStokesDiffusion1D(equations; mu, Pr, gradient_variables=GradientVariablesPrimitive())
Thanks, @DanielDoehring!
I'm not opposed to this, but is there an advantage of having multiple files for a single equation? I sometimes find it harder to navigate code split across multiple files compared with just scrolling through a single file.
I thought of implementing it this way. However, I was worried that |
I don't have a strong opinion here but @sloede often favored many files.
I agree with you 👍 |
Sorry @DanielDoehring, forgot to format some new files. Can you reapprove? |
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.
Thanks! I just have a few minor suggestions.
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Thanks for the review @ranocha! |
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.
Thanks!
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.
Sorry, I forgot: Could you please add a NEWS.md entry?
Ah! Of course, will add that in a bit. |
…o jc/add_laplace_entropy_vars
Adds the symmetrized version of Laplacian diffusion using the gradient of entropy variables and a change of variables to the conservative variables. For now, the change of variables uses
ForwardDiff.jacobian
, but can be specialized if the analytical formula is known to improve speed.This formulation is provably entropy dissipative unlike
LaplaceDiffusion
.