-
Notifications
You must be signed in to change notification settings - Fork 848
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
[WIP] Preconditioning for multicomponent flows #2426
base: develop
Are you sure you want to change the base?
Conversation
/*! | ||
* \brief Virtual member. | ||
* \param[in] val_enthalpy - Enthalpy value at the point. | ||
*/ | ||
virtual void ComputeTempFromEnthalpy(su2double val_enthalpy, su2double* val_temperature, | ||
const su2double* val_scalars = nullptr) {} |
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.
This seems inconsistent with the SetTDState_* functions.
Should this be SetTDState_h and then you use GetTemperature to get the temperature?
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.
In the pull request made by evert regarding preferential diffusion, he also used the same function for the flamelet solver. The only difference is that that function is in the CSpeciesFlameletSolver.cpp and I cannot access to that function when I set the primitives in SetPrimVar in CIncNSVariable.cpp
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.
My point is again to keep an abstract interface.
Evert's function is a private function of a specific solver which is perfectly fine, and it uses the fluid model... If you need a similar function, move it somewhere higher up in the hierarchy to make it accessible. For example the scalar solver. Or even the fluid model but implemented in a way that keeps it useful for all fluids.
Proposed Changes
This pull request aims to extend the preconditioning for incompressible multicomponent flows, specifically when FLUID_MIXTURE model is used and energy equation is solved. Changes introduced in this pull request aim to solve directly for the sensible enthalpy instead of temperature. Specifically, the energy equation that is going to be solved for multicomponent flows is given as follows:
and the sensible enthalpy is:

Currently$C_{p}$ does not depend on temperature for FLUID_MIXTURE, but it depends on the mixture composition. So the sensible enthalpy simplifies to $C_{p}*(T-T_{0})$ . For problems where $C_{p}$ strongly depends on the temperature, Cantera library will be coupled to SU2. After this pull request is completed, a pull request with a fluid model using Cantera will be done where an energy equation for the total enthalpy will be solved.
A pdf document will be attached in the coming days for giving more details about this pull request.
Related Work
Currently fluid mixture does not work correctly when the energy equation is on, this is mainly due to the fact that the energy equation that must be solved for multicomponent flows is the one mentioned above for the sensible enthalpy and not the energy equation for a perfect gas that is currently solved in SU2.
PR Checklist
pre-commit run --all
to format old commits.