-
Couldn't load subscription status.
- Fork 131
Comments NSF (Entropy-Var) Gradients #2528
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
Draft
DanielDoehring
wants to merge
4
commits into
trixi-framework:main
Choose a base branch
from
DanielDoehring:NSF_EntropyVarLabeling
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+15
−15
Draft
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,8 +124,8 @@ end | |
|
|
||
| # TODO: parabolic | ||
| # This is the flexibility a user should have to select the different gradient variable types | ||
| # varnames(::typeof(cons2prim) , ::CompressibleNavierStokesDiffusion3D) = ("v1", "v2", "v3", "T") | ||
| # varnames(::typeof(cons2entropy), ::CompressibleNavierStokesDiffusion3D) = ("w2", "w3", "w4", "w5") | ||
| # varnames(::typeof(cons2prim) , ::CompressibleNavierStokesDiffusion3D) = ("rho", "v1", "v2", "v3", "T") | ||
| # varnames(::typeof(cons2entropy), ::CompressibleNavierStokesDiffusion3D) = ("w1", "w2", "w3", "w4", "w5") | ||
|
Comment on lines
+127
to
+128
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same in 3D. |
||
|
|
||
| function varnames(variable_mapping, | ||
| equations_parabolic::CompressibleNavierStokesDiffusion3D) | ||
|
|
@@ -263,10 +263,10 @@ end | |
| return cons2prim(entropy2cons(u_transformed, equations), equations) | ||
| end | ||
|
|
||
| # Takes the solution values `u` and gradient of the entropy variables (w_2, w_3, w_4, w_5) and | ||
| # reverse engineers the gradients to be terms of the primitive variables (v1, v2, v3, T). | ||
| # Takes the solution values `u` and gradient of the entropy variables (w_1, w_2, w_3, w_4, w_5) and | ||
| # reverse engineers the gradients to be terms of the primitive variables (rho, v1, v2, v3, T). | ||
| # Helpful because then the diffusive fluxes have the same form as on paper. | ||
| # Note, the first component of `gradient_entropy_vars` contains gradient(rho) which is unused. | ||
| # Note, the first component of `gradient_entropy_vars` w1 contains gradient(rho) which is unused. | ||
| # TODO: parabolic; entropy stable viscous terms | ||
| @inline function convert_derivative_to_primitive(u, gradient, | ||
| ::CompressibleNavierStokesDiffusion3D{GradientVariablesPrimitive}) | ||
|
|
@@ -278,7 +278,7 @@ end | |
| equations::CompressibleNavierStokesDiffusion3D{GradientVariablesEntropy}) | ||
|
|
||
| # TODO: parabolic. This is inefficient to pass in transformed variables but then transform them back. | ||
| # We can fix this if we directly compute v1, v2, v3, T from the entropy variables | ||
| # We can fix this if we directly compute rho, v1, v2, v3, T from the entropy variables | ||
| u = entropy2cons(w, equations) # calls a "modified" entropy2cons defined for CompressibleNavierStokesDiffusion3D | ||
| rho, rho_v1, rho_v2, rho_v3, _ = u | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Similar here. Changing this commented code goes against the original intent in its creation. We discussed several years ago to mimic the computation of the gradients to match FLUXO. Perhaps we are willing to eat the computational overhead of computing unused gradients, but this is something we should discuss as a group.