Skip to content

Commit

Permalink
This hopefully resolves the merge error I was having
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkellyjak committed Sep 4, 2024
1 parent d106401 commit ef3416a
Show file tree
Hide file tree
Showing 94 changed files with 2,531 additions and 2,186 deletions.
17 changes: 15 additions & 2 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,8 @@ class CConfig {
ReThetaT_FreeStream, /*!< \brief Freestream Transition Momentum Thickness Reynolds Number (for LM transition model) of the fluid. */
NuFactor_FreeStream, /*!< \brief Ratio of turbulent to laminar viscosity. */
NuFactor_Engine, /*!< \brief Ratio of turbulent to laminar viscosity at the engine. */
KFactor_LowerLimit, /*!< \Non dimensional coefficient for lower limit of K in SST model. */
OmegaFactor_LowerLimit, /*!< \Non dimensional coefficient for lower limit of omega in SST model. */
SecondaryFlow_ActDisk, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */
Initial_BCThrust, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */
Pressure_FreeStream, /*!< \brief Total pressure of the fluid. */
Expand Down Expand Up @@ -2014,6 +2016,18 @@ class CConfig {
*/
su2double GetNuFactor_FreeStream(void) const { return NuFactor_FreeStream; }

/*!
* \brief Get the k constant factor define a lower limit by multiplication with values in SST turbulence model.
* \return Non-dimensionalized freestream intensity.
*/
su2double GetKFactor_LowerLimit(void) const { return KFactor_LowerLimit; }

/*!
* \brief Get the w constant factor define a lower limit by multiplication with values in SST turbulencemodel.
* \return Non-dimensionalized freestream intensity.
*/
su2double GetOmegaFactor_LowerLimit(void) const { return OmegaFactor_LowerLimit; }

/*!
* \brief Get the value of the non-dimensionalized engine turbulence intensity.
* \return Non-dimensionalized engine intensity.
Expand Down Expand Up @@ -4334,8 +4348,7 @@ class CConfig {
array<su2double,4> GetNewtonKrylovDblParam(void) const { return NK_DblParam; }

/*!
* \brief Get the relaxation coefficient of the linear solver for the implicit formulation.
* \return relaxation coefficient of the linear solver for the implicit formulation.
* \brief Returns the Roe kappa (multipler of the dissipation term).
*/
su2double GetRoe_Kappa(void) const { return Roe_Kappa; }

Expand Down
24 changes: 12 additions & 12 deletions Common/include/geometry/CGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,10 @@ class CGeometry {
unsigned long* nVertex{nullptr}; /*!< \brief Number of vertex for each marker. */
unsigned long* nElem_Bound{nullptr}; /*!< \brief Number of elements of the boundary. */
string* Tag_to_Marker{nullptr}; /*!< \brief Names of boundary markers. */
vector<bool>
bound_is_straight; /*!< \brief Bool if boundary-marker is straight(2D)/plane(3D) for each local marker. */

/*!< \brief Corrected normals on nodes with shared symmetry markers. */
vector<std::unordered_map<unsigned long, std::array<su2double, MAXNDIM>>> symmetryNormals;

vector<su2double> SurfaceAreaCfgFile; /*!< \brief Total Surface area for all markers. */

/*--- Partitioning-specific variables ---*/
Expand Down Expand Up @@ -819,6 +821,12 @@ class CGeometry {
*/
inline virtual void SetBoundControlVolume(const CConfig* config, unsigned short action) {}

/*!
* \brief Computes modified normals at intersecting symmetry planes.
* \param[in] config - Definition of the particular problem.
*/
void ComputeModifiedSymmetryNormals(const CConfig* config);

/*!
* \brief A virtual member.
* \param[in] config_filename - Name of the file where the tecplot information is going to be stored.
Expand Down Expand Up @@ -936,9 +944,10 @@ class CGeometry {
/*!
* \brief A virtual member.
* \param[in] fine_grid - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \param[in] action - Allocate or not the new elements.
*/
inline virtual void SetBoundControlVolume(const CGeometry* fine_grid, unsigned short action) {}
inline virtual void SetBoundControlVolume(const CGeometry* fine_grid, const CConfig* config, unsigned short action) {}

/*!
* \brief A virtual member.
Expand Down Expand Up @@ -1005,15 +1014,6 @@ class CGeometry {
*/
su2double GetSurfaceArea(const CConfig* config, unsigned short val_marker) const;

/*!
* \brief Check if a boundary is straight(2D) / plane(3D) for EULER_WALL and SYMMETRY_PLANE
* only and store the information in bound_is_straight. For all other boundary types
* this will return false and could therfore be wrong. Used ultimately for BC_Slip_Wall.
* \param[in] config - Definition of the particular problem.
* \param[in] print_on_screen - Boolean whether to print result on screen.
*/
void ComputeSurf_Straightness(CConfig* config, bool print_on_screen);

/*!
* \brief Find and store all vertices on a sharp corner in the geometry.
* \param[in] config - Definition of the particular problem.
Expand Down
3 changes: 2 additions & 1 deletion Common/include/geometry/CMultiGridGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ class CMultiGridGeometry final : public CGeometry {
/*!
* \brief Set boundary vertex structure of the agglomerated control volume.
* \param[in] fine_grid - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \param[in] action - Allocate or not the new elements.
*/
void SetBoundControlVolume(const CGeometry* fine_grid, unsigned short action) override;
void SetBoundControlVolume(const CGeometry* fine_grid, const CConfig* config, unsigned short action) override;

/*!
* \brief Set a representative coordinates of the agglomerated control volume.
Expand Down
9 changes: 6 additions & 3 deletions Common/include/geometry/CPhysicalGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,13 @@ class CPhysicalGeometry final : public CGeometry {
* \brief Routine to launch non-blocking sends and recvs amongst all processors.
* \param[in] bufSend - Buffer of data to be sent.
* \param[in] nElemSend - Array containing the number of elements to send to other processors in cumulative storage
* format. \param[in] sendReq - Array of MPI send requests. \param[in] bufRecv - Buffer of data to be received.
* format.
* \param[in] sendReq - Array of MPI send requests.
* \param[in] bufRecv - Buffer of data to be received.
* \param[in] nElemSend - Array containing the number of elements to receive from other processors in cumulative
* storage format. \param[in] sendReq - Array of MPI recv requests. \param[in] countPerElem - Pieces of data per
* element communicated.
* storage format.
* \param[in] sendReq - Array of MPI recv requests.
* \param[in] countPerElem - Pieces of data per element communicated.
*/
void InitiateCommsAll(void* bufSend, const int* nElemSend, SU2_MPI::Request* sendReq, void* bufRecv,
const int* nElemRecv, SU2_MPI::Request* recvReq, unsigned short countPerElem,
Expand Down
8 changes: 3 additions & 5 deletions Common/include/geometry/dual_grid/CPoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,8 @@ class CPoint {
* \return Index of the vertex.
*/
inline long GetVertex(unsigned long iPoint, unsigned long iMarker) const {
if (Boundary(iPoint))
return Vertex[iPoint][iMarker];
else
return -1;
if (Boundary(iPoint)) return Vertex[iPoint][iMarker];
return -1;
}

/*!
Expand Down Expand Up @@ -369,7 +367,7 @@ class CPoint {
inline bool GetPhysicalBoundary(unsigned long iPoint) const { return PhysicalBoundary(iPoint); }

/*!
* \brief Set if a point belong to the boundary.
* \brief Set if a point belong to the solid wall boundary.
* \param[in] iPoint - Index of the point.
* \param[in] boundary - <code>TRUE</code> if the point belong to the physical boundary; otherwise <code>FALSE</code>.
*/
Expand Down
9 changes: 6 additions & 3 deletions Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,13 @@ class CCGNSMeshReaderFVM : public CMeshReaderFVM {
* \brief Routine to launch non-blocking sends and recvs amongst all processors.
* \param[in] bufSend - Buffer of data to be sent.
* \param[in] nElemSend - Array containing the number of elements to send to other processors in cumulative storage
* format. \param[in] sendReq - Array of MPI send requests. \param[in] bufRecv - Buffer of data to be received.
* format.
* \param[in] sendReq - Array of MPI send requests.
* \param[in] bufRecv - Buffer of data to be received.
* \param[in] nElemSend - Array containing the number of elements to receive from other processors in cumulative
* storage format. \param[in] sendReq - Array of MPI recv requests. \param[in] countPerElem - Pieces of data per
* element communicated.
* storage format.
* \param[in] sendReq - Array of MPI recv requests.
* \param[in] countPerElem - Pieces of data per element communicated.
*/
void InitiateCommsAll(void* bufSend, const int* nElemSend, SU2_MPI::Request* sendReq, void* bufRecv,
const int* nElemRecv, SU2_MPI::Request* recvReq, unsigned short countPerElem,
Expand Down
25 changes: 25 additions & 0 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,9 @@ enum class SST_OPTIONS {
V, /*!< \brief Menter k-w SST model with vorticity production terms. */
KL, /*!< \brief Menter k-w SST model with Kato-Launder production terms. */
UQ, /*!< \brief Menter k-w SST model with uncertainty quantification modifications. */
COMP_Wilcox, /*!< \brief Menter k-w SST model with Compressibility correction of Wilcox. */
COMP_Sarkar, /*!< \brief Menter k-w SST model with Compressibility correction of Sarkar. */
DLL, /*!< \brief Menter k-w SST model with dimensionless lower limit clipping of turbulence variables. */
};
static const MapType<std::string, SST_OPTIONS> SST_Options_Map = {
MakePair("NONE", SST_OPTIONS::NONE)
Expand All @@ -1003,6 +1006,9 @@ static const MapType<std::string, SST_OPTIONS> SST_Options_Map = {
MakePair("VORTICITY", SST_OPTIONS::V)
MakePair("KATO-LAUNDER", SST_OPTIONS::KL)
MakePair("UQ", SST_OPTIONS::UQ)
MakePair("COMPRESSIBILITY-WILCOX", SST_OPTIONS::COMP_Wilcox)
MakePair("COMPRESSIBILITY-SARKAR", SST_OPTIONS::COMP_Sarkar)
MakePair("DIMENSIONLESS_LIMIT", SST_OPTIONS::DLL)
};

/*!
Expand All @@ -1014,6 +1020,9 @@ struct SST_ParsedOptions {
bool sust = false; /*!< \brief Bool for SST model with sustaining terms. */
bool uq = false; /*!< \brief Bool for using uncertainty quantification. */
bool modified = false; /*!< \brief Bool for modified (m) SST model. */
bool compWilcox = false; /*!< \brief Bool for compressibility correction of Wilcox. */
bool compSarkar = false; /*!< \brief Bool for compressibility correction of Sarkar. */
bool dll = false; /*!< \brief Bool dimensionless lower limit. */
};

/*!
Expand Down Expand Up @@ -1049,6 +1058,9 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne
const bool sst_v = IsPresent(SST_OPTIONS::V);
const bool sst_kl = IsPresent(SST_OPTIONS::KL);
const bool sst_uq = IsPresent(SST_OPTIONS::UQ);
const bool sst_compWilcox = IsPresent(SST_OPTIONS::COMP_Wilcox);
const bool sst_compSarkar = IsPresent(SST_OPTIONS::COMP_Sarkar);
const bool sst_dll = IsPresent(SST_OPTIONS::DLL);

if (sst_1994 && sst_2003) {
SU2_MPI::Error("Two versions (1994 and 2003) selected for SST_OPTIONS. Please choose only one.", CURRENT_FUNCTION);
Expand All @@ -1069,9 +1081,22 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne
SSTParsedOptions.production = SST_OPTIONS::UQ;
}

// Parse compressibility options
if (sst_compWilcox && sst_compSarkar) {
SU2_MPI::Error("Please select only one compressibility correction (COMPRESSIBILITY-WILCOX or COMPRESSIBILITY-SARKAR).", CURRENT_FUNCTION);
} else if (sst_compWilcox) {
SSTParsedOptions.production = SST_OPTIONS::COMP_Wilcox;
} else if (sst_compSarkar) {
SSTParsedOptions.production = SST_OPTIONS::COMP_Sarkar;
}

SSTParsedOptions.sust = sst_sust;
SSTParsedOptions.modified = sst_m;
SSTParsedOptions.uq = sst_uq;
SSTParsedOptions.compWilcox = sst_compWilcox;
SSTParsedOptions.compSarkar = sst_compSarkar;
SSTParsedOptions.dll = sst_dll;

return SSTParsedOptions;
}

Expand Down
28 changes: 24 additions & 4 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,10 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: */
addDoubleOption("FREESTREAM_NU_FACTOR", NuFactor_FreeStream, 3.0);
/* DESCRIPTION: */
addDoubleOption("LOWER_LIMIT_K_FACTOR", KFactor_LowerLimit, 1.0e-15);
/* DESCRIPTION: */
addDoubleOption("LOWER_LIMIT_OMEGA_FACTOR", OmegaFactor_LowerLimit, 1e-05);
/* DESCRIPTION: */
addDoubleOption("ENGINE_NU_FACTOR", NuFactor_Engine, 3.0);
/* DESCRIPTION: */
addDoubleOption("ACTDISK_SECONDARY_FLOW", SecondaryFlow_ActDisk, 0.0);
Expand Down Expand Up @@ -3478,9 +3482,12 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
saParsedOptions = ParseSAOptions(SA_Options, nSA_Options, rank);
}

/*--- Check if turbulence model can be used for AXISYMMETRIC case---*/
if (Axisymmetric && Kind_Turb_Model != TURB_MODEL::NONE && Kind_Turb_Model != TURB_MODEL::SST){
SU2_MPI::Error("Axisymmetry is currently only supported for KIND_TURB_MODEL chosen as SST", CURRENT_FUNCTION);
if (Kind_Solver == MAIN_SOLVER::INC_RANS && sstParsedOptions.compSarkar){
SU2_MPI::Error("COMPRESSIBILITY-SARKAR only supported for SOLVER= RANS", CURRENT_FUNCTION);
}

if (Kind_Solver == MAIN_SOLVER::INC_RANS && sstParsedOptions.compWilcox){
SU2_MPI::Error("COMPRESSIBILITY-WILCOX only supported for SOLVER= RANS", CURRENT_FUNCTION);
}

/*--- Postprocess LM_OPTIONS into structure. ---*/
Expand Down Expand Up @@ -6217,7 +6224,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
if (sstParsedOptions.version == SST_OPTIONS::V1994) cout << "-1994";
else cout << "-2003";
if (sstParsedOptions.modified) cout << "m";
if (sstParsedOptions.sust) cout << " with sustaining terms, and";
if (sstParsedOptions.sust) cout << " with sustaining terms,";

switch (sstParsedOptions.production) {
case SST_OPTIONS::KL:
Expand All @@ -6230,10 +6237,23 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
cout << "\nperturbing the Reynold's Stress Matrix towards " << eig_val_comp << " component turbulence";
if (uq_permute) cout << " (permuting eigenvectors)";
break;
case SST_OPTIONS::COMP_Wilcox:
cout << " with compressibility correction of Wilcox";
break;
case SST_OPTIONS::COMP_Sarkar:
cout << " with compressibility correction of Sarkar";
break;
default:
cout << " with no production modification";
break;
}

if (sstParsedOptions.dll){
cout << "\nusing non dimensional lower limits relative to infinity values clipping by Coefficients:" ;
cout << " C_w= " << OmegaFactor_LowerLimit << " and C_k= " <<KFactor_LowerLimit ;
}
else cout << "\nusing default hard coded lower limit clipping";

cout << "." << endl;
break;
}
Expand Down
Loading

0 comments on commit ef3416a

Please sign in to comment.