Skip to content
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

[WIP] Wall Model LES #1120

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@ class CConfig {
long Visualize_CV; /*!< \brief Node number for the CV to be visualized */
bool ExtraOutput; /*!< \brief Check if extra output need. */
bool Wall_Functions; /*!< \brief Use wall functions with the turbulence model */
bool Wall_Models; /*!< \brief Use wall modeled Large Eddy Simulation */
long ExtraHeatOutputZone; /*!< \brief Heat solver zone with extra screen output */
bool DeadLoad; /*!< \brief Application of dead loads to the FE analysis */
bool PseudoStatic; /*!< \brief Application of dead loads to the FE analysis */
Expand Down Expand Up @@ -971,6 +972,8 @@ class CConfig {
unsigned short DirectDiff; /*!< \brief Direct Differentation mode. */
bool DiscreteAdjoint; /*!< \brief AD-based discrete adjoint mode. */
su2double Const_DES; /*!< \brief Detached Eddy Simulation Constant. */
su2double TimeFilter_WMLES; /*!< \brief WMLES Time Filter value. */
su2double Min_LowDissipation; /*!< \brief Lower bound for the hybrid central upwind. */
unsigned short Kind_WindowFct; /*!< \brief Type of window (weight) function for objective functional. */
unsigned short Kind_HybridRANSLES; /*!< \brief Kind of Hybrid RANS/LES. */
unsigned short Kind_RoeLowDiss; /*!< \brief Kind of Roe scheme with low dissipation for unsteady flows. */
Expand Down Expand Up @@ -8685,6 +8688,12 @@ class CConfig {
*/
bool GetWall_Functions(void) const { return Wall_Functions; }

/*!
* \brief Get information about whether to use WMLES.
* \return <code>TRUE</code> if wall functions are on; otherwise <code>FALSE</code>.
*/
bool GetWall_Models(void) const { return Wall_Models; }

/*!
* \brief Get the AD support.
*/
Expand Down Expand Up @@ -8732,6 +8741,18 @@ class CConfig {
*/
su2double GetConst_DES(void) const { return Const_DES; }

/*!
* \brief Get the WMLES time filter value
* \return Value of the WMLES time filter.
*/
su2double GetTimeFilter_WMLES(void) const { return TimeFilter_WMLES; }

/*!
* \brief Get the lower bound of the hybrid central upwind.
* \return Value of the hybridization.
*/
su2double GetMin_LowDissipation(void) const { return Min_LowDissipation; }

/*!
* \brief Get QCR (SA-QCR2000).
*/
Expand Down
22 changes: 12 additions & 10 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,14 +916,16 @@ enum ENUM_SGS_MODEL {
IMPLICIT_LES = 1, /*!< \brief Implicit LES, i.e. no explicit SGS model. */
SMAGORINSKY = 2, /*!< \brief Smagorinsky SGS model. */
WALE = 3, /*!< \brief Wall-Adapting Local Eddy-viscosity SGS model. */
VREMAN = 4 /*!< \brief Vreman SGS model. */
VREMAN = 4, /*!< \brief Vreman SGS model. */
SIGMA = 5 /*!< \brief Vreman SGS model. */
};
static const MapType<string, ENUM_SGS_MODEL> SGS_Model_Map = {
MakePair("NONE", NO_SGS_MODEL)
MakePair("IMPLICIT_LES", IMPLICIT_LES)
MakePair("SMAGORINSKY", SMAGORINSKY)
MakePair("WALE", WALE)
MakePair("VREMAN", VREMAN)
MakePair("SIGMA", SIGMA)
};


Expand Down Expand Up @@ -985,20 +987,20 @@ static const MapType<string, ENUM_ROELOWDISS> RoeLowDiss_Map = {
enum ENUM_WALL_FUNCTIONS {
NO_WALL_FUNCTION = 0, /*!< \brief No wall function treatment, integration to the wall. Default behavior. */
STANDARD_WALL_FUNCTION = 1, /*!< \brief Standard wall function. */
ADAPTIVE_WALL_FUNCTION = 2, /*!< \brief Adaptive wall function. Formulation depends on y+. */
SCALABLE_WALL_FUNCTION = 3, /*!< \brief Scalable wall function. */
EQUILIBRIUM_WALL_MODEL = 4, /*!< \brief Equilibrium wall model for LES. */
NONEQUILIBRIUM_WALL_MODEL = 5, /*!< \brief Non-equilibrium wall model for LES. */
LOGARITHMIC_WALL_MODEL = 6 /*!< \brief Logarithmic law-of-the-wall model for LES. */
EQUILIBRIUM_WALL_MODEL = 2, /*!< \brief Equilibrium wall model for LES. */
LOGARITHMIC_WALL_MODEL = 3, /*!< \brief Reichardt's law-of-the-wall model for LES. */
ALGEBRAIC_WALL_MODEL = 4, /*!< \brief Algebraic wall model for LES. */
APGLL_WALL_MODEL = 5, /*!< \brief Adverse Pressure Gradient Wall Model for LES. */
TEMPLATE_WALL_MODEL = 6 /*!< \brief Template Wall Model */
Comment on lines -992 to +994
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add/update the config_template.cfg with the changes introduced in this PR.

};
static const MapType<string, ENUM_WALL_FUNCTIONS> Wall_Functions_Map = {
MakePair("NO_WALL_FUNCTION", NO_WALL_FUNCTION)
MakePair("STANDARD_WALL_FUNCTION", STANDARD_WALL_FUNCTION)
MakePair("ADAPTIVE_WALL_FUNCTION", ADAPTIVE_WALL_FUNCTION)
MakePair("SCALABLE_WALL_FUNCTION", SCALABLE_WALL_FUNCTION)
MakePair("EQUILIBRIUM_WALL_MODEL", EQUILIBRIUM_WALL_MODEL)
MakePair("NONEQUILIBRIUM_WALL_MODEL", NONEQUILIBRIUM_WALL_MODEL)
MakePair("LOGARITHMIC_WALL_MODEL", LOGARITHMIC_WALL_MODEL)
MakePair("LOGARITHMIC_WALL_MODEL", LOGARITHMIC_WALL_MODEL)
MakePair("ALGEBRAIC_WALL_MODEL", ALGEBRAIC_WALL_MODEL)
MakePair("APGLL_WALL_MODEL", APGLL_WALL_MODEL)
MakePair("TEMPLATE_WALL_MODEL", TEMPLATE_WALL_MODEL)
};

/*!
Expand Down
60 changes: 0 additions & 60 deletions Common/include/option_structure.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1979,8 +1979,6 @@ public:
accordingly. ---*/
switch( typeWF ) {
case EQUILIBRIUM_WALL_MODEL: counter += 3; break;
case NONEQUILIBRIUM_WALL_MODEL: counter += 2; break;
case LOGARITHMIC_WALL_MODEL: counter += 3; break;
default: break;
}

Expand Down Expand Up @@ -2054,64 +2052,6 @@ public:
break;
}

case NONEQUILIBRIUM_WALL_MODEL: {

/* LES non-equilibrium model. The RANS turbulence model and
the exchange distance need to be specified. */
this->intInfo[i] = new unsigned short[1];
this->doubleInfo[i] = new su2double[1];

/* Check for a valid RANS turbulence model. */
map<string, ENUM_TURB_MODEL>::const_iterator iit;
iit = Turb_Model_Map.find(option_value[counter++]);
if(iit == Turb_Model_Map.end()) {
string newstring;
newstring.append(this->name);
newstring.append(", marker ");
newstring.append(this->markers[i]);
newstring.append(", wall function type ");
newstring.append(option_value[counter-2]);
newstring.append(": Invalid RANS turbulence model, ");
newstring.append(option_value[counter-1]);
newstring.append(", specified");
return newstring;
}

this->intInfo[i][0] = iit->second;

/* Extract the exchange distance. */
istringstream ss_1st(option_value[counter++]);
if (!(ss_1st >> this->doubleInfo[i][0])) {
return badValue(option_value, "su2double", this->name);
}

break;
}
case LOGARITHMIC_WALL_MODEL: {

/* LES Logarithmic law-of-the-wall model. The exchange distance, stretching
factor and number of points in the wall model must be specified. */
this->intInfo[i] = new unsigned short[1];
this->doubleInfo[i] = new su2double[2];

istringstream ss_1st(option_value[counter++]);
if (!(ss_1st >> this->doubleInfo[i][0])) {
return badValue(option_value, "su2double", this->name);
}

istringstream ss_2nd(option_value[counter++]);
if (!(ss_2nd >> this->doubleInfo[i][1])) {
return badValue(option_value, "su2double", this->name);
}

istringstream ss_3rd(option_value[counter++]);
if (!(ss_3rd >> this->intInfo[i][0])) {
return badValue(option_value, "unsigned short", this->name);
}

break;
}

default: // Just to avoid a compiler warning.
break;
}
Expand Down
Loading