Skip to content

Commit 9857080

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fix_slidingmesh_reconstructboundary_pr2
2 parents faf2b3b + 8e7bd69 commit 9857080

25 files changed

Lines changed: 967 additions & 839 deletions

Common/include/CConfig.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ class CConfig {
475475
unsigned short Kind_Solver, /*!< \brief Kind of solver Euler, NS, Continuous adjoint, etc. */
476476
Kind_FluidModel, /*!< \brief Kind of the Fluid Model: Ideal or Van der Walls, ... . */
477477
Kind_InitOption, /*!< \brief Kind of Init option to choose if initializing with Reynolds number or with thermodynamic conditions */
478-
Kind_TransCoeffModel, /*!< \brief Transport coefficient Model for NEMO solver. */
479478
Kind_GridMovement, /*!< \brief Kind of the static mesh movement. */
480479
*Kind_SurfaceMovement, /*!< \brief Kind of the static mesh movement. */
481480
nKind_SurfaceMovement, /*!< \brief Kind of the dynamic mesh movement. */
@@ -1142,6 +1141,7 @@ class CConfig {
11421141
monoatomic; /*!< \brief Flag for monoatomic mixture. */
11431142
string GasModel, /*!< \brief Gas Model. */
11441143
*Wall_Catalytic; /*!< \brief Pointer to catalytic walls. */
1144+
TRANSCOEFFMODEL Kind_TransCoeffModel; /*!< \brief Transport coefficient Model for NEMO solver. */
11451145

11461146
/*!
11471147
* \brief Set the default values of config options not set in the config file using another config object.
@@ -3623,7 +3623,7 @@ class CConfig {
36233623
* \brief Get the transport coefficient model.
36243624
* \return Index of transport coefficient model.
36253625
*/
3626-
unsigned short GetKind_TransCoeffModel(void) const { return Kind_TransCoeffModel; }
3626+
TRANSCOEFFMODEL GetKind_TransCoeffModel(void) const { return Kind_TransCoeffModel; }
36273627

36283628
/*!
36293629
* \brief Get the total number of heat flux markers.

Common/include/option_structure.hpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -540,13 +540,15 @@ MakePair("ONESPECIES", ONESPECIES)
540540
/*!
541541
* \brief types of coefficient transport model
542542
*/
543-
enum ENUM_TRANSCOEFFMODEL {
544-
WILKE = 0,
545-
GUPTAYOS = 1
546-
};
547-
static const MapType<std::string, ENUM_TRANSCOEFFMODEL> TransCoeffModel_Map = {
548-
MakePair("WILKE", WILKE)
549-
MakePair("GUPTA-YOS", GUPTAYOS)
543+
enum class TRANSCOEFFMODEL {
544+
WILKE,
545+
GUPTAYOS,
546+
CHAPMANN_ENSKOG
547+
};
548+
static const MapType<std::string, TRANSCOEFFMODEL> TransCoeffModel_Map = {
549+
MakePair("WILKE", TRANSCOEFFMODEL::WILKE)
550+
MakePair("GUPTA-YOS", TRANSCOEFFMODEL::GUPTAYOS)
551+
MakePair("CHAPMANN-ENSKOG", TRANSCOEFFMODEL::CHAPMANN_ENSKOG)
550552
};
551553

552554
/*!

Common/src/CConfig.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ void CConfig::SetConfig_Options() {
11491149
/* DESCRIPTION: Specify chemical model for multi-species simulations - read by Mutation++ library*/
11501150
addStringOption("GAS_MODEL", GasModel, string("N2"));
11511151
/* DESCRIPTION: Specify transport coefficient model for multi-species simulations */
1152-
addEnumOption("TRANSPORT_COEFF_MODEL", Kind_TransCoeffModel, TransCoeffModel_Map, WILKE);
1152+
addEnumOption("TRANSPORT_COEFF_MODEL", Kind_TransCoeffModel, TransCoeffModel_Map, TRANSCOEFFMODEL::WILKE);
11531153
/* DESCRIPTION: Specify mass fraction of each species */
11541154
addDoubleListOption("GAS_COMPOSITION", nSpecies, Gas_Composition);
11551155
/* DESCRIPTION: Specify if mixture is frozen */
@@ -3587,8 +3587,12 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
35873587
SU2_MPI::Error("Only STANDARD_AIR fluid model can be used with US Measurement System", CURRENT_FUNCTION);
35883588
}
35893589

3590-
if (nemo && Kind_TransCoeffModel != WILKE ) {
3591-
SU2_MPI::Error("Only WILKE transport model is stable for the NEMO solver.", CURRENT_FUNCTION);
3590+
if (Kind_FluidModel == SU2_NONEQ && Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE ) {
3591+
SU2_MPI::Error("Only WILKE transport model is stable for the NEMO solver using SU2TClib. Use Mutation++ instead.", CURRENT_FUNCTION);
3592+
}
3593+
3594+
if (Kind_FluidModel == MUTATIONPP && (Kind_TransCoeffModel != TRANSCOEFFMODEL::WILKE && Kind_TransCoeffModel != TRANSCOEFFMODEL::CHAPMANN_ENSKOG)) {
3595+
SU2_MPI::Error("Only WILKE and Chapmann-Enskog transport model can be used with Mutation++ at the moment.", CURRENT_FUNCTION);
35923596
}
35933597

35943598
if (!ideal_gas && !nemo) {

SU2_CFD/include/fluid/CNEMOGas.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class CNEMOGas : public CFluidModel {
4848
nHeavy, /*!< \brief Number of heavy particles in gas */
4949
nEl, /*!< \brief Number of electrons in gas */
5050
nDim, /*!< \brief Number of dimensions. */
51-
nEnergyEq = 2, /*!< \brief Number of energy equations for the 2T model. */
52-
Kind_TransCoeffModel; /*!< \brief Transport coefficients model for NEMO solver. */
51+
nEnergyEq = 2; /*!< \brief Number of energy equations for the 2T model. */
52+
TRANSCOEFFMODEL Kind_TransCoeffModel; /*!< \brief Transport coefficients model for NEMO solver. */
5353

5454
unsigned iSpecies, /*!< \brief Common iteration counter for species */
5555
jSpecies, /*!< \brief Common iteration counter for species */

SU2_CFD/include/output/CFlowOutput.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@ class CFlowOutput : public CFVMOutput{
8888
*/
8989
void Set_CpInverseDesign(CSolver *solver, const CGeometry *geometry, const CConfig *config);
9090

91+
/*!
92+
* \brief Add nearfield inverse design output as history fields
93+
*/
94+
void Add_NearfieldInverseDesignOutput();
95+
96+
/*!
97+
* \brief Set nearfield inverse design output field values (and also into the solver).
98+
* \param[in,out] solver - The container holding all solution data.
99+
* \param[in] geometry - Geometrical definition of the problem.
100+
* \param[in] config - Definition of the particular problem.
101+
*/
102+
void Set_NearfieldInverseDesign(CSolver *solver, const CGeometry *geometry, const CConfig *config);
103+
91104
/*!
92105
* \brief Compute value of the Q criteration for vortex idenfitication
93106
* \param[in] VelocityGradient - Velocity gradients

SU2_CFD/include/output/COutputLegacy.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,6 @@ class COutputLegacy {
127127
*/
128128
~COutputLegacy(void);
129129

130-
/*!
131-
* \brief Writes equivalent area.
132-
* \param[in] solver - Container vector with all the solutions.
133-
* \param[in] geometry - Geometrical definition of the problem.
134-
* \param[in] config - Definition of the particular problem.
135-
* \param[in] output - Create output files.
136-
*/
137-
void SpecialOutput_SonicBoom(CSolver *solver, CGeometry *geometry, CConfig *config, bool output) const;
138-
139130
/*!
140131
* \brief Writes inverse design.
141132
* \param[in] solver_container - Container vector with all the solutions.

SU2_CFD/include/solvers/CEulerSolver.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -836,12 +836,6 @@ class CEulerSolver : public CFVMFlowSolverBase<CEulerVariable, ENUM_REGIME::COMP
836836
*/
837837
inline su2double GetInflow_Mach(unsigned short val_marker) const final { return Inflow_Mach[val_marker]; }
838838

839-
/*!
840-
* \brief Provide the total (inviscid + viscous) non dimensional Equivalent Area coefficient.
841-
* \return Value of the Equivalent Area coefficient (inviscid + viscous contribution).
842-
*/
843-
inline su2double GetTotal_CEquivArea() const final { return Total_CEquivArea; }
844-
845839
/*!
846840
* \brief Provide the total (inviscid + viscous) non dimensional aero CD.
847841
* \return Value of the Aero CD coefficient (inviscid + viscous contribution).
@@ -861,12 +855,6 @@ class CEulerSolver : public CFVMFlowSolverBase<CEulerVariable, ENUM_REGIME::COMP
861855
*/
862856
inline void AddTotal_ComboObj(su2double val_obj) final {Total_ComboObj +=val_obj;}
863857

864-
/*!
865-
* \brief Set the value of the Equivalent Area coefficient.
866-
* \param[in] val_cequivarea - Value of the Equivalent Area coefficient.
867-
*/
868-
inline void SetTotal_CEquivArea(su2double val_cequivarea) final { Total_CEquivArea = val_cequivarea; }
869-
870858
/*!
871859
* \brief Set the value of the Aero drag.
872860
* \param[in] val_cequivarea - Value of the aero drag.

SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ class CFVMFlowSolverBase : public CSolver {
154154
su2double Total_Custom_ObjFunc = 0.0; /*!< \brief Total custom objective function for all the boundaries. */
155155
su2double Total_CpDiff = 0.0; /*!< \brief Total Equivalent Area coefficient for all the boundaries. */
156156
su2double Total_HeatFluxDiff = 0.0; /*!< \brief Total Equivalent Area coefficient for all the boundaries. */
157+
su2double Total_CEquivArea = 0.0; /*!< \brief Total Equivalent Area coefficient for all the boundaries. */
157158
su2double Total_MassFlowRate = 0.0; /*!< \brief Total Mass Flow Rate on monitored boundaries. */
158159
su2double Total_CNearFieldOF = 0.0; /*!< \brief Total Near-Field Pressure coefficient for all the boundaries. */
159160
su2double Total_Heat = 0.0; /*!< \brief Total heat load for all the boundaries. */
@@ -2091,6 +2092,12 @@ class CFVMFlowSolverBase : public CSolver {
20912092
*/
20922093
inline void SetTotal_HeatFluxDiff(su2double val_heat) final { Total_HeatFluxDiff = val_heat; }
20932094

2095+
/*!
2096+
* \brief Set the value of the Equivalent Area coefficient.
2097+
* \param[in] val_equiv - Value of the Equivalent Area coefficient.
2098+
*/
2099+
inline void SetTotal_CEquivArea(su2double val_equiv) final { Total_CEquivArea = val_equiv; }
2100+
20942101
/*!
20952102
* \brief Set the value of the Near-Field pressure oefficient.
20962103
* \param[in] val_cnearfieldpress - Value of the Near-Field pressure coefficient.
@@ -2122,6 +2129,12 @@ class CFVMFlowSolverBase : public CSolver {
21222129
* \return Value of the Equivalent Area coefficient (inviscid + viscous contribution).
21232130
*/
21242131
inline su2double GetTotal_HeatFluxDiff() const final { return Total_HeatFluxDiff; }
2132+
2133+
/*!
2134+
* \brief Provide the total (inviscid + viscous) non dimensional Equivalent Area coefficient.
2135+
* \return Value of the Equivalent Area coefficient (inviscid + viscous contribution).
2136+
*/
2137+
inline su2double GetTotal_CEquivArea() const final { return Total_CEquivArea; }
21252138

21262139
/*!
21272140
* \brief Set the value of the custom objective function.

SU2_CFD/include/solvers/CFVMFlowSolverBase.inl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2900,6 +2900,9 @@ su2double CFVMFlowSolverBase<V,R>::EvaluateCommonObjFunc(const CConfig& config)
29002900
case INVERSE_DESIGN_HEATFLUX:
29012901
objFun += weight * Total_HeatFluxDiff;
29022902
break;
2903+
case EQUIVALENT_AREA:
2904+
objFun += weight*Total_CEquivArea;
2905+
break;
29032906
case THRUST_COEFFICIENT:
29042907
objFun += weight * TotalCoeff.CT;
29052908
break;

SU2_CFD/include/variables/CNEMOEulerVariable.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class CNEMOEulerVariable : public CVariable {
8181
LAM_VISC_INDEX, EDDY_VISC_INDEX, nSpecies;
8282

8383
su2double Tve_Freestream; /*!< \brief Freestream vib-el temperature. */
84+
const bool implicit; /*!< \brief Implicit flag. */
8485

8586
public:
8687

0 commit comments

Comments
 (0)