Skip to content

Commit ae6930e

Browse files
committed
add to nemo
1 parent 5587125 commit ae6930e

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

Common/include/CConfig.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ class CConfig {
627627
unsigned short nInc_Outlet; /*!< \brief Number of inlet boundary treatment types listed. */
628628
su2double Inc_Inlet_Damping; /*!< \brief Damping factor applied to the iterative updates to the velocity at a pressure inlet in incompressible flow. */
629629
su2double Inc_Outlet_Damping; /*!< \brief Damping factor applied to the iterative updates to the pressure at a mass flow outlet in incompressible flow. */
630-
bool Inlet_UseNormal; /*!< \brief Flag for whether to use the local normal as the flow direction for an (in)compressible pressure inlet. */
630+
bool InletUseNormal; /*!< \brief Flag for whether to use the local normal as the flow direction for a pressure inlet. */
631631
su2double Linear_Solver_Error; /*!< \brief Min error of the linear solver for the implicit formulation. */
632632
su2double Deform_Linear_Solver_Error; /*!< \brief Min error of the linear solver for the implicit formulation. */
633633
su2double Linear_Solver_Smoother_Relaxation; /*!< \brief Relaxation factor for iterative linear smoothers. */
@@ -5064,7 +5064,7 @@ class CConfig {
50645064
* \brief Flag for whether the local boundary normal is used as the flow direction for an incompressible pressure inlet.
50655065
* \return <code>FALSE</code> means the prescribed flow direction is used.
50665066
*/
5067-
bool Get_Inlet_UseNormal(void) const { return Inlet_UseNormal;}
5067+
bool GetInletUseNormal(void) const { return InletUseNormal; }
50685068

50695069
/*!
50705070
* \brief Get the type of incompressible outlet from the list.

Common/src/CConfig.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,12 +1384,6 @@ void CConfig::SetConfig_Options() {
13841384
/*!\brief INC_NONDIM \n DESCRIPTION: Non-dimensionalization scheme for incompressible flows. \ingroup Config*/
13851385
addEnumOption("INC_NONDIM", Ref_Inc_NonDim, NonDim_Map, INITIAL_VALUES);
13861386

1387-
/*--- INC_INLET_USENORMAL is deprecated, we now have INLET_USENORMAL ---*/
1388-
//addBoolOption("INC_INLET_USENORMAL", Inlet_UseNormal, false);
1389-
1390-
/*!\brief INLET_USENORMAL \n DESCRIPTION: Use the local boundary normal for the flow direction with the (in)compressible pressure inlet. \ingroup Config*/
1391-
addBoolOption("INLET_USENORMAL", Inlet_UseNormal, false);
1392-
13931387
/*!\brief INC_INLET_DAMPING \n DESCRIPTION: Damping factor applied to the iterative updates to the velocity at a pressure inlet in incompressible flow (0.1 by default). \ingroup Config*/
13941388
addDoubleOption("INC_INLET_DAMPING", Inc_Inlet_Damping, 0.1);
13951389
/*!\brief INC_OUTLET_DAMPING \n DESCRIPTION: Damping factor applied to the iterative updates to the pressure at a mass flow outlet in incompressible flow (0.1 by default). \ingroup Config*/
@@ -1591,6 +1585,8 @@ void CConfig::SetConfig_Options() {
15911585

15921586
/*!\brief INLET_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Inlet_Map \endlink \n DEFAULT: TOTAL_CONDITIONS \ingroup Config*/
15931587
addEnumOption("INLET_TYPE", Kind_Inlet, Inlet_Map, INLET_TYPE::TOTAL_CONDITIONS);
1588+
/*!\brief INLET_USE_NORMAL \n DESCRIPTION: Use the local boundary normal for the flow direction with pressure inlets. \ingroup Config*/
1589+
addBoolOption("INLET_USE_NORMAL", InletUseNormal, false);
15941590
/*!\brief INC_INLET_TYPE \n DESCRIPTION: List of inlet types for incompressible flows. List length must match number of inlet markers. Options: VELOCITY_INLET, PRESSURE_INLET, INPUT_FILE. \ingroup Config*/
15951591
addEnumListOption("INC_INLET_TYPE", nInc_Inlet, Kind_Inc_Inlet, Inlet_Map);
15961592
addBoolOption("SPECIFIED_INLET_PROFILE", Inlet_From_File, false);
@@ -3115,6 +3111,8 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){
31153111
newString.append("SPECIES_USE_STRONG_BC is deprecated. Use MARKER_SPECIES_STRONG_BC= (marker1, ...) instead.\n\n");
31163112
else if (!option_name.compare("DEAD_LOAD"))
31173113
newString.append("DEAD_LOAD is deprecated. Use GRAVITY_FORCE or BODY_FORCE instead.\n\n");
3114+
else if (!option_name.compare("INC_INLET_USENORMAL"))
3115+
newString.append("INC_INLET_USENORMAL is deprecated. Use INLET_USE_NORMAL instead (compatible with all solvers).\n\n");
31183116
else {
31193117
/*--- Find the most likely candidate for the unrecognized option, based on the length
31203118
of start and end character sequences shared by candidates and the option. ---*/

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6959,7 +6959,7 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
69596959
If requested, use the local boundary normal (negative),
69606960
instead of the prescribed flow direction in the config. ---*/
69616961

6962-
if (config->Get_Inlet_UseNormal()) {
6962+
if (config->GetInletUseNormal()) {
69636963
for (iDim = 0; iDim < nDim; iDim++)
69646964
Flow_Dir[iDim] = -UnitNormal[iDim];
69656965
} else {
@@ -7085,7 +7085,7 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
70857085
If requested, use the local boundary normal (negative),
70867086
instead of the prescribed flow direction in the config. ---*/
70877087

7088-
if (config->Get_Inlet_UseNormal()) {
7088+
if (config->GetInletUseNormal()) {
70897089
for (iDim = 0; iDim < nDim; iDim++)
70907090
Flow_Dir[iDim] = -UnitNormal[iDim];
70917091
} else {

SU2_CFD/src/solvers/CIncEulerSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2295,7 +2295,7 @@ void CIncEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
22952295
If requested, use the local boundary normal (negative),
22962296
instead of the prescribed flow direction in the config. ---*/
22972297

2298-
if (config->Get_Inlet_UseNormal()) {
2298+
if (config->GetInletUseNormal()) {
22992299
for (iDim = 0; iDim < nDim; iDim++)
23002300
UnitFlowDir[iDim] = -Normal[iDim]/Area;
23012301
} else {

SU2_CFD/src/solvers/CNEMOEulerSolver.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,13 @@ void CNEMOEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
16601660

16611661
const su2double* dir = Inlet_FlowDir[val_marker][iVertex];
16621662
const su2double mag = GeometryToolbox::Norm(nDim, dir);
1663-
for (auto iDim = 0ul; iDim < nDim; iDim++) Flow_Dir[iDim] = dir[iDim] / mag;
1663+
if (config->GetInletUseNormal()) {
1664+
for (auto iDim = 0u; iDim < nDim; iDim++)
1665+
Flow_Dir[iDim] = -UnitNormal[iDim];
1666+
} else {
1667+
for (auto iDim = 0u; iDim < nDim; iDim++)
1668+
Flow_Dir[iDim] = dir[iDim]/mag;
1669+
}
16641670

16651671
/*--- Build the fictitious intlet state based on characteristics ---*/
16661672

config_template.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ INC_INLET_DAMPING= 0.1
292292
%
293293
% Impose inlet velocity magnitude in the direction of the normal of the inlet face.
294294
% used for incompressible velocity inlet and for compressible pressure and mass flow inlets.
295-
INLET_USENORMAL= NO
295+
INLET_USE_NORMAL= NO
296296
%
297297
% List of outlet types for incompressible flows. List length must
298298
% match number of outlet markers. Options: PRESSURE_OUTLET, MASS_FLOW_OUTLET

0 commit comments

Comments
 (0)