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] Implementation of Simplified LM Transition model #1901

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a7136d3
- Just copied the CTransLMSolver header and source to commit
rois1995 Jan 27, 2023
e9226db
- Start of implementation of Simplified LM transition model
rois1995 Jan 27, 2023
d03742a
- Modify number of variables if SLM option is used
rois1995 Jan 27, 2023
e17872d
- Updates on the transition model.
rois1995 Jan 31, 2023
4b9c615
- Added Cross flow effects for SLM
rois1995 Jan 31, 2023
04cd56d
- Fixed Intermittency_Sep computation for SLM.
rois1995 Feb 2, 2023
e29b4df
- Added computation for normals of grid points
rois1995 Feb 24, 2023
0319d62
Fixed normal extraction from structure
rois1995 Feb 24, 2023
b1edf61
Added computation of wall normals to the CPoint structure
rois1995 Feb 24, 2023
7eee4ab
Check For changes
rois1995 Apr 27, 2023
c461518
Removing changes for SA-R
rois1995 Apr 27, 2023
e68a9e4
Fixed vertex indexing for wall normal computation
rois1995 Apr 27, 2023
bcdd671
Removed a cout
rois1995 Apr 27, 2023
9bb2435
Fixed division by zero with Corr_Rec
rois1995 Apr 27, 2023
a9a6ce4
Removed cout
rois1995 Apr 27, 2023
86b068c
Fixed Max Velocity-Z output for Incompressible flow
rois1995 Apr 27, 2023
73c0a4b
Fixed output of Normals in volume
rois1995 Apr 27, 2023
8d5148e
- Added Simplified Langtry Menter model
rois1995 Jul 1, 2024
9db7301
- corrected bu in output
rois1995 Jul 1, 2024
1e7e7a3
Merge branch 'develop' into feature_Trans_SLM_v8
rois1995 Sep 12, 2024
ab2d71b
Merge remote-tracking branch 'origin/feature_Trans_SLM_v8' into featu…
rois1995 Sep 13, 2024
a6fe9bc
- finish update
rois1995 Sep 13, 2024
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
4 changes: 4 additions & 0 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,7 @@ static const MapType<std::string, TURB_TRANS_MODEL> Trans_Model_Map = {
enum class LM_OPTIONS {
NONE, /*!< \brief No option / default. */
LM2015, /*!< \brief Cross-flow corrections. */
SLM, /*!< \brief Simplified version. */
MALAN, /*!< \brief Kind of transition correlation model (Malan). */
SULUKSNA, /*!< \brief Kind of transition correlation model (Suluksna). */
KRAUSE, /*!< \brief Kind of transition correlation model (Krause). */
Expand All @@ -1187,6 +1188,7 @@ enum class LM_OPTIONS {
static const MapType<std::string, LM_OPTIONS> LM_Options_Map = {
MakePair("NONE", LM_OPTIONS::NONE)
MakePair("LM2015", LM_OPTIONS::LM2015)
MakePair("SLM", LM_OPTIONS::SLM)
MakePair("MALAN", LM_OPTIONS::MALAN)
MakePair("SULUKSNA", LM_OPTIONS::SULUKSNA)
MakePair("KRAUSE", LM_OPTIONS::KRAUSE)
Expand Down Expand Up @@ -1216,6 +1218,7 @@ enum class TURB_TRANS_CORRELATION {
struct LM_ParsedOptions {
LM_OPTIONS version = LM_OPTIONS::NONE; /*!< \brief LM base model. */
bool LM2015 = false; /*!< \brief Use cross-flow corrections. */
bool SLM = false; /*!< \brief Use simplified version. */
TURB_TRANS_CORRELATION Correlation = TURB_TRANS_CORRELATION::DEFAULT;
};

Expand All @@ -1235,6 +1238,7 @@ inline LM_ParsedOptions ParseLMOptions(const LM_OPTIONS *LM_Options, unsigned sh
};

LMParsedOptions.LM2015 = IsPresent(LM_OPTIONS::LM2015);
LMParsedOptions.SLM = IsPresent(LM_OPTIONS::SLM);

int NFoundCorrelations = 0;
if (IsPresent(LM_OPTIONS::MALAN)) {
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/src/solvers/CSolverFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ CSolver* CSolverFactory::CreateTransSolver(TURB_TRANS_MODEL kindTransModel, CSol
solver[FLOW_SOL]->Preprocessing(geometry, solver, config, iMGLevel, NO_RK_ITER, RUNTIME_FLOW_SYS, false);
transSolver->Postprocessing(geometry, solver, config, iMGLevel);
solver[FLOW_SOL]->Preprocessing(geometry, solver, config, iMGLevel, NO_RK_ITER, RUNTIME_FLOW_SYS, false);
break;
break;
case TURB_TRANS_MODEL::NONE:
break;
}
Expand Down
46 changes: 30 additions & 16 deletions SU2_CFD/src/solvers/CTransLMSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,17 @@ CTransLMSolver::CTransLMSolver(CGeometry *geometry, CConfig *config, unsigned sh

nDim = geometry->GetnDim();

/*--- Define variables needed for transition from config file */
/*--- Define variables needed for transition from config file ---*/
options = config->GetLMParsedOptions();
TransCorrelations.SetOptions(options);
TurbFamily = TurbModelFamily(config->GetKind_Turb_Model());

/*--- Check if Simplified version is used ---*/
if (options.SLM) {
nVar = 1;
nPrimVar = 1;
}

/*--- Single grid simulation ---*/

if (iMesh == MESH_0) {
Expand Down Expand Up @@ -101,33 +107,41 @@ CTransLMSolver::CTransLMSolver(CGeometry *geometry, CConfig *config, unsigned sh
lowerlimit[0] = 1.0e-4;
upperlimit[0] = 5.0;

lowerlimit[1] = 1.0e-4;
upperlimit[1] = 1.0e15;
if (!options.SLM) {
lowerlimit[1] = 1.0e-4;
upperlimit[1] = 1.0e15;
}

/*--- Far-field flow state quantities and initialization. ---*/
const su2double Intensity = config->GetTurbulenceIntensity_FreeStream()*100.0;

const su2double Intermittency_Inf = 1.0;
su2double ReThetaT_Inf = 100.0;
Solution_Inf[0] = Intermittency_Inf;

/*--- Momentum thickness Reynolds number, initialized from freestream turbulent intensity*/
if (Intensity <= 1.3) {
if(Intensity >=0.027) {
ReThetaT_Inf = (1173.51-589.428*Intensity+0.2196/(Intensity*Intensity));
su2double ReThetaT_Inf = 0.0;

if (!options.SLM) {
su2double ReThetaT_Inf = 100.0;
Fixed Show fixed Hide fixed

/*--- Momentum thickness Reynolds number, initialized from freestream turbulent intensity*/
if (Intensity <= 1.3) {
if(Intensity >=0.027) {
ReThetaT_Inf = (1173.51-589.428*Intensity+0.2196/(Intensity*Intensity));
}
else {
ReThetaT_Inf = (1173.51-589.428*Intensity+0.2196/(0.27*0.27));
}
}
else {
ReThetaT_Inf = (1173.51-589.428*Intensity+0.2196/(0.27*0.27));
else if(Intensity>1.3) {
ReThetaT_Inf = 331.5*pow(Intensity-0.5658,-0.671);
}
}
else if(Intensity>1.3) {
ReThetaT_Inf = 331.5*pow(Intensity-0.5658,-0.671);
}

Solution_Inf[0] = Intermittency_Inf;
Solution_Inf[1] = ReThetaT_Inf;
Solution_Inf[1] = ReThetaT_Inf;
}

/*--- Initialize the solution to the far-field state everywhere. ---*/
nodes = new CTransLMVariable(Intermittency_Inf, ReThetaT_Inf, 1.0, 1.0, nPoint, nDim, nVar, config);

SetBaseClassPointerToNodes();

/*--- MPI solution ---*/
Expand Down
5 changes: 4 additions & 1 deletion SU2_CFD/src/variables/CTransLMVariable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@
CTransLMVariable::CTransLMVariable(su2double Intermittency, su2double ReThetaT, su2double gammaSep, su2double gammaEff, unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config)
: CTurbVariable(npoint, ndim, nvar, config) {

LM_ParsedOptions options = config->GetLMParsedOptions();

for(unsigned long iPoint=0; iPoint<nPoint; ++iPoint)
{
Solution(iPoint,0) = Intermittency;
Solution(iPoint,1) = ReThetaT;
if(!options.SLM)
Solution(iPoint,1) = ReThetaT;
}

Solution_Old = Solution;
Expand Down