-
Notifications
You must be signed in to change notification settings - Fork 904
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 all 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 |
|---|---|---|
|
|
@@ -40,10 +40,12 @@ | |
| class CFluidScalar final : public CFluidModel { | ||
| private: | ||
| const int n_species_mixture; /*!< \brief Number of species in mixture. */ | ||
| su2double Gas_Constant; /*!< \brief Specific gas constant. */ | ||
| su2double Gas_Constant; /*!< \brief Specific gas constant. */ | ||
| const su2double Pressure_Thermodynamic; /*!< \brief Constant pressure thermodynamic. */ | ||
| const su2double Ref_Temperature; /*!< \brief Standard Reference temperature, usually set to 298.15 K. */ | ||
| const su2double GasConstant_Ref; /*!< \brief Gas constant reference needed for Nondimensional problems. */ | ||
| const su2double Prandtl_Number; /*!< \brief Prandlt number.*/ | ||
| const su2double Prandtl_Turb_Number; /*!< \brief Prandlt turbulent number.*/ | ||
| const su2double Schmidt_Turb_Number; /*!< \brief Schmidt turbulent number.*/ | ||
|
|
||
| const bool wilke; | ||
| const bool davidson; | ||
|
|
@@ -91,6 +93,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); | ||
|
|
||
| /*! | ||
| * \brief Compute gas constant for mixture. | ||
| */ | ||
|
|
@@ -130,16 +137,47 @@ class CFluidScalar final : public CFluidModel { | |
| /*! | ||
| * \brief Get fluid thermal conductivity. | ||
| */ | ||
| inline su2double GetThermalConductivity() override { return Kt + Mu_Turb * Cp / Prandtl_Number; } | ||
| inline su2double GetThermalConductivity() override { return Kt + Mu_Turb * Cp / Prandtl_Turb_Number; } | ||
|
|
||
| /*! | ||
| * \brief Get fluid mass diffusivity. | ||
| */ | ||
| inline su2double GetMassDiffusivity(int ivar) override { return massDiffusivity[ivar]; } | ||
|
|
||
| /*! | ||
| * \brief Get the enthalpy diffusivity terms for all species being solved. | ||
| * | ||
| * This function computes and retrieves the enthalpy diffusion terms required in the energy equation | ||
| * for multicomponent flows. | ||
| * | ||
| * \param[in,out] enthalpy_diffusions - Array containing the enthalpy diffusion terms for all | ||
| * species to be solved. The size of \p enthalpy_diffusions must be at least (n_species_mixture - 1), | ||
| * corresponding to the number of species transport equations in the system. | ||
| */ | ||
|
Member
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.
Contributor
Author
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) const override; | ||
|
|
||
| /*! | ||
| * \brief Get the gradient of enthalpy diffusivity terms for all species being solved. | ||
| * | ||
| * This function computes and retrieves the gradient of the enthalpy diffusion terms with respect to temperature. | ||
| * These terms are required for implicit computations when solving the energy equation for multicomponent flows. | ||
| * | ||
| * \param[in,out] grad_enthalpy_diffusions - Array containing the gradient of enthalpy diffusion terms for all | ||
| * species to be solved. The size of \p grad_enthalpy_diffusions must be at least (n_species_mixture - 1), | ||
| * corresponding to the number of species transport equations in the system. | ||
| */ | ||
| void GetGradEnthalpyDiffusivity(su2double* grad_enthalpy_diffusions) const 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 |
|---|---|---|
|
|
@@ -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. */ | ||
|
Member
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?
Contributor
Author
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: | ||
| /*! | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.