-
Notifications
You must be signed in to change notification settings - Fork 909
[WIP] Adding ENERGY in CPrimitiveIndices to get index of energy equation #2645
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
Conversation
| nameToIndex["ENERGY"] = idx.Velocity() + 3; | ||
| } else { | ||
| nameToIndex["ENERGY"] = idx.Velocity() + 2; |
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.
energy is not stored in the primitive variables
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.
Hi!
Thank you for your comment!
Yes, It is not stored.
What we were discussing in the morning was about how the energy solution index should be obtained without having to know that the temperature is the one that matches the index. In the python wrapper case mentioned, the index was called using "TEMPERATURE", is there a way of defining indexes for the solution and used like "ENERGY_SOLUTION"?
I would really appreciate any suggestion/advice about this
Thank you so much!!
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.
We should define "solution" or "conservative" indices instead of aliasing the ones in primitives.
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 for suggestion!!
|
So we introduce cSolutionIndices? |
|
Hi! I am going to close this pull request because the pull request #2652 addresses the issue. |
Proposed Changes
with @bigfooted , we were discussing about getting the index of the energy equation in order to overwrite the solution independent of the variable that is being actually solved. For Incompressible is the temperature, with pull request #2426 , the enthalpy is going to be solved, and for compressible solvers the total energy is solved.
However, if a user would like to overwrite the energy solution in the compressible solver, it might encounter an issue in identifying the index of the Total energy, that user would probably have to do something like:
because pressure has index nDim+1 in the primitives, which also corresponds to the index of the energy in the solution vector.
The turbulent_premixed_psi test case using the python wrapper for incompressible flows is a good example of this.
with this pull request we aim to make this distinction between the index of primitives and the index of the solution, in particular, the index of the energy equation.
Obviously, a better solution to this could be implemented.
Related Work
related with pull request #2426
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
pre-commit run --allto format old commits.