-
Notifications
You must be signed in to change notification settings - Fork 903
Preconditioning for multicomponent flows #2426
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: develop
Are you sure you want to change the base?
Changes from 112 commits
ca9083e
0487a68
dd369bb
5076f9d
09fe6f4
851b13f
f258308
63a8f37
cb1d3ef
30d0b88
dd22fcd
7f92730
fdbb9b9
c0b10a6
911c996
2af10c3
d0d0221
a1f526c
c469d32
ef2dc5f
94bd0b0
1c44044
912642b
a6ce2d4
e9d1e1f
127df29
211dda0
0655c99
b8b45ef
aca6e19
5c656bb
3f45e1c
b1fc9d4
b23913a
1961b08
02e5eac
810d2df
70ae6ee
e9d3f4c
165a9ad
eabaabf
96c6219
e1d873b
bbb76ae
52a1689
8d829b2
8a6b0f0
6a54f9f
761a3ac
31b6101
be00947
ca43883
f1ddb3c
d0f5577
4428a03
395430d
247e64b
fcacd18
5e1dacf
93f70ab
4b1fb41
8a31e7e
8640efd
a25de29
c0b0bed
f1744c0
ae3ab31
3148c3a
69d4efa
346a511
bcfec92
1cfbb67
7a6ddfc
c7f27da
a8c69ae
982fb56
a6a5b4e
18792df
5fa9236
1b52536
47e77c7
f99a541
d3496d6
d45faef
b81cd1b
bbb0882
982b649
62fd167
0025691
12c3290
d66fceb
8ba4b78
8ce7ba3
a3481f4
745cf5a
18a4348
da4ab08
69ec88d
91477ee
61ba0f2
a0884d7
807667f
5477a05
58e66ea
09323dd
798d7c4
ac24ff5
c874b02
b0e3769
d316de6
e2a80e6
23fe425
e8f9571
66de4bc
bae602b
b051888
5a14508
f990a55
9224935
051c201
07b3f61
63a8761
42d3e9b
3491b37
9a8d01e
341281b
13985c5
8cffbd2
e5c3992
a2ae0b1
21fab1a
61be943
b8ecc10
2177d51
fed3aa2
8644084
2e0dcfe
fa3bad1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,6 +42,7 @@ class CFluidScalar final : public CFluidModel { | |
| const int n_species_mixture; /*!< \brief Number of species in mixture. */ | ||
| su2double Gas_Constant; /*!< \brief Specific gas constant. */ | ||
| const su2double Pressure_Thermodynamic; /*!< \brief Constant pressure thermodynamic. */ | ||
| const su2double Ref_Temperature; /*!< \brief Reference temperature. */ | ||
| const su2double GasConstant_Ref; /*!< \brief Gas constant reference needed for Nondimensional problems. */ | ||
| const su2double Prandtl_Number; /*!< \brief Prandlt number.*/ | ||
|
|
||
|
|
@@ -91,6 +92,11 @@ class CFluidScalar final : public CFluidModel { | |
| */ | ||
| su2double ComputeMeanSpecificHeatCp(const su2double* val_scalars); | ||
|
|
||
| /*! | ||
| * \brief Compute Enthalpy given the temperature and scalars. | ||
| */ | ||
| su2double ComputeEnthalpyFromT(const su2double val_temperature, const su2double* val_scalars); | ||
Cristopher-Morales marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /*! | ||
| * \brief Compute gas constant for mixture. | ||
| */ | ||
|
|
@@ -137,9 +143,26 @@ class CFluidScalar final : public CFluidModel { | |
| */ | ||
| inline su2double GetMassDiffusivity(int ivar) override { return massDiffusivity[ivar]; } | ||
|
|
||
| /*! | ||
| * \brief Get enthalpy diffusivity terms. | ||
| */ | ||
|
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. document the arguments, what size is the array expected to have, etc. 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. Hi! Thank you so much for your comment, I have added a documentation of arguments and the size of the array expected by this function. Please let me know what you think about it. Thanks! |
||
| void GetEnthalpyDiffusivity(su2double* enthalpy_diffusions) override; | ||
|
|
||
| /*! | ||
| * \brief Get gradient enthalpy diffusivity terms. | ||
| */ | ||
| void GetGradEnthalpyDiffusivity(su2double* grad_enthalpy_diffusions) override; | ||
|
|
||
| /*! | ||
| * \brief Set the Dimensionless State using Temperature. | ||
| * \param[in] t - Temperature value at the point. | ||
| */ | ||
| void SetTDState_T(su2double val_temperature, const su2double* val_scalars) override; | ||
|
|
||
| /*! | ||
| * \brief Virtual member. | ||
| * \param[in] val_enthalpy - Enthalpy value at the point. | ||
| * \param[in] val_scalars - Scalar mass fractions. | ||
| */ | ||
| void SetTDState_h(su2double val_enthalpy, const su2double* val_scalars = nullptr) override; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -290,6 +290,7 @@ class CAvgGrad_Flow final : public CAvgGrad_Base { | |
| class CAvgGradInc_Flow final : public CAvgGrad_Base { | ||
| private: | ||
| su2double Mean_Thermal_Conductivity; /*!< \brief Mean value of the effective thermal conductivity. */ | ||
| su2double Mean_Heat_Capacity; /*!< \brief Mean value of the heat capacity. */ | ||
|
||
| bool energy; /*!< \brief computation with the energy equation. */ | ||
|
|
||
| /*! | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -126,7 +126,8 @@ class CSourceGeneralAxisymmetric_Flow final : public CSourceAxisymmetric_Flow { | |
| class CSourceIncAxisymmetric_Flow final : public CSourceBase_Flow { | ||
| bool implicit, /*!< \brief Implicit calculation. */ | ||
| viscous, /*!< \brief Viscous incompressible flows. */ | ||
| energy; /*!< \brief computation with the energy equation. */ | ||
| energy, /*!< \brief computation with the energy equation. */ | ||
| multicomponent; /*!< \brief multicomponent incompressible flows. */ | ||
|
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. Not needed anymore? 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. Hi! thanks for you comment, I added that boolean multicomponent because for axisymmetric flows, there is an additional term that comes from the enthalpy diffusion which is only needed for multicomponent flows (term in blue)
I thought that It should only be computed and added when it is needed because when the FLUID_MODEL is different than FLUID_MIXTURE, the species mass fractions become passive scalars, so the term in blue becomes zero. Please let me know what you think about it. Thank you so much in advance!!! |
||
|
|
||
| public: | ||
| /*! | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -203,6 +203,19 @@ class CIncEulerSolver : public CFVMFlowSolverBase<CIncEulerVariable, ENUM_REGIME | |
| CConfig *config, | ||
| unsigned short iMesh) final; | ||
|
|
||
| /*! | ||
| * \brief Recompute the extrapolated quantities, after MUSCL reconstruction, | ||
| * in a more thermodynamically consistent way. | ||
| * \note This method is static to improve the chances of it being used in a | ||
| * thread-safe manner. | ||
| * \param[in,out] fluidModel - The fluid model. | ||
| * \param[in] nDim - Number of physical dimensions. | ||
| * \param[in,out] primitive - Primitive variables. | ||
| * \param[in] scalar - scalar variable. | ||
|
||
| */ | ||
| static void ComputeConsistentExtrapolation(CFluidModel* fluidModel, unsigned short nDim, const su2double* scalar, | ||
| su2double* primitive); | ||
|
|
||
| /*! | ||
| * \brief Source term integration. | ||
| * \param[in] geometry - Geometrical definition of the problem. | ||
|
|
||

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.
These are gradients with respect to what variable?
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.
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.
@Cristopher-Morales please just improve the \brief comment here.
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.
unresolving because the comment was not improved
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 so much for your comment,
I have improved the documentation of this function.
Please let me know what you think about it.
Thanks in advance!