Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b806036
Update config_template.cfg
EttoreSaetta Jun 18, 2020
e723a2a
Introducing the new actuator disk model with variable load
EttoreSaetta Jul 1, 2020
7c9f9ba
Introducing a new actuator disk model with variable load.
EttoreSaetta Jul 1, 2020
b9806b8
Adding the new actuator disk model with variable load.
EttoreSaetta Jul 1, 2020
3e4c39c
Adding the new actuator disk with variable load.
EttoreSaetta Jul 1, 2020
1f6537d
Introducing the new actuator disk with variable load.
EttoreSaetta Jul 1, 2020
fa55e87
Removing tabs.
EttoreSaetta Jul 1, 2020
9443bca
Removing tabs.
EttoreSaetta Jul 1, 2020
615136c
Bugs fixing.
EttoreSaetta Jul 1, 2020
34ca5ce
Adding some comments.
EttoreSaetta Jul 1, 2020
2062421
Adding a new function for the actuator disk model with variable load.
EttoreSaetta Jul 2, 2020
1b40ea9
Free locally allocated memory in BC_ActDisk_VariableLoad
EttoreSaetta Jul 2, 2020
947349f
Adding some comments.
EttoreSaetta Jul 2, 2020
4524fc5
New options added in the config_template
EttoreSaetta Jul 2, 2020
8e5a6a7
Test case for the actuator disk with variable load added
EttoreSaetta Jul 2, 2020
28953c6
Adding the actuator disk data file
EttoreSaetta Jul 2, 2020
ad8a407
Change the name of the actuator disk data file.
EttoreSaetta Jul 3, 2020
926c6ca
Print the name of the propeller data file
EttoreSaetta Jul 3, 2020
1b14eed
Comments on the test cases input files
EttoreSaetta Jul 3, 2020
2e10f16
Correction of some comments
EttoreSaetta Jul 3, 2020
24158c5
Merge branch 'develop' into feature_actuatordisk_variableload
EttoreSaetta Jul 3, 2020
11e8159
Comment correction.
EttoreSaetta Jul 8, 2020
e83e9cb
Adding regression tests.
EttoreSaetta Jul 8, 2020
96a1f82
Removing parallel regression test.
EttoreSaetta Jul 8, 2020
eb9256d
Removing screen output.
EttoreSaetta Jul 8, 2020
ab6618b
Reference values modified
EttoreSaetta Jul 8, 2020
6f17b66
Merge branch 'develop' into feature_actuatordisk_variableload
EttoreSaetta Jul 8, 2020
6db8565
Prop. Var. Load parallel regression test
EttoreSaetta Jul 8, 2020
ee2680d
Prop. Var. Load hybrid regression test
EttoreSaetta Jul 8, 2020
80233f6
Screen output changed
EttoreSaetta Jul 8, 2020
1dbd6fb
Reference values changed
EttoreSaetta Jul 8, 2020
708cf27
Fixing regression tests
EttoreSaetta Jul 8, 2020
ddfe981
Header changed using SU2 format
EttoreSaetta Jul 8, 2020
caa0f34
Reference values correction
EttoreSaetta Jul 8, 2020
f5a12a7
Using pow(..., 2) and MAXNDIM
EttoreSaetta Jul 9, 2020
5522b2d
Using GeometryToolbox and const pointers
EttoreSaetta Jul 9, 2020
4d839cb
Using the GeometryToolbox
EttoreSaetta Jul 9, 2020
6395ea5
Removing useless max() function
EttoreSaetta Jul 9, 2020
190bfe1
Introducing ReadActDisk_InputFile function and dynamic allocation.
EttoreSaetta Jul 10, 2020
78729c1
Using Norm() instead of Dinstance()
EttoreSaetta Jul 10, 2020
7403f48
Removing Set/Get functions and using su2activematrix and su2activevector
EttoreSaetta Jul 10, 2020
2e788c9
Dynamic allocation correction and Fa, Fx, Fy, Fz corrections
EttoreSaetta Jul 10, 2020
19e6534
Free allocated memory of Fa, Fx, Fy and Fz
EttoreSaetta Jul 10, 2020
244ca90
Useless functions in CSolver.hpp removed
EttoreSaetta Jul 10, 2020
febb957
Useless functions in CSolver.hpp removed
EttoreSaetta Jul 10, 2020
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
7 changes: 7 additions & 0 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class CConfig {
bool Inlet_From_File; /*!< \brief True if the inlet profile is to be loaded from a file. */
string Inlet_Filename; /*!< \brief Filename specifying an inlet profile. */
su2double Inlet_Matching_Tol; /*!< \brief Tolerance used when matching a point to a point from the inlet file. */
string ActDisk_FileName; /*!< \brief Filename specifying an actuator disk. */

string *Marker_Euler, /*!< \brief Euler wall markers. */
*Marker_FarField, /*!< \brief Far field markers. */
Expand Down Expand Up @@ -4709,6 +4710,12 @@ class CConfig {
*/
string GetInlet_FileName(void) const { return Inlet_Filename; }

/*!
* \brief Get name of the input file for the specified actuator disk.
* \return Name of the input file for the specified actuator disk.
*/
string GetActDisk_FileName(void) const { return ActDisk_FileName; }

/*!
* \brief Get the tolerance used for matching two points on a specified inlet
* \return Tolerance used for matching a point to a specified inlet
Expand Down
4 changes: 3 additions & 1 deletion Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,8 @@ enum ACTDISK_TYPE {
NET_THRUST = 3, /*!< \brief User specifies the Net thrust. */
DRAG_MINUS_THRUST = 4, /*!< \brief User specifies the D-T. */
MASSFLOW = 5, /*!< \brief User specifies the massflow. */
POWER = 6 /*!< \brief User specifies the power. */
POWER = 6, /*!< \brief User specifies the power. */
VARIABLE_LOAD = 7 /*!< \brief User specifies the load distribution. */
};
static const MapType<string, ACTDISK_TYPE> ActDisk_Map = {
MakePair("VARIABLES_JUMP", VARIABLES_JUMP)
Expand All @@ -1390,6 +1391,7 @@ static const MapType<string, ACTDISK_TYPE> ActDisk_Map = {
MakePair("DRAG_MINUS_THRUST", DRAG_MINUS_THRUST)
MakePair("MASSFLOW", MASSFLOW)
MakePair("POWER", POWER)
MakePair("VARIABLE_LOAD", VARIABLE_LOAD)
};

/*!
Expand Down
10 changes: 10 additions & 0 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,9 @@ void CConfig::SetConfig_Options() {
nMarker_ActDiskInlet, nMarker_ActDiskOutlet, Marker_ActDiskInlet, Marker_ActDiskOutlet,
ActDisk_PressJump, ActDisk_TempJump, ActDisk_Omega);

/*!\brief ACTDISK_FILENAME \n DESCRIPTION: Input file for a specified actuator disk (w/ extension) \n DEFAULT: actdiskinput.dat \ingroup Config*/
addStringOption("ACTDISK_FILENAME", ActDisk_FileName, string("actdiskinput.dat"));

/*!\brief INLET_TYPE \n DESCRIPTION: Inlet boundary type \n OPTIONS: see \link Inlet_Map \endlink \n DEFAULT: TOTAL_CONDITIONS \ingroup Config*/
addEnumOption("INLET_TYPE", Kind_Inlet, Inlet_Map, TOTAL_CONDITIONS);
/*!\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. \ingroup Config*/
Expand Down Expand Up @@ -6895,6 +6898,13 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
BoundaryTable.PrintFooter();
}

if (nMarker_ActDiskOutlet != 0) {
if (GetKind_ActDisk() == VARIABLE_LOAD) {
cout << endl << "Actuator disk with variable load." << endl;
cout << "Actuator disk data read from file: " << GetActDisk_FileName() << endl;
}
}

}

bool CConfig::TokenizeString(string & str, string & option_name,
Expand Down
123 changes: 123 additions & 0 deletions SU2_CFD/include/solvers/CEulerSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ class CEulerSolver : public CSolver {
**Inlet_Ttotal = nullptr, /*!< \brief Value of the Total T. */
***Inlet_FlowDir = nullptr; /*!< \brief Value of the Flow Direction. */

su2activevector
ActDisk_R; /*!< \brief Value of the actuator disk Radius. */
su2activematrix
ActDisk_C, /*!< \brief Value of the actuator disk Center. */
ActDisk_Axis; /*!< \brief Value of the actuator disk Axis. */
su2double
**ActDisk_Fa, /*!< \brief Value of the actuator disk Axial Force per Unit Area. */
**ActDisk_Fx, /*!< \brief Value of the actuator disk X component of the radial and tangential forces per Unit Area resultant. */
**ActDisk_Fy, /*!< \brief Value of the actuator disk Y component of the radial and tangential forces per Unit Area resultant. */
**ActDisk_Fz; /*!< \brief Value of the actuator disk Z component of the radial and tangential forces per Unit Area resultant. */

su2double
Total_ComboObj = 0.0, /*!< \brief Total 'combo' objective for all monitored boundaries */
Total_CL_Prev = 0.0, /*!< \brief Total lift coefficient for all the boundaries (fixed lift mode). */
Expand Down Expand Up @@ -358,6 +369,16 @@ class CEulerSolver : public CSolver {
void SetActDisk_BCThrust(CGeometry *geometry, CSolver **solver_container,
CConfig *config, unsigned short iMesh, bool Output);

/*!
* \brief Read the actuator disk input file for the VARIABLE_LOAD type.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] solver_container - Container vector with all the solutions.
* \param[in] config - Definition of the particular problem.
* \param[in] iMesh - current mesh level for the multigrid.
* \param[in] Output - boolean to determine whether to print output.
*/
void ReadActDisk_InputFile(CGeometry *geometry, CSolver **solver_container,
CConfig *config, unsigned short iMesh, bool Output);
/*!
* \brief Compute the max eigenvalue.
* \param[in] geometry - Geometrical definition of the problem.
Expand Down Expand Up @@ -775,6 +796,24 @@ class CEulerSolver : public CSolver {
unsigned short val_marker,
bool val_inlet_surface) final;

/*!
* \brief Impose an actuator disk with variable load boundary condition.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] solver_container - Container vector with all the solutions.
* \param[in] conv_numerics - Description of the numerical method.
* \param[in] visc_numerics - Description of the numerical method.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
* \param[in] val_inlet_surface - Boolean for whether val_marker is an inlet
*/
void BC_ActDisk_VariableLoad(CGeometry *geometry,
CSolver **solver_container,
CNumerics *conv_numerics,
CNumerics *visc_numerics,
CConfig *config,
unsigned short val_marker,
bool val_inlet_surface);

/*!
* \brief Impose the interface boundary condition using the residual.
* \param[in] geometry - Geometrical definition of the problem.
Expand Down Expand Up @@ -2057,6 +2096,90 @@ class CEulerSolver : public CSolver {
DonorGlobalIndex[val_marker][val_vertex] = val_index;
}

/*!
* \brief Value of the characteristic global index at the boundaries.
* \param[in] val_marker - Surface marker where the coefficient is computed.
* \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
* \return Value of the axial force per unit area.
*/
inline su2double GetActDisk_Fa(unsigned short val_marker,
unsigned long val_vertex) const {
return ActDisk_Fa[val_marker][val_vertex];
}

/*!
* \brief Value of the characteristic global index at the boundaries.
* \param[in] val_marker - Surface marker where the coefficient is computed.
* \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
* \return Value of the axial force per unit area.
*/
inline void SetActDisk_Fa(unsigned short val_marker,
unsigned long val_vertex,
su2double val_fa) { ActDisk_Fa[val_marker][val_vertex] = val_fa; }

/*!
* \brief Value of the characteristic global index at the boundaries.
* \param[in] val_marker - Surface marker where the coefficient is computed.
* \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
* \return Value of the x component of the radial and tangential forces per unit area resultant.
*/
inline su2double GetActDisk_Fx(unsigned short val_marker,
unsigned long val_vertex) const {
return ActDisk_Fx[val_marker][val_vertex];
}

/*!
* \brief Value of the characteristic global index at the boundaries.
* \param[in] val_marker - Surface marker where the coefficient is computed.
* \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
* \return Value of the x component of the radial and tangential forces per unit area resultant.
*/
inline void SetActDisk_Fx(unsigned short val_marker,
unsigned long val_vertex,
su2double val_fx) { ActDisk_Fx[val_marker][val_vertex] = val_fx; }

/*!
* \brief Value of the characteristic global index at the boundaries.
* \param[in] val_marker - Surface marker where the coefficient is computed.
* \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
* \return Value of the y component of the radial and tangential forces per unit area resultant.
*/
inline su2double GetActDisk_Fy(unsigned short val_marker,
unsigned long val_vertex) const {
return ActDisk_Fy[val_marker][val_vertex];
}

/*!
* \brief Value of the characteristic global index at the boundaries.
* \param[in] val_marker - Surface marker where the coefficient is computed.
* \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
* \return Value of the y component of the radial and tangential forces per unit area resultant.
*/
inline void SetActDisk_Fy(unsigned short val_marker,
unsigned long val_vertex,
su2double val_fy) { ActDisk_Fy[val_marker][val_vertex] = val_fy; }

/*!
* \brief Value of the characteristic global index at the boundaries.
* \param[in] val_marker - Surface marker where the coefficient is computed.
* \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
* \return Value of the z component of the radial and tangential forces per unit area resultant.
*/
inline su2double GetActDisk_Fz(unsigned short val_marker,
unsigned long val_vertex) const {
return ActDisk_Fz[val_marker][val_vertex];
}

/*!
* \brief Value of the characteristic global index at the boundaries.
* \param[in] val_marker - Surface marker where the coefficient is computed.
* \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the coefficient is evaluated.
* \return Value of the z component of the radial and tangential forces per unit area resultant.
*/
inline void SetActDisk_Fz(unsigned short val_marker,
unsigned long val_vertex,
su2double val_fz) { ActDisk_Fz[val_marker][val_vertex] = val_fz; }

/*!
* \brief Value of the characteristic global index at the boundaries.
* \param[in] val_marker - Surface marker where the coefficient is computed.
Expand Down
Loading