Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into feature_signal_h…
Browse files Browse the repository at this point in the history
…andling
  • Loading branch information
pcarruscag committed Sep 15, 2024
2 parents 213a947 + 4f7a4c7 commit cd80746
Show file tree
Hide file tree
Showing 98 changed files with 2,388 additions and 1,913 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ jobs:
# flags: '--buildtype=debug -Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Reduce ASLR entropy for tsan
run: sudo sysctl -w vm.mmap_rnd_bits=28
- name: Cache Object Files
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -130,8 +128,6 @@ jobs:
flags: '--buildtype=debugoptimized -Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Reduce ASLR entropy for asan
run: sudo sysctl -w vm.mmap_rnd_bits=28
- name: Cache Object Files
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -229,8 +225,6 @@ jobs:
matrix:
testscript: ['hybrid_regression.py', 'hybrid_regression_AD.py']
steps:
- name: Reduce ASLR entropy for tsan
run: sudo sysctl -w vm.mmap_rnd_bits=28
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
with:
Expand Down Expand Up @@ -276,8 +270,6 @@ jobs:
matrix:
testscript: ['serial_regression.py', 'serial_regression_AD.py']
steps:
- name: Reduce ASLR entropy for asan
run: sudo sysctl -w vm.mmap_rnd_bits=28
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
with:
Expand Down
3 changes: 3 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Daumantas Kavolis
Dave Taflin
Eduardo Molina
Edwin van der Weide
Eitan Aberman
Ethan Alan Hereth
Florian Dittmann
Filip Hahs
Expand Down Expand Up @@ -108,6 +109,7 @@ Max Sagebaum
Michele Gaffuri
Mickael Philit
Mladen Banovic
Mor
Nat-1
Nicola Fonzi
Nijso Beishuizen
Expand Down Expand Up @@ -137,6 +139,7 @@ Trent Lukaczyk
Vinzenz Götz
VivaanKhatri
Wally Maier
Yair Mor-Yossef
Y. Chandukrishna
Zan Xu
Zcaic
Expand Down
36 changes: 33 additions & 3 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class CConfig {
su2double Buffet_lambda; /*!< \brief Offset parameter for buffet sensor.*/
su2double Damp_Engine_Inflow; /*!< \brief Damping factor for the engine inlet. */
su2double Damp_Engine_Exhaust; /*!< \brief Damping factor for the engine exhaust. */
unsigned long Bc_Eval_Freq; /*!< \brief Evaluation frequency for Engine and Actuator disk markers. */
su2double Damp_Res_Restric, /*!< \brief Damping factor for the residual restriction. */
Damp_Correc_Prolong; /*!< \brief Damping factor for the correction prolongation. */
su2double Position_Plane; /*!< \brief Position of the Near-Field (y coordinate 2D, and z coordinate 3D). */
Expand Down Expand Up @@ -192,6 +193,7 @@ class CConfig {
nMarker_Fluid_Load, /*!< \brief Number of markers in which the flow load is computed/employed. */
nMarker_Fluid_InterfaceBound, /*!< \brief Number of fluid interface markers. */
nMarker_CHTInterface, /*!< \brief Number of conjugate heat transfer interface markers. */
nMarker_ContactResistance, /*!< \brief Number of CHT interfaces with contact resistance. */
nMarker_Inlet, /*!< \brief Number of inlet flow markers. */
nMarker_Inlet_Species, /*!< \brief Number of inlet species markers. */
nSpecies_per_Inlet, /*!< \brief Number of species defined per inlet markers. */
Expand Down Expand Up @@ -396,6 +398,7 @@ class CConfig {
su2double **Periodic_RotCenter; /*!< \brief Rotational center for each periodic boundary. */
su2double **Periodic_RotAngles; /*!< \brief Rotation angles for each periodic boundary. */
su2double **Periodic_Translation; /*!< \brief Translation vector for each periodic boundary. */
su2double *CHT_ContactResistance; /*!< \brief Contact resistance values for each solid-solid CHT interface. */
string *Marker_CfgFile_TagBound; /*!< \brief Global index for markers using config file. */
unsigned short *Marker_All_KindBC, /*!< \brief Global index for boundaries using grid information. */
*Marker_CfgFile_KindBC; /*!< \brief Global index for boundaries using config file. */
Expand Down Expand Up @@ -589,6 +592,7 @@ class CConfig {
bool EulerPersson; /*!< \brief Boolean to determine whether this is an Euler simulation with Persson shock capturing. */
bool FSI_Problem = false,/*!< \brief Boolean to determine whether the simulation is FSI or not. */
Multizone_Problem; /*!< \brief Boolean to determine whether we are solving a multizone problem. */
//bool ContactResistance = false; /*!< \brief Apply contact resistance for conjugate heat transfer. */
unsigned short nID_DV; /*!< \brief ID for the region of FEM when computed using direct differentiation. */

bool AD_Mode; /*!< \brief Algorithmic Differentiation support. */
Expand Down Expand Up @@ -878,6 +882,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 @@ -2008,6 +2014,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 @@ -3648,6 +3666,13 @@ class CConfig {
*/
unsigned short GetMarker_n_ZoneInterface(void) const { return nMarker_ZoneInterface; }

/*!
* \brief Get the contact resistance value of a specified interface.
* \param[in] val_interface interface index.
* \return Contact resistance value (zero by default).
*/
su2double GetContactResistance(unsigned short val_interface) const { return (nMarker_ContactResistance > 0) ? CHT_ContactResistance[val_interface] : 0.0; }

/*!
* \brief Get the DV information for a marker <i>val_marker</i>.
* \param[in] val_marker - 0 or 1 depending if the the marker is going to be affected by design variables.
Expand Down Expand Up @@ -4321,8 +4346,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 Expand Up @@ -5133,7 +5157,7 @@ class CConfig {
/*!
* \brief Set Monitor Outlet Pressure value for the ramp.
*/
void SetMonitotOutletPressure(su2double newMonPres) { MonitorOutletPressure = newMonPres;}
void SetMonitorOutletPressure(su2double newMonPres) { MonitorOutletPressure = newMonPres;}

/*!
* \brief Get Outlet Pressure Ramp option.
Expand Down Expand Up @@ -6492,6 +6516,12 @@ class CConfig {
*/
su2double GetMinLogResidual(void) const { return MinLogResidual; }

/*!
* \brief Evaluation frequency for Engine and Actuator disk markers.
* \return Value Evaluation frequency .
*/
unsigned long GetBc_Eval_Freq(void) const { return Bc_Eval_Freq; }

/*!
* \brief Value of the damping factor for the engine inlet bc.
* \return Value of the damping factor.
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
26 changes: 26 additions & 0 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ enum ENUM_TRANSFER {
CONJUGATE_HEAT_WEAKLY_FS = 17, /*!< \brief Conjugate heat transfer (between incompressible fluids and solids). */
CONJUGATE_HEAT_SF = 18, /*!< \brief Conjugate heat transfer (between solids and compressible fluids). */
CONJUGATE_HEAT_WEAKLY_SF = 19, /*!< \brief Conjugate heat transfer (between solids and incompressible fluids). */
CONJUGATE_HEAT_SS = 20, /*!< \brief Conjugate heat transfer (between two solids). */
};

/*!
Expand Down Expand Up @@ -990,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 @@ -1002,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 @@ -1013,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 @@ -1048,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 @@ -1068,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
Loading

0 comments on commit cd80746

Please sign in to comment.