Skip to content

Commit f71ed23

Browse files
author
Joshua Kelly
committed
Merge branch 'feature_turbo_ramps' of https://github.com/su2code/SU2 into feature_turbo_ramps
2 parents a09e6e6 + 527b0a6 commit f71ed23

File tree

9 files changed

+49
-20
lines changed

9 files changed

+49
-20
lines changed

.github/workflows/code-style.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
- name: Setup python
1717
uses: actions/setup-python@v5
1818
with:

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@v5
2828

2929
- name: Install Packages (cpp)
3030
if: ${{ matrix.language == 'cpp' }}

.github/workflows/regression.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ jobs:
187187
entrypoint: /bin/rm
188188
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
189189
- name: Download All artifacts
190-
uses: actions/download-artifact@v4
190+
uses: actions/download-artifact@v5
191191
- name: Uncompress and Move Binaries
192192
run: |
193193
BIN_FOLDER="$PWD/install/bin"
@@ -282,7 +282,7 @@ jobs:
282282
entrypoint: /bin/rm
283283
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
284284
- name: Download All artifacts
285-
uses: actions/download-artifact@v4
285+
uses: actions/download-artifact@v5
286286
- name: Uncompress and Move Binaries
287287
run: |
288288
BIN_FOLDER="$PWD/install/bin"
@@ -327,7 +327,7 @@ jobs:
327327
entrypoint: /bin/rm
328328
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
329329
- name: Download All artifacts
330-
uses: actions/download-artifact@v4
330+
uses: actions/download-artifact@v5
331331
- name: Uncompress and Move Binaries
332332
run: |
333333
BIN_FOLDER="$PWD/install/bin"
@@ -379,17 +379,17 @@ jobs:
379379
entrypoint: /bin/rm
380380
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
381381
- name: Download Base
382-
uses: actions/download-artifact@v4
382+
uses: actions/download-artifact@v5
383383
with:
384384
name: ${{format('Base{0}', matrix.tag)}}
385385
path: ${{format('Base{0}', matrix.tag)}}
386386
- name: Download Reverse
387-
uses: actions/download-artifact@v4
387+
uses: actions/download-artifact@v5
388388
with:
389389
name: ${{format('Reverse{0}', matrix.tag)}}
390390
path: ${{format('Reverse{0}', matrix.tag)}}
391391
- name: Download Forward
392-
uses: actions/download-artifact@v4
392+
uses: actions/download-artifact@v5
393393
with:
394394
name: ${{format('Forward{0}', matrix.tag)}}
395395
path: ${{format('Forward{0}', matrix.tag)}}

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 Inc_Inlet_UseNormal; /*!< \brief Flag for whether to use the local normal as the flow direction for an incompressible 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. */
@@ -5071,7 +5071,7 @@ class CConfig {
50715071
* \brief Flag for whether the local boundary normal is used as the flow direction for an incompressible pressure inlet.
50725072
* \return <code>FALSE</code> means the prescribed flow direction is used.
50735073
*/
5074-
bool GetInc_Inlet_UseNormal(void) const { return Inc_Inlet_UseNormal;}
5074+
bool GetInletUseNormal(void) const { return InletUseNormal; }
50755075

50765076
/*!
50775077
* \brief Get the type of incompressible outlet from the list.

Common/src/CConfig.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,8 +1383,7 @@ void CConfig::SetConfig_Options() {
13831383
addDoubleOption("INC_TEMPERATURE_INIT", Inc_Temperature_Init, 288.15);
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);
1386-
/*!\brief INC_INLET_USENORMAL \n DESCRIPTION: Use the local boundary normal for the flow direction with the incompressible pressure inlet. \ingroup Config*/
1387-
addBoolOption("INC_INLET_USENORMAL", Inc_Inlet_UseNormal, false);
1386+
13881387
/*!\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*/
13891388
addDoubleOption("INC_INLET_DAMPING", Inc_Inlet_Damping, 0.1);
13901389
/*!\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*/
@@ -1586,6 +1585,8 @@ void CConfig::SetConfig_Options() {
15861585

15871586
/*!\brief INLET_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Inlet_Map \endlink \n DEFAULT: TOTAL_CONDITIONS \ingroup Config*/
15881587
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);
15891590
/*!\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*/
15901591
addEnumListOption("INC_INLET_TYPE", nInc_Inlet, Kind_Inc_Inlet, Inlet_Map);
15911592
addBoolOption("SPECIFIED_INLET_PROFILE", Inlet_From_File, false);
@@ -3118,6 +3119,8 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){
31183119
newString.append("RAMP_ROTATION_FRAME is deprectaed. Use RAMP_MOTION_FRAME instead");
31193120
else if (!option_name.compare("RAMP_ROTATION_FRAME_COEFF"))
31203121
newString.append("RAMP_ROTATION_FRAME_COEFF is deprectaed. Use RAMP_MOTION_FRAME_COEFF instead");
3122+
else if (!option_name.compare("INC_INLET_USENORMAL"))
3123+
newString.append("INC_INLET_USENORMAL is deprecated. Use INLET_USE_NORMAL instead (compatible with all solvers).\n\n");
31213124
else {
31223125
/*--- Find the most likely candidate for the unrecognized option, based on the length
31233126
of start and end character sequences shared by candidates and the option. ---*/

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6954,8 +6954,17 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
69546954
T_Total = Inlet_Ttotal[val_marker][iVertex];
69556955
const su2double* dir = Inlet_FlowDir[val_marker][iVertex];
69566956
const su2double mag = GeometryToolbox::Norm(nDim, dir);
6957-
for (iDim = 0; iDim < nDim; iDim++) {
6958-
Flow_Dir[iDim] = dir[iDim] / mag;
6957+
6958+
/*--- Store the unit flow direction vector.
6959+
If requested, use the local boundary normal (negative),
6960+
instead of the prescribed flow direction in the config. ---*/
6961+
6962+
if (config->GetInletUseNormal()) {
6963+
for (iDim = 0; iDim < nDim; iDim++)
6964+
Flow_Dir[iDim] = -UnitNormal[iDim];
6965+
} else {
6966+
for (iDim = 0; iDim < nDim; iDim++)
6967+
Flow_Dir[iDim] = dir[iDim]/mag;
69596968
}
69606969

69616970
/*--- Non-dim. the inputs if necessary. ---*/
@@ -7070,8 +7079,18 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
70707079
Vel_Mag = Inlet_Ptotal[val_marker][iVertex];
70717080
const su2double* dir = Inlet_FlowDir[val_marker][iVertex];
70727081
const su2double mag = GeometryToolbox::Norm(nDim, dir);
7073-
for (iDim = 0; iDim < nDim; iDim++) {
7074-
Flow_Dir[iDim] = dir[iDim] / mag;
7082+
7083+
7084+
/*--- Store the unit flow direction vector.
7085+
If requested, use the local boundary normal (negative),
7086+
instead of the prescribed flow direction in the config. ---*/
7087+
7088+
if (config->GetInletUseNormal()) {
7089+
for (iDim = 0; iDim < nDim; iDim++)
7090+
Flow_Dir[iDim] = -UnitNormal[iDim];
7091+
} else {
7092+
for (iDim = 0; iDim < nDim; iDim++)
7093+
Flow_Dir[iDim] = dir[iDim]/mag;
70757094
}
70767095

70777096
/*--- Non-dim. the inputs if necessary. ---*/

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->GetInc_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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,9 @@ INC_INLET_TYPE= VELOCITY_INLET
290290
% Damping coefficient for iterative updates at pressure inlets. (0.1 by default)
291291
INC_INLET_DAMPING= 0.1
292292
%
293-
% Impose inlet velocity magnitude in the direction of the normal of the inlet face
294-
INC_INLET_USENORMAL= NO
293+
% Impose inlet velocity magnitude in the direction of the normal of the inlet face.
294+
% used for incompressible velocity inlet and for compressible pressure and mass flow inlets.
295+
INLET_USE_NORMAL= NO
295296
%
296297
% List of outlet types for incompressible flows. List length must
297298
% match number of outlet markers. Options: PRESSURE_OUTLET, MASS_FLOW_OUTLET

0 commit comments

Comments
 (0)