Skip to content

Commit

Permalink
ActDisk axis, BEM minimal code
Browse files Browse the repository at this point in the history
  • Loading branch information
chanduyal committed Oct 18, 2023
1 parent 5b67806 commit 3b49e16
Show file tree
Hide file tree
Showing 5 changed files with 307 additions and 271 deletions.
6 changes: 6 additions & 0 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ class CConfig {
su2double **ActDisk_PressJump,
**ActDisk_TempJump, **ActDisk_Omega; /*!< \brief Specified deltas for actuator disk.*/
su2double **ActDisk_CG[3]; /*!< \brief Specified CG for actuator disk.*/
su2double **ActDisk_Axis_BEM[3]; /*!< \brief Specified axis for actuator disk.*/
su2double **ActDisk_RotRate; /*!< \brief Value of the Rotation Rate.*/
su2double BEM_blade_angle ; /*!< \brief Propeller blade angle.*/
string BEM_prop_filename ; /*!< \brief Propeller filename.*/
Expand Down Expand Up @@ -6661,6 +6662,11 @@ class CConfig {
*/
su2double GetActDisk_CG(unsigned short iDim, string val_marker, unsigned short val_index) const;

/*!
* \brief Get the axis of the actuator disk with Blade Element Method.
*/
su2double GetActDisk_Axis_BEM(unsigned short iDim, string val_marker, unsigned short val_index) const;

/*!
* \brief Get the blade angle of the propeller.
*/
Expand Down
13 changes: 13 additions & 0 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,11 @@ void CConfig::SetConfig_Options() {
nMarker_ActDiskInlet, nMarker_ActDiskOutlet, Marker_ActDiskInlet, Marker_ActDiskOutlet,
ActDisk_CG[0], ActDisk_CG[1], ActDisk_CG[2]);

/*!\brief MARKER_ACTDISK_CG\n DESCRIPTION: Actuator disk axis for blade element momentum (BEM) method. \ingroup Config*/
addActDiskOption("MARKER_ACTDISK_AXIS",
nMarker_ActDiskInlet, nMarker_ActDiskOutlet, Marker_ActDiskInlet, Marker_ActDiskOutlet,
ActDisk_Axis_BEM[0], ActDisk_Axis_BEM[1], ActDisk_Axis_BEM[2]);

/*!\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"));

Expand Down Expand Up @@ -8702,6 +8707,14 @@ su2double CConfig::GetActDisk_CG(unsigned short iDim, string val_marker, unsigne
return ActDisk_CG[iDim][iMarker_ActDisk][val_value];
}

su2double CConfig::GetActDisk_Axis_BEM(unsigned short iDim, string val_marker, unsigned short val_value) const {
unsigned short iMarker_ActDisk;
for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++)
if ((Marker_ActDiskInlet[iMarker_ActDisk] == val_marker) ||
(Marker_ActDiskOutlet[iMarker_ActDisk] == val_marker)) break;
return ActDisk_Axis_BEM[iDim][iMarker_ActDisk][val_value];
}

su2double CConfig::GetActDisk_TempJump(const string& val_marker, unsigned short val_value) const {
unsigned short iMarker_ActDisk;
for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskInlet; iMarker_ActDisk++)
Expand Down
38 changes: 19 additions & 19 deletions SU2_CFD/include/solvers/CEulerSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,25 +546,25 @@ class CEulerSolver : public CFVMFlowSolverBase<CEulerVariable, ENUM_REGIME::COMP
unsigned short val_marker,
bool val_inlet_surface);

/*!
* \author: Chandukrishna Y., T. N. Venkatesh and Josy P. Pullockara
*
* \brief Impose an actuator disk with variable load boundary condition using blade element momentum method (BEM).
* \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_BEM_VLAD(CGeometry *geometry,
CSolver **solver_container,
CNumerics *conv_numerics,
CNumerics *visc_numerics,
CConfig *config,
unsigned short val_marker,
bool val_inlet_surface);
// /*!
// * \author: Chandukrishna Y., T. N. Venkatesh and Josy P. Pullockara
// *
// * \brief Impose an actuator disk with variable load boundary condition using blade element momentum method (BEM).
// * \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_BEM_VLAD(CGeometry *geometry,
// CSolver **solver_container,
// CNumerics *conv_numerics,
// CNumerics *visc_numerics,
// CConfig *config,
// unsigned short val_marker,
// bool val_inlet_surface);

/*!
* \author: G.Gori, S.Vitale, M.Pini, A.Guardone, P.Colonna
Expand Down
Loading

0 comments on commit 3b49e16

Please sign in to comment.