Skip to content

Commit af3801d

Browse files
authored
Merge branch 'develop' into dependabot/github_actions/actions/upload-release-asset-1.0.2
2 parents 244919b + 7e35912 commit af3801d

41 files changed

Lines changed: 802 additions & 744 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Common/include/CConfig.hpp

Lines changed: 39 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ class CConfig {
481481
INC_DENSITYMODEL Kind_DensityModel; /*!< \brief Kind of the density model for incompressible flows. */
482482
CHT_COUPLING Kind_CHT_Coupling; /*!< \brief Kind of coupling method used at CHT interfaces. */
483483
VISCOSITYMODEL Kind_ViscosityModel; /*!< \brief Kind of the Viscosity Model*/
484+
MIXINGVISCOSITYMODEL Kind_MixingViscosityModel; /*!< \brief Kind of the mixing Viscosity Model*/
484485
CONDUCTIVITYMODEL Kind_ConductivityModel; /*!< \brief Kind of the Thermal Conductivity Model */
485486
CONDUCTIVITYMODEL_TURB Kind_ConductivityModel_Turb; /*!< \brief Kind of the Turbulent Thermal Conductivity Model */
486487
DIFFUSIVITYMODEL Kind_Diffusivity_Model; /*!< \brief Kind of the mass diffusivity Model */
@@ -822,16 +823,18 @@ class CConfig {
822823
Pressure_Critical, /*!< \brief Critical Pressure for real fluid model. */
823824
Density_Critical, /*!< \brief Critical Density for real fluid model. */
824825
Acentric_Factor, /*!< \brief Acentric Factor for real fluid model. */
825-
Mu_Constant, /*!< \brief Constant viscosity for ConstantViscosity model. */
826-
Mu_ConstantND, /*!< \brief Non-dimensional constant viscosity for ConstantViscosity model. */
827-
Thermal_Conductivity_Constant, /*!< \brief Constant thermal conductivity for ConstantConductivity model. */
828-
Thermal_Conductivity_ConstantND, /*!< \brief Non-dimensional constant thermal conductivity for ConstantConductivity model. */
829-
Mu_Ref, /*!< \brief Reference viscosity for Sutherland model. */
830-
Mu_RefND, /*!< \brief Non-dimensional reference viscosity for Sutherland model. */
831-
Mu_Temperature_Ref, /*!< \brief Reference temperature for Sutherland model. */
832-
Mu_Temperature_RefND, /*!< \brief Non-dimensional reference temperature for Sutherland model. */
833-
Mu_S, /*!< \brief Reference S for Sutherland model. */
834-
Mu_SND; /*!< \brief Non-dimensional reference S for Sutherland model. */
826+
*Mu_Constant, /*!< \brief Constant viscosity for ConstantViscosity model. */
827+
*Thermal_Conductivity_Constant, /*!< \brief Constant thermal conductivity for ConstantConductivity model. */
828+
*Mu_Ref, /*!< \brief Reference viscosity for Sutherland model. */
829+
*Mu_Temperature_Ref, /*!< \brief Reference temperature for Sutherland model. */
830+
*Mu_S; /*!< \brief Reference S for Sutherland model. */
831+
unsigned short nMu_Constant, /*!< \brief Number of species constant viscosities. */
832+
nMu_Ref, /*!< \brief Number of species reference constants for Sutherland model. */
833+
nMu_Temperature_Ref, /*!< \brief Number of species reference temperature for Sutherland model. */
834+
nMu_S, /*!< \brief Number of species reference S for Sutherland model. */
835+
nThermal_Conductivity_Constant,/*!< \brief Number of species constant thermal conductivity. */
836+
nPrandtl_Lam, /*!< \brief Number of species laminar Prandtl number. */
837+
nPrandtl_Turb; /*!< \brief Number of species turbulent Prandtl number. */
835838
su2double Diffusivity_Constant; /*!< \brief Constant mass diffusivity for scalar transport. */
836839
su2double Diffusivity_ConstantND; /*!< \brief Non-dim. constant mass diffusivity for scalar transport. */
837840
su2double Schmidt_Number_Laminar; /*!< \brief Laminar Schmidt number for mass diffusion. */
@@ -861,8 +864,8 @@ class CConfig {
861864
wallModel_B, /*!< \brief constant B for turbulence wall modeling */
862865
wallModel_RelFac, /*!< \brief relaxation factor for the Newton method used in the wall model */
863866
wallModel_MinYplus; /*!< \brief minimum Y+ value, below which the wall model is not used anymore */
864-
su2double Prandtl_Lam, /*!< \brief Laminar Prandtl number for the gas. */
865-
Prandtl_Turb, /*!< \brief Turbulent Prandtl number for the gas. */
867+
su2double *Prandtl_Lam, /*!< \brief Laminar Prandtl number for the gas. */
868+
*Prandtl_Turb, /*!< \brief Turbulent Prandtl number for the gas. */
866869
Length_Ref, /*!< \brief Reference length for non-dimensionalization. */
867870
Pressure_Ref, /*!< \brief Reference pressure for non-dimensionalization. */
868871
Temperature_Ref, /*!< \brief Reference temperature for non-dimensionalization.*/
@@ -1705,13 +1708,13 @@ class CConfig {
17051708
* \brief Get the value of the laminar Prandtl number.
17061709
* \return Laminar Prandtl number.
17071710
*/
1708-
su2double GetPrandtl_Lam(void) const { return Prandtl_Lam; }
1711+
su2double GetPrandtl_Lam(unsigned short val_index = 0) const { return Prandtl_Lam[val_index]; }
17091712

17101713
/*!
17111714
* \brief Get the value of the turbulent Prandtl number.
17121715
* \return Turbulent Prandtl number.
17131716
*/
1714-
su2double GetPrandtl_Turb(void) const { return Prandtl_Turb; }
1717+
su2double GetPrandtl_Turb(unsigned short val_index = 0) const { return Prandtl_Turb[val_index]; }
17151718

17161719
/*!
17171720
* \brief Get the value of the von Karman constant kappa for turbulence wall modeling.
@@ -3810,6 +3813,12 @@ class CConfig {
38103813
*/
38113814
VISCOSITYMODEL GetKind_ViscosityModel() const { return Kind_ViscosityModel; }
38123815

3816+
/*!
3817+
* \brief Get the value of the mixing model for viscosity.
3818+
* \return Mixing Viscosity model.
3819+
*/
3820+
MIXINGVISCOSITYMODEL GetKind_MixingViscosityModel() const { return Kind_MixingViscosityModel; }
3821+
38133822
/*!
38143823
* \brief Get the value of the thermal conductivity model.
38153824
* \return Conductivity model.
@@ -3826,25 +3835,29 @@ class CConfig {
38263835
* \brief Get the value of the constant viscosity.
38273836
* \return Constant viscosity.
38283837
*/
3829-
su2double GetMu_Constant(void) const { return Mu_Constant; }
3838+
su2double GetMu_Constant(unsigned short val_index = 0) const { return Mu_Constant[val_index]; }
38303839

38313840
/*!
38323841
* \brief Get the value of the non-dimensional constant viscosity.
38333842
* \return Non-dimensional constant viscosity.
38343843
*/
3835-
su2double GetMu_ConstantND(void) const { return Mu_ConstantND; }
3844+
su2double GetMu_ConstantND(unsigned short val_index = 0) const { return Mu_Constant[val_index] / Viscosity_Ref; }
38363845

38373846
/*!
38383847
* \brief Get the value of the thermal conductivity.
38393848
* \return Thermal conductivity.
38403849
*/
3841-
su2double GetThermal_Conductivity_Constant(void) const { return Thermal_Conductivity_Constant; }
3850+
su2double GetThermal_Conductivity_Constant(unsigned short val_index = 0) const {
3851+
return Thermal_Conductivity_Constant[val_index];
3852+
}
38423853

38433854
/*!
38443855
* \brief Get the value of the non-dimensional thermal conductivity.
38453856
* \return Non-dimensional thermal conductivity.
38463857
*/
3847-
su2double GetThermal_Conductivity_ConstantND(void) const { return Thermal_Conductivity_ConstantND; }
3858+
su2double GetThermal_Conductivity_ConstantND(unsigned short val_index = 0) const {
3859+
return Thermal_Conductivity_Constant[val_index] / Thermal_Conductivity_Ref;
3860+
}
38483861

38493862
/*!
38503863
* \brief Get the value of the constant mass diffusivity for scalar transport.
@@ -3874,37 +3887,39 @@ class CConfig {
38743887
* \brief Get the value of the reference viscosity for Sutherland model.
38753888
* \return The reference viscosity.
38763889
*/
3877-
su2double GetMu_Ref(void) const { return Mu_Ref; }
3890+
su2double GetMu_Ref(unsigned short val_index = 0) const { return Mu_Ref[val_index]; }
38783891

38793892
/*!
38803893
* \brief Get the value of the non-dimensional reference viscosity for Sutherland model.
38813894
* \return The non-dimensional reference viscosity.
38823895
*/
3883-
su2double GetMu_RefND(void) const { return Mu_RefND; }
3896+
su2double GetMu_RefND(unsigned short val_index = 0) const { return Mu_Ref[val_index] / Viscosity_Ref; }
38843897

38853898
/*!
38863899
* \brief Get the value of the reference temperature for Sutherland model.
38873900
* \return The reference temperature.
38883901
*/
3889-
su2double GetMu_Temperature_Ref(void) const { return Mu_Temperature_Ref; }
3902+
su2double GetMu_Temperature_Ref(unsigned short val_index = 0) const { return Mu_Temperature_Ref[val_index]; }
38903903

38913904
/*!
38923905
* \brief Get the value of the non-dimensional reference temperature for Sutherland model.
38933906
* \return The non-dimensional reference temperature.
38943907
*/
3895-
su2double GetMu_Temperature_RefND(void) const { return Mu_Temperature_RefND; }
3908+
su2double GetMu_Temperature_RefND(unsigned short val_index = 0) const {
3909+
return Mu_Temperature_Ref[val_index] / Temperature_Ref;
3910+
}
38963911

38973912
/*!
38983913
* \brief Get the value of the reference S for Sutherland model.
38993914
* \return The reference S.
39003915
*/
3901-
su2double GetMu_S(void) const { return Mu_S; }
3916+
su2double GetMu_S(unsigned short val_index = 0) const { return Mu_S[val_index]; }
39023917

39033918
/*!
39043919
* \brief Get the value of the non-dimensional reference S for Sutherland model.
39053920
* \return The non-dimensional reference S.
39063921
*/
3907-
su2double GetMu_SND(void) const { return Mu_SND; }
3922+
su2double GetMu_SND(unsigned short val_index = 0) const { return Mu_S[val_index] / Temperature_Ref; }
39083923

39093924
/*!
39103925
* \brief Get the number of coefficients in the temperature polynomial models.
@@ -3966,31 +3981,6 @@ class CConfig {
39663981
*/
39673982
const su2double* GetKt_PolyCoeffND(void) const { return KtPolyCoefficientsND.data(); }
39683983

3969-
/*!
3970-
* \brief Set the value of the non-dimensional constant viscosity.
3971-
*/
3972-
void SetMu_ConstantND(su2double mu_const) { Mu_ConstantND = mu_const; }
3973-
3974-
/*!
3975-
* \brief Set the value of the non-dimensional thermal conductivity.
3976-
*/
3977-
void SetThermal_Conductivity_ConstantND(su2double therm_cond_const) { Thermal_Conductivity_ConstantND = therm_cond_const; }
3978-
3979-
/*!
3980-
* \brief Set the value of the non-dimensional reference viscosity for Sutherland model.
3981-
*/
3982-
void SetMu_RefND(su2double mu_ref) { Mu_RefND = mu_ref; }
3983-
3984-
/*!
3985-
* \brief Set the value of the non-dimensional reference temperature for Sutherland model.
3986-
*/
3987-
void SetMu_Temperature_RefND(su2double mu_Tref) { Mu_Temperature_RefND = mu_Tref; }
3988-
3989-
/*!
3990-
* \brief Set the value of the non-dimensional S for Sutherland model.
3991-
*/
3992-
void SetMu_SND(su2double mu_s) { Mu_SND = mu_s; }
3993-
39943984
/*!
39953985
* \brief Set the temperature polynomial coefficient for specific heat Cp.
39963986
* \param[in] val_coeff - Temperature polynomial coefficient for specific heat Cp.

Common/include/basic_types/ad_structure.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ namespace AD{
538538
}
539539
}
540540
}
541-
541+
542542
FORCEINLINE void delete_handler(void *handler) {
543543
CheckpointHandler *checkpoint = static_cast<CheckpointHandler*>(handler);
544544
checkpoint->clear();

Common/include/option_structure.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,18 @@ static const MapType<std::string, VISCOSITYMODEL> ViscosityModel_Map = {
677677
MakePair("POLYNOMIAL_VISCOSITY", VISCOSITYMODEL::POLYNOMIAL)
678678
};
679679

680+
/*!
681+
* \brief Types of Mixing viscosity model
682+
*/
683+
enum class MIXINGVISCOSITYMODEL {
684+
WILKE, /*!< \brief Wilke mixing viscosity model. */
685+
DAVIDSON, /*!< \brief Davidson mixing viscosity model. */
686+
};
687+
static const MapType<std::string, MIXINGVISCOSITYMODEL> MixingViscosityModel_Map = {
688+
MakePair("WILKE", MIXINGVISCOSITYMODEL::WILKE)
689+
MakePair("DAVIDSON", MIXINGVISCOSITYMODEL::DAVIDSON)
690+
};
691+
680692
/*!
681693
* \brief Types of thermal conductivity model
682694
*/

Common/include/parallelization/special_vectorization.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,24 +138,24 @@ MAKE_BINARY_FUN(min, min_p)
138138

139139
/*--- Functions of one (array) argument. ---*/
140140

141-
#define MAKE_UNARY_FUN(NAME,IMPL) \
142-
FORCEINLINE ARRAY_T NAME(const ARRAY_T& x) { \
143-
ARRAY_T res; FOREACH res[k] = IMPL(x[k]); return res; \
141+
#define MAKE_UNARY_FUN(NAME,IMPL) \
142+
FORCEINLINE ARRAY_T NAME(const ARRAY_T& x) { \
143+
ARRAY_T res; FOREACH { res[k] = IMPL(x[k]); } return res; \
144144
}
145145

146146
#undef MAKE_UNARY_FUN
147147

148148
/*--- Functions of two arguments, with arrays and scalars. ---*/
149149

150-
#define MAKE_BINARY_FUN(NAME,IMPL) \
151-
FORCEINLINE ARRAY_T NAME(const ARRAY_T& a, const ARRAY_T& b) { \
152-
ARRAY_T res; FOREACH res[k] = IMPL(a[k], b[k]); return res; \
153-
} \
154-
FORCEINLINE ARRAY_T NAME(const ARRAY_T& a, SCALAR_T b) { \
155-
ARRAY_T res; FOREACH res[k] = IMPL(a[k], b); return res; \
156-
} \
157-
FORCEINLINE ARRAY_T NAME(SCALAR_T b, const ARRAY_T& a) { \
158-
ARRAY_T res; FOREACH res[k] = IMPL(b, a[k]); return res; \
150+
#define MAKE_BINARY_FUN(NAME,IMPL) \
151+
FORCEINLINE ARRAY_T NAME(const ARRAY_T& a, const ARRAY_T& b) { \
152+
ARRAY_T res; FOREACH { res[k] = IMPL(a[k], b[k]); } return res; \
153+
} \
154+
FORCEINLINE ARRAY_T NAME(const ARRAY_T& a, SCALAR_T b) { \
155+
ARRAY_T res; FOREACH { res[k] = IMPL(a[k], b); } return res; \
156+
} \
157+
FORCEINLINE ARRAY_T NAME(SCALAR_T b, const ARRAY_T& a) { \
158+
ARRAY_T res; FOREACH { res[k] = IMPL(b, a[k]); } return res; \
159159
}
160160

161161
MAKE_BINARY_FUN(pow, ::pow)

Common/include/parallelization/vectorization.hpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,24 @@ class Array : public CVecExpr<Array<Scalar_t,N>, Scalar_t> {
8282
alignas(Size*sizeof(Scalar)) Scalar x_[N];
8383

8484
public:
85-
#define ARRAY_BOILERPLATE \
86-
/*!--- Access elements ---*/ \
87-
FORCEINLINE Scalar& operator[] (size_t k) { return x_[k]; } \
88-
FORCEINLINE const Scalar& operator[] (size_t k) const { return x_[k]; } \
89-
/*!--- Constructors ---*/ \
90-
FORCEINLINE Array() = default; \
91-
FORCEINLINE Array(Scalar x) { bcast(x); } \
92-
FORCEINLINE Array(std::initializer_list<Scalar> vals) { \
93-
auto it = vals.begin(); FOREACH { x_[k] = *it; ++it; } \
94-
} \
95-
FORCEINLINE Array(Scalar x0, Scalar dx) { FOREACH x_[k] = x0 + k*dx; } \
96-
FORCEINLINE Array(const Scalar* ptr) { load(ptr); } \
97-
template<class T> \
98-
FORCEINLINE Array(const Scalar* beg, const T& off) { gather(beg,off); } \
99-
/*!--- Reduction operations ---*/ \
100-
FORCEINLINE Scalar sum() const { Scalar s(0); FOREACH s+=x_[k]; return s; } \
101-
FORCEINLINE Scalar dot(const Array& other) const { \
102-
Scalar s(0); FOREACH s += x_[k] * other[k]; return s; \
85+
#define ARRAY_BOILERPLATE \
86+
/*!--- Access elements ---*/ \
87+
FORCEINLINE Scalar& operator[] (size_t k) { return x_[k]; } \
88+
FORCEINLINE const Scalar& operator[] (size_t k) const { return x_[k]; } \
89+
/*!--- Constructors ---*/ \
90+
FORCEINLINE Array() = default; \
91+
FORCEINLINE Array(Scalar x) { bcast(x); } \
92+
FORCEINLINE Array(std::initializer_list<Scalar> vals) { \
93+
auto it = vals.begin(); FOREACH { x_[k] = *it; ++it; } \
94+
} \
95+
FORCEINLINE Array(Scalar x0, Scalar dx) { FOREACH x_[k] = x0 + k*dx; } \
96+
FORCEINLINE Array(const Scalar* ptr) { load(ptr); } \
97+
template<class T> \
98+
FORCEINLINE Array(const Scalar* beg, const T& off) { gather(beg,off); } \
99+
/*!--- Reduction operations ---*/ \
100+
FORCEINLINE Scalar sum() const { Scalar s(0); FOREACH { s+=x_[k]; } return s; } \
101+
FORCEINLINE Scalar dot(const Array& other) const { \
102+
Scalar s(0); FOREACH { s += x_[k] * other[k]; } return s; \
103103
}
104104

105105
#if defined(CODI_REVERSE_TYPE) || defined(CODI_FORWARD_TYPE)
@@ -132,11 +132,11 @@ class Array : public CVecExpr<Array<Scalar_t,N>, Scalar_t> {
132132

133133
/*--- Compound assignment operators. ---*/
134134

135-
#define MAKE_COMPOUND(OP) \
136-
FORCEINLINE Array& operator OP (Scalar x) { FOREACH x_[k] OP x; return *this; } \
137-
template<class U> \
138-
FORCEINLINE Array& operator OP (const CVecExpr<U,Scalar>& expr) { \
139-
FOREACH x_[k] OP expr.derived()[k]; return *this; \
135+
#define MAKE_COMPOUND(OP) \
136+
FORCEINLINE Array& operator OP (Scalar x) { FOREACH { x_[k] OP x; } return *this; } \
137+
template<class U> \
138+
FORCEINLINE Array& operator OP (const CVecExpr<U,Scalar>& expr) { \
139+
FOREACH { x_[k] OP expr.derived()[k]; } return *this; \
140140
}
141141
MAKE_COMPOUND(=)
142142
MAKE_COMPOUND(+=)

0 commit comments

Comments
 (0)