Skip to content
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] Standard initialization for Incompressible flows using thermodynamic_pressure and the Inc_Temperature_init #2137

Open
wants to merge 36 commits into
base: develop
Choose a base branch
from

Conversation

Cristopher-Morales
Copy link
Contributor

Proposed Changes

With this pull request, we aim to initialize the fluid models based on the Ideal gas laws for incompressible flows in a standard way using the THERMODYNAMIC_PRESSURE($P_{op}$) and the INC_TEMPERATURE_INIT ($T_{init}$), the initial density is computed based on the ideal gas law :

$\rho_{init}= P_{op} / R T_{init}$

When the FLUID_MODEL is CONSTANT_DENSITY, the constant density must be given in the config file using the option DENSITY_CONSTANT, similar as it is done when viscosity, thermal conductivity and diffusivity models are chosen as constant.

Related Work

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.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

@Cristopher-Morales Cristopher-Morales changed the title Feature incompressible Standard initialization for Incompressible flows using thermodynamic_pressure and the Inc_Temperature_init Sep 20, 2023
@bigfooted bigfooted changed the title Standard initialization for Incompressible flows using thermodynamic_pressure and the Inc_Temperature_init [WIP] Standard initialization for Incompressible flows using thermodynamic_pressure and the Inc_Temperature_init Sep 20, 2023
Comment on lines +3027 to +3030
newString.append(
"INC_DENSITY_INIT is deprecated. The initial density is computed using the ideal gas law based on the "
"THERMODYNAMICS_PRESSURE and INC_TEMPERATURE_INIT. For Using the FLUID_MODEL=CONSTANT_DENSITY, the "
"constant density must be given using the following option DENSITY_CONSTANT.\n\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just released a major version, we are not breaking backward compatibility for an important setting like this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can wait for a major version to implement a change in config option. But now, sometimes we use thermodynamic pressure and sometimes we use density (to compute thermodynamic pressure) and I think the inconsistency should be fixed at some point, and I think it should be fixed in this way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not saying we cannot fix things, but the option needs to be deprecated more gracefully than this.
As for the inconsistency between density init and pressure init we can use a similar strategy to the compressible solver.

/*!
 * \brief Types of initialization option
 */
enum class FREESTREAM_OPTION {
  TEMPERATURE_FS, /*!< \brief Temperature initialization. */
  DENSITY_FS, /*!< \brief Density initalization. */
};

@TobiKattmann
Copy link
Contributor

I am trying to find some time to think about how to do a bit of option-consolidation on the non-dimensionalization side and initialization is quite a bit linked to that process -> I hope to open a discussion with some more information and proposal soon -> And since this PR is looking to change the INC_DENSITY_INIT option which is part of that my request would be to maybe spare that option up to the conference (the init change to use thermodynamic pressure is a little more independent of that I think via pedros suggestion to mimic what we do for compressible flow atm)

@@ -821,6 +821,7 @@ class CConfig {
su2double Gamma, /*!< \brief Ratio of specific heats of the gas. */
Bulk_Modulus, /*!< \brief Value of the bulk modulus for incompressible flows. */
Beta_Factor, /*!< \brief Value of the epsilon^2 multiplier for Beta for the incompressible preconditioner. */
Density_Constant, /*!< \brief Constant Density for ConstantDensity model (only for incompressible flows). */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants