Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6142816
Add MUSCL_KAPPA options to config class and template
bmunguia Oct 9, 2025
9010bba
Apply kappa-blending to Roe MUSCL reconstruction
bmunguia Oct 9, 2025
f13f486
Merge branch 'develop' into feature_muscl_kappa
bmunguia Oct 11, 2025
92a698c
Fix initializer list order
bmunguia Oct 11, 2025
ea18471
Extend U-MUSCL to SIMD edge and point limiters
bmunguia Oct 12, 2025
3cdc4f7
Extend U-MUSCL extrapolation to non-SIMD upwind residuals
bmunguia Oct 13, 2025
7a145f4
Fix central difference scaling
bmunguia Oct 13, 2025
548fe02
U-MUSCL reconstruction when calculating point limiters
bmunguia Oct 13, 2025
e9081b0
Apply NK relaxation after limiting
bmunguia Oct 13, 2025
1c7c56a
Cleanup
bmunguia Oct 13, 2025
6c9f5b7
Bug fix
bmunguia Oct 13, 2025
e5609c8
Fix VA limiter projection scaling
bmunguia Oct 13, 2025
ab54718
Fix centered difference scaling, and document it
bmunguia Oct 13, 2025
176fdc7
Move MUSCL reconstruction to CSolver
bmunguia Oct 14, 2025
527b64a
Apply relaxation before limiter
bmunguia Oct 14, 2025
3f8e7b5
Update computeLimiters signature, and remove unused include
bmunguia Oct 14, 2025
a54a57c
Print umuscl kappa with limiter info
bmunguia Oct 15, 2025
ac5dd0e
Add regressions with u-muscl reconstruction
bmunguia Oct 16, 2025
a48c71f
Update regression config
bmunguia Oct 16, 2025
3c21aa7
Update regression config
bmunguia Oct 16, 2025
5fa7479
Update regression test values
bmunguia Oct 16, 2025
526e5dd
Fix FSI regression grad file
bmunguia Oct 16, 2025
6cd0abb
Merge branch 'develop' into feature_muscl_kappa
bmunguia Oct 21, 2025
53707ae
Address CConfig and CSolver comments
bmunguia Oct 21, 2025
26f4052
Remove unused variables
bmunguia Oct 21, 2025
c9910dd
Address regression comments
bmunguia Oct 21, 2025
1335c29
Address numerics comments
bmunguia Oct 21, 2025
fcc633f
Update regressions
bmunguia Oct 22, 2025
397f8b2
Update regression workflow
bmunguia Oct 22, 2025
3914991
Update regression test vals
bmunguia Oct 22, 2025
b82d8ea
Remove unused regression configs
bmunguia Oct 22, 2025
f96e641
Update NACA 0012 RANS configs
bmunguia Oct 23, 2025
9ffa8ec
Update other NACA 0012 RANS configs to use binary restart
bmunguia Oct 23, 2025
9afd97f
Update regression test vals
bmunguia Oct 23, 2025
cd045bd
Update n0012 AD regression test vals
bmunguia Oct 23, 2025
dde3fae
Revert regression TestCases branch
bmunguia Oct 23, 2025
a359f75
Update adjoint configs to use same kappa as primal
bmunguia Oct 23, 2025
f46d75c
Update adjoint regression test vals
bmunguia Oct 23, 2025
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
65 changes: 48 additions & 17 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,14 @@ class CConfig {
MUSCL_Turb, /*!< \brief MUSCL scheme for the turbulence equations.*/
MUSCL_Heat, /*!< \brief MUSCL scheme for the (fvm) heat equation.*/
MUSCL_AdjFlow, /*!< \brief MUSCL scheme for the adj flow equations.*/
MUSCL_AdjTurb; /*!< \brief MUSCL scheme for the adj turbulence equations.*/
bool MUSCL_Species; /*!< \brief MUSCL scheme for the species equations.*/
MUSCL_AdjTurb, /*!< \brief MUSCL scheme for the adj turbulence equations.*/
MUSCL_Species; /*!< \brief MUSCL scheme for the species equations.*/
su2double MUSCL_Kappa, /*!< \brief Blending coefficient for U-MUSCL scheme. */
MUSCL_Kappa_Flow, /*!< \brief Blending coefficient for U-MUSCL scheme for the flow equations.*/
MUSCL_Kappa_Turb, /*!< \brief Blending coefficient for U-MUSCL scheme for the turbulence equations.*/
MUSCL_Kappa_Heat, /*!< \brief Blending coefficient for U-MUSCL scheme for the (fvm) heat equation.*/
MUSCL_Kappa_AdjFlow, /*!< \brief Blending coefficient for U-MUSCL scheme for the adj flow equations.*/
MUSCL_Kappa_Species; /*!< \brief Blending coefficient for U-MUSCL scheme for the species equations.*/
bool Use_Accurate_Jacobians; /*!< \brief Use numerically computed Jacobians for AUSM+up(2) and SLAU(2). */
bool Use_Accurate_Turb_Jacobians; /*!< \brief Use numerically computed Jacobians for standard SA turbulence model. */
bool EulerPersson; /*!< \brief Boolean to determine whether this is an Euler simulation with Persson shock capturing. */
Expand Down Expand Up @@ -2457,11 +2463,12 @@ class CConfig {
* \param[in] val_kind_upwind - If upwind scheme, kind of upwind scheme (Roe, etc.).
* \param[in] val_kind_slopelimit - If upwind scheme, kind of slope limit.
* \param[in] val_muscl - Define if we apply a MUSCL scheme or not.
* \param[in] val_muscl_kappa - Define the blending coefficient for the MUSCL scheme.
* \param[in] val_kind_fem - If FEM, what kind of FEM discretization.
*/
void SetKind_ConvNumScheme(unsigned short val_kind_convnumscheme, CENTERED val_kind_centered,
UPWIND val_kind_upwind, LIMITER val_kind_slopelimit,
bool val_muscl, unsigned short val_kind_fem);
bool val_muscl, su2double val_muscl_kappa, unsigned short val_kind_fem);

/*!
* \brief Get the value of limiter coefficient.
Expand Down Expand Up @@ -4617,27 +4624,18 @@ class CConfig {

/*!
* \brief Get if the upwind scheme used MUSCL or not.
* \note This is the information that the code will use, the method will
* change in runtime depending of the specific equation (direct, adjoint,
* linearized) that is being solved.
* \return MUSCL scheme.
*/
bool GetMUSCL_Flow(void) const { return MUSCL_Flow; }

/*!
* \brief Get if the upwind scheme used MUSCL or not.
* \note This is the information that the code will use, the method will
* change in runtime depending of the specific equation (direct, adjoint,
* linearized) that is being solved.
* \return MUSCL scheme.
*/
bool GetMUSCL_Heat(void) const { return MUSCL_Heat; }

/*!
* \brief Get if the upwind scheme used MUSCL or not.
* \note This is the information that the code will use, the method will
* change in runtime depending of the specific equation (direct, adjoint,
* linearized) that is being solved.
* \return MUSCL scheme.
*/
bool GetMUSCL_Turb(void) const { return MUSCL_Turb; }
Expand All @@ -4650,21 +4648,54 @@ class CConfig {

/*!
* \brief Get if the upwind scheme used MUSCL or not.
* \note This is the information that the code will use, the method will
* change in runtime depending of the specific equation (direct, adjoint,
* linearized) that is being solved.
* \return MUSCL scheme.
*/
bool GetMUSCL_AdjFlow(void) const { return MUSCL_AdjFlow; }

/*!
* \brief Get if the upwind scheme used MUSCL or not.
* \return MUSCL scheme.
*/
bool GetMUSCL_AdjTurb(void) const { return MUSCL_AdjTurb; }

/*!
* \brief Get the blending coefficient for the U-MUSCL scheme.
* \note This is the information that the code will use, the method will
* change in runtime depending of the specific equation (direct, adjoint,
* linearized) that is being solved.
* \return MUSCL scheme.
* \return Blending coefficient for the U-MUSCL scheme.
*/
bool GetMUSCL_AdjTurb(void) const { return MUSCL_AdjTurb; }
su2double GetMUSCL_Kappa(void) const { return MUSCL_Kappa; }

/*!
* \brief Get the blending coefficient for the MUSCL scheme.
* \return Blending coefficient for the MUSCL scheme.
*/
su2double GetMUSCL_Kappa_Flow(void) const { return MUSCL_Kappa_Flow; }

/*!
* \brief Get the blending coefficient for the MUSCL scheme.
* \return Blending coefficient for the MUSCL scheme.
*/
su2double GetMUSCL_Kappa_Heat(void) const { return MUSCL_Kappa_Heat; }

/*!
* \brief Get the blending coefficient for the MUSCL scheme.
* \return Blending coefficient for the MUSCL scheme.
*/
su2double GetMUSCL_Kappa_Turb(void) const { return MUSCL_Kappa_Turb; }

/*!
* \brief Get the blending coefficient for the MUSCL scheme.
* \return Blending coefficient for the MUSCL scheme.
*/
su2double GetMUSCL_Kappa_Species(void) const { return MUSCL_Kappa_Species; }

/*!
* \brief Get the blending coefficient for the MUSCL scheme.
* \return Blending coefficient for the MUSCL scheme.
*/
su2double GetMUSCL_Kappa_AdjFlow(void) const { return MUSCL_Kappa_AdjFlow; }

/*!
* \brief Get whether to "Use Accurate Jacobians" for AUSM+up(2) and SLAU(2).
Expand Down
62 changes: 46 additions & 16 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1984,6 +1984,8 @@ void CConfig::SetConfig_Options() {

/*!\brief MUSCL_FLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
addBoolOption("MUSCL_FLOW", MUSCL_Flow, true);
/*!\brief MUSCL_KAPPA_FLOW \n DESCRIPTION: Blending coefficient for the U-MUSCL scheme \ingroup Config*/
addDoubleOption("MUSCL_KAPPA_FLOW", MUSCL_Kappa_Flow, 0.0);
/*!\brief SLOPE_LIMITER_FLOW
* DESCRIPTION: Slope limiter for the direct solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/
addEnumOption("SLOPE_LIMITER_FLOW", Kind_SlopeLimit_Flow, Limiter_Map, LIMITER::VENKATAKRISHNAN);
Expand All @@ -2005,6 +2007,8 @@ void CConfig::SetConfig_Options() {
addConvectOption("CONV_NUM_METHOD_ADJFLOW", Kind_ConvNumScheme_AdjFlow, Kind_Centered_AdjFlow, Kind_Upwind_AdjFlow);
/*!\brief MUSCL_ADJFLOW \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
addBoolOption("MUSCL_ADJFLOW", MUSCL_AdjFlow, true);
/*!\brief MUSCL_KAPPA_ADJFLOW \n DESCRIPTION: Blending coefficient for the U-MUSCL scheme \ingroup Config*/
addDoubleOption("MUSCL_KAPPA_ADJFLOW", MUSCL_Kappa_AdjFlow, 0.0);
/*!\brief SLOPE_LIMITER_ADJFLOW
* DESCRIPTION: Slope limiter for the adjoint solution. \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/
addEnumOption("SLOPE_LIMITER_ADJFLOW", Kind_SlopeLimit_AdjFlow, Limiter_Map, LIMITER::VENKATAKRISHNAN);
Expand All @@ -2016,6 +2020,8 @@ void CConfig::SetConfig_Options() {

/*!\brief MUSCL_TURB \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
addBoolOption("MUSCL_TURB", MUSCL_Turb, false);
/*!\brief MUSCL_KAPPA_TURB \n DESCRIPTION: Blending coefficient for the U-MUSCL scheme \ingroup Config*/
addDoubleOption("MUSCL_KAPPA_TURB", MUSCL_Kappa_Turb, 0.0);
/*!\brief SLOPE_LIMITER_TURB
* \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT VENKATAKRISHNAN \ingroup Config*/
addEnumOption("SLOPE_LIMITER_TURB", Kind_SlopeLimit_Turb, Limiter_Map, LIMITER::VENKATAKRISHNAN);
Expand All @@ -2035,13 +2041,17 @@ void CConfig::SetConfig_Options() {

/*!\brief MUSCL_SPECIES \n DESCRIPTION: Check if the MUSCL scheme should be used \n DEFAULT false \ingroup Config*/
addBoolOption("MUSCL_SPECIES", MUSCL_Species, false);
/*!\brief MUSCL_KAPPA_SPECIES \n DESCRIPTION: Blending coefficient for the U-MUSCL scheme \ingroup Config*/
addDoubleOption("MUSCL_KAPPA_SPECIES", MUSCL_Kappa_Species, 0.0);
/*!\brief SLOPE_LIMITER_SPECIES \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT NONE \ingroup Config*/
addEnumOption("SLOPE_LIMITER_SPECIES", Kind_SlopeLimit_Species, Limiter_Map, LIMITER::NONE);
/*!\brief CONV_NUM_METHOD_SPECIES \n DESCRIPTION: Convective numerical method for species transport \ingroup Config*/
addConvectOption("CONV_NUM_METHOD_SPECIES", Kind_ConvNumScheme_Species, Kind_Centered_Species, Kind_Upwind_Species);

/*!\brief MUSCL_HEAT \n DESCRIPTION: Check if the MUSCL scheme should be used \ingroup Config*/
addBoolOption("MUSCL_HEAT", MUSCL_Heat, false);
/*!\brief MUSCL_KAPPA_HEAT \n DESCRIPTION: Blending coefficient for the U-MUSCL scheme \ingroup Config*/
addDoubleOption("MUSCL_KAPPA_HEAT", MUSCL_Kappa_Heat, 0.0);
/*!\brief SLOPE_LIMITER_HEAT \n DESCRIPTION: Slope limiter \n OPTIONS: See \link Limiter_Map \endlink \n DEFAULT NONE \ingroup Config*/
addEnumOption("SLOPE_LIMITER_HEAT", Kind_SlopeLimit_Heat, Limiter_Map, LIMITER::NONE);
/*!\brief CONV_NUM_METHOD_HEAT \n DESCRIPTION: Convective numerical method */
Expand Down Expand Up @@ -5517,6 +5527,23 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
CURRENT_FUNCTION);
}

/* Check MUSCL blending coefficients. */
if (MUSCL_Flow && (MUSCL_Kappa_Flow < -1.0 || MUSCL_Kappa_Flow > 1.0)) {
SU2_MPI::Error("MUSCL_KAPPA_FLOW should be in range [-1.0, 1.0].", CURRENT_FUNCTION);
}
if (MUSCL_Turb && (MUSCL_Kappa_Turb < -1.0 || MUSCL_Kappa_Turb > 1.0)) {
SU2_MPI::Error("MUSCL_KAPPA_TURB should be in range [-1.0, 1.0].", CURRENT_FUNCTION);
}
if (MUSCL_Heat && (MUSCL_Kappa_Heat < -1.0 || MUSCL_Kappa_Heat > 1.0)) {
SU2_MPI::Error("MUSCL_KAPPA_HEAT should be in range [-1.0, 1.0].", CURRENT_FUNCTION);
}
if (MUSCL_AdjFlow && (MUSCL_Kappa_AdjFlow < -1.0 || MUSCL_Kappa_AdjFlow > 1.0)) {
SU2_MPI::Error("MUSCL_KAPPA_ADJFLOW should be in range [-1.0, 1.0].", CURRENT_FUNCTION);
}
if (MUSCL_Species && (MUSCL_Kappa_Species < -1.0 || MUSCL_Kappa_Species > 1.0)) {
SU2_MPI::Error("MUSCL_KAPPA_SPECIES should be in range [-1.0, 1.0].", CURRENT_FUNCTION);
}

/* Check for whether we need a second gradient method to calculate
gradients for uwpind reconstruction. Set additional booleans to
minimize overhead as appropriate. */
Expand Down Expand Up @@ -6939,8 +6966,9 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {

if (val_software == SU2_COMPONENT::SU2_CFD) {

auto PrintLimiterInfo = [&](const LIMITER kind_limiter) {
auto PrintLimiterInfo = [&](const LIMITER kind_limiter, const su2double kappa) {
cout << "Second order integration in space, with slope limiter.\n";
if (kappa != 0.0) cout << "U-MUSCL reconstruction, with coefficient: " << kappa << ".\n";
switch (kind_limiter) {
case LIMITER::NONE:
cout << "No slope-limiting method. " << endl;
Expand Down Expand Up @@ -7035,7 +7063,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
}

if (MUSCL_Flow) {
PrintLimiterInfo(Kind_SlopeLimit_Flow);
PrintLimiterInfo(Kind_SlopeLimit_Flow, MUSCL_Kappa_Flow);
} else {
cout << "First order integration in space." << endl;
}
Expand All @@ -7048,7 +7076,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
if (Kind_ConvNumScheme_Turb == SPACE_UPWIND) {
if (Kind_Upwind_Turb == UPWIND::SCALAR_UPWIND) cout << "Scalar upwind solver for the turbulence model." << endl;
if (MUSCL_Turb) {
PrintLimiterInfo(Kind_SlopeLimit_Turb);
PrintLimiterInfo(Kind_SlopeLimit_Turb, MUSCL_Kappa_Turb);
} else {
cout << "First order integration in space." << endl;
}
Expand All @@ -7074,7 +7102,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
if (Kind_ConvNumScheme_AdjFlow == SPACE_UPWIND) {
if (Kind_Upwind_AdjFlow == UPWIND::ROE) cout << "Roe (with entropy fix = "<< EntropyFix_Coeff <<") solver for the adjoint inviscid terms."<< endl;
if (MUSCL_AdjFlow) {
PrintLimiterInfo(Kind_SlopeLimit_AdjFlow);
PrintLimiterInfo(Kind_SlopeLimit_AdjFlow, MUSCL_Kappa_AdjFlow);
} else {
cout << "First order integration." << endl;
}
Expand All @@ -7088,7 +7116,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
if (Kind_ConvNumScheme_AdjTurb == SPACE_UPWIND) {
if (Kind_Upwind_Turb == UPWIND::SCALAR_UPWIND) cout << "Scalar upwind solver for the adjoint turbulence model." << endl;
if (MUSCL_AdjTurb) {
PrintLimiterInfo(Kind_SlopeLimit_AdjTurb);
PrintLimiterInfo(Kind_SlopeLimit_AdjTurb, 0.0);
} else {
cout << "First order integration." << endl;
}
Expand Down Expand Up @@ -8670,13 +8698,14 @@ unsigned short CConfig::GetContainerPosition(unsigned short val_eqsystem) {
void CConfig::SetKind_ConvNumScheme(unsigned short val_kind_convnumscheme,
CENTERED val_kind_centered, UPWIND val_kind_upwind,
LIMITER val_kind_slopelimit, bool val_muscl,
unsigned short val_kind_fem) {
su2double val_muscl_kappa, unsigned short val_kind_fem) {
Kind_ConvNumScheme = val_kind_convnumscheme;
Kind_Centered = val_kind_centered;
Kind_Upwind = val_kind_upwind;
Kind_FEM = val_kind_fem;
Kind_SlopeLimit = val_kind_slopelimit;
MUSCL = val_muscl;
MUSCL_Kappa = val_muscl_kappa;

}

Expand All @@ -8694,7 +8723,7 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver,
if (val_system == RUNTIME_FLOW_SYS) {
SetKind_ConvNumScheme(Kind_ConvNumScheme_Flow, Kind_Centered_Flow,
Kind_Upwind_Flow, Kind_SlopeLimit_Flow,
MUSCL_Flow, NONE);
MUSCL_Flow, MUSCL_Kappa_Flow, NONE);
SetKind_TimeIntScheme(Kind_TimeIntScheme_Flow);
}
};
Expand All @@ -8703,15 +8732,16 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver,
if (val_system == RUNTIME_TURB_SYS) {
SetKind_ConvNumScheme(Kind_ConvNumScheme_Turb, Kind_Centered_Turb,
Kind_Upwind_Turb, Kind_SlopeLimit_Turb,
MUSCL_Turb, NONE);
MUSCL_Turb, MUSCL_Kappa_Turb, NONE);
SetKind_TimeIntScheme(Kind_TimeIntScheme_Turb);
}
};

auto SetHeatParam = [&]() {
if (val_system == RUNTIME_HEAT_SYS) {
SetKind_ConvNumScheme(Kind_ConvNumScheme_Heat, Kind_Centered_Heat,
Kind_Upwind_Heat, Kind_SlopeLimit_Heat, MUSCL_Heat, NONE);
Kind_Upwind_Heat, Kind_SlopeLimit_Heat, MUSCL_Heat,
MUSCL_Kappa_Heat, NONE);
SetKind_TimeIntScheme(Kind_TimeIntScheme_Heat);
}
};
Expand All @@ -8720,7 +8750,7 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver,
if (val_system == RUNTIME_SPECIES_SYS) {
SetKind_ConvNumScheme(Kind_ConvNumScheme_Species, Kind_Centered_Species,
Kind_Upwind_Species, Kind_SlopeLimit_Species,
MUSCL_Species, NONE);
MUSCL_Species, MUSCL_Kappa_Species, NONE);
SetKind_TimeIntScheme(Kind_TimeIntScheme_Species);
}
};
Expand All @@ -8729,7 +8759,7 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver,
if (val_system == RUNTIME_ADJFLOW_SYS) {
SetKind_ConvNumScheme(Kind_ConvNumScheme_AdjFlow, Kind_Centered_AdjFlow,
Kind_Upwind_AdjFlow, Kind_SlopeLimit_AdjFlow,
MUSCL_AdjFlow, NONE);
MUSCL_AdjFlow, MUSCL_Kappa_AdjFlow, NONE);
SetKind_TimeIntScheme(Kind_TimeIntScheme_AdjFlow);
}
};
Expand All @@ -8755,7 +8785,7 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver,
if (val_system == RUNTIME_TRANS_SYS) {
SetKind_ConvNumScheme(Kind_ConvNumScheme_Turb, Kind_Centered_Turb,
Kind_Upwind_Turb, Kind_SlopeLimit_Turb,
MUSCL_Turb, NONE);
MUSCL_Turb, MUSCL_Kappa_Turb, NONE);
SetKind_TimeIntScheme(Kind_TimeIntScheme_Turb);
}
break;
Expand All @@ -8769,7 +8799,7 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver,
if (val_system == RUNTIME_FLOW_SYS) {
SetKind_ConvNumScheme(Kind_ConvNumScheme_FEM_Flow, Kind_Centered_Flow,
Kind_Upwind_Flow, Kind_SlopeLimit_Flow,
MUSCL_Flow, Kind_FEM_Flow);
MUSCL_Flow, MUSCL_Kappa_Flow, Kind_FEM_Flow);
SetKind_TimeIntScheme(Kind_TimeIntScheme_FEM_Flow);
}
break;
Expand All @@ -8786,22 +8816,22 @@ void CConfig::SetGlobalParam(MAIN_SOLVER val_solver,
if (val_system == RUNTIME_ADJTURB_SYS) {
SetKind_ConvNumScheme(Kind_ConvNumScheme_AdjTurb, Kind_Centered_AdjTurb,
Kind_Upwind_AdjTurb, Kind_SlopeLimit_AdjTurb,
MUSCL_AdjTurb, NONE);
MUSCL_AdjTurb, 0.0, NONE);
SetKind_TimeIntScheme(Kind_TimeIntScheme_AdjTurb);
}
break;
case MAIN_SOLVER::HEAT_EQUATION:
case MAIN_SOLVER::DISC_ADJ_HEAT:
if (val_system == RUNTIME_HEAT_SYS) {
SetKind_ConvNumScheme(NONE, CENTERED::NONE, UPWIND::NONE, LIMITER::NONE, NONE, NONE);
SetKind_ConvNumScheme(NONE, CENTERED::NONE, UPWIND::NONE, LIMITER::NONE, NONE, 0.0, NONE);
SetKind_TimeIntScheme(Kind_TimeIntScheme_Heat);
}
break;

case MAIN_SOLVER::FEM_ELASTICITY:
case MAIN_SOLVER::DISC_ADJ_FEM:
if (val_system == RUNTIME_FEA_SYS) {
SetKind_ConvNumScheme(NONE, CENTERED::NONE, UPWIND::NONE, LIMITER::NONE, NONE, NONE);
SetKind_ConvNumScheme(NONE, CENTERED::NONE, UPWIND::NONE, LIMITER::NONE, NONE, 0.0, NONE);
SetKind_TimeIntScheme(NONE);
}
break;
Expand Down
20 changes: 19 additions & 1 deletion SU2_CFD/include/limiters/CLimiterDetails.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,24 @@ struct LimiterHelpers
{
FORCEINLINE static Type epsilon() {return std::numeric_limits<passivedouble>::epsilon();}

FORCEINLINE static Type umusclProjection(const Type& grad_proj, const Type& delta, const Type& kappa)
{
/*-------------------------------------------------------------------*/
/*--- Reconstruction will be V_L = V_i + 0.25 * dV_ij^kappa. ---*/
/*--- Scale dV_ij^cent by 0.5 here and return 0.5 * dV_ij^kappa ---*/
/*--- for backward compatibility (i.e. when kappa==0 and this ---*/
/*--- function isn't called, the reconstruction will be ---*/
/*--- V_L = V_i + 0.5 * proj, otherwise V_L = V_i + 0.5 * blend). ---*/
/*-------------------------------------------------------------------*/
const Type cent = 0.5 * delta;

/*--- Upwind difference: dV_ij^upw = 2 grad(Vi) dot vector_ij - dV_ij^cent ---*/
const Type upw = grad_proj - cent;

/*--- Blended difference: dV_ij^kappa = (1-kappa)dV_ij^upw + (1+kappa)dV_ij^cent ---*/
return (1.0 - kappa) * upw + (1.0 + kappa) * cent;
}

FORCEINLINE static Type venkatFunction(const Type& proj, const Type& delta, const Type& eps2)
{
Type y = delta*(delta+proj) + eps2;
Expand All @@ -79,7 +97,7 @@ struct LimiterHelpers

FORCEINLINE static Type vanAlbadaFunction(const Type& proj, const Type& delta, const Type& eps)
{
return delta * (2*proj + delta) / (4*pow(proj, 2) + pow(delta, 2) + eps);
return delta * (proj + delta) / (pow(proj, 2) + pow(delta, 2) + eps);
}

FORCEINLINE static Type raisedSine(const Type& dist)
Expand Down
Loading