diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index c568f1933c4..59a90ac0b32 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -183,6 +183,8 @@ class CConfig { nMarker_NearFieldBound, /*!< \brief Number of near field boundary markers. */ nMarker_ActDiskInlet, /*!< \brief Number of actuator disk inlet markers. */ nMarker_ActDiskOutlet, /*!< \brief Number of actuator disk outlet markers. */ + nMarker_ActDiskBemInlet, /*!< \brief Number of actuator disk BEM inlet markers. */ + nMarker_ActDiskBemOutlet, /*!< \brief Number of actuator disk BEM outlet markers. */ nMarker_Deform_Mesh_Sym_Plane, /*!< \brief Number of markers with symmetric deformation */ nMarker_Deform_Mesh, /*!< \brief Number of deformable markers at the boundary. */ nMarker_Fluid_Load, /*!< \brief Number of markers in which the flow load is computed/employed. */ @@ -241,6 +243,8 @@ class CConfig { *Marker_CHTInterface, /*!< \brief Conjugate heat transfer interface markers. */ *Marker_ActDiskInlet, /*!< \brief Actuator disk inlet markers. */ *Marker_ActDiskOutlet, /*!< \brief Actuator disk outlet markers. */ + *Marker_ActDiskBemInlet, /*!< \brief Actuator disk BEM inlet markers. */ + *Marker_ActDiskBemOutlet, /*!< \brief Actuator disk BEM outlet markers. */ *Marker_Inlet, /*!< \brief Inlet flow markers. */ *Marker_Inlet_Species, /*!< \brief Inlet species markers. */ *Marker_Inlet_Turb, /*!< \brief Inlet turbulent markers. */ @@ -343,8 +347,16 @@ class CConfig { su2double *ActDiskOutlet_GrossThrust; /*!< \brief Specified outlet gross thrust for actuator disk. */ su2double *ActDiskOutlet_Force; /*!< \brief Specified outlet force for actuator disk. */ su2double *ActDiskOutlet_Power; /*!< \brief Specified outlet power for actuator disk. */ + su2double *ActDiskOutlet_Thrust_BEM; /*!< \brief Specified outlet thrust for actuator disk. */ + su2double *ActDiskOutlet_Torque_BEM; /*!< \brief Specified outlet torque for actuator disk. */ su2double **ActDisk_PressJump, **ActDisk_TempJump, **ActDisk_Omega; /*!< \brief Specified deltas for actuator disk.*/ + su2double **ActDiskBem_CG[3]; /*!< \brief Specified center for actuator disk BEM.*/ + su2double **ActDiskBem_Axis[3]; /*!< \brief Specified axis for actuator disk BEM.*/ + su2double BEM_blade_angle; /*!< \brief Propeller blade angle.*/ + string BEM_prop_filename; /*!< \brief Propeller filename.*/ + unsigned short ActDiskBem_Frequency; /*!< \brief Frequency of updating actuator disk with BEM. */ + bool History_File_Append_Flag; /*!< \brief Flag to append history file.*/ su2double *ActDisk_DeltaPress; /*!< \brief Specified pressure delta for actuator disk. */ su2double *ActDisk_DeltaTemp; /*!< \brief Specified temperature delta for actuator disk. */ su2double *ActDisk_TotalPressRatio; /*!< \brief Specified tot. pres. ratio for actuator disk. */ @@ -1367,6 +1379,10 @@ class CConfig { unsigned short & nMarker_ActDiskInlet, unsigned short & nMarker_ActDiskOutlet, string* & Marker_ActDiskInlet, string* & Marker_ActDiskOutlet, su2double** & ActDisk_PressJump, su2double** & ActDisk_TempJump, su2double** & ActDisk_Omega); + void addActDiskBemOption(const string& name, + unsigned short& nMarker_ActDiskBemInlet, unsigned short& nMarker_ActDiskBemOutlet, string*& Marker_ActDiskBemInlet, string*& Marker_ActDiskBemOutlet, + su2double**& ActDiskBem_X, su2double**& ActDiskBem_Y, su2double**& ActDiskBem_Z); + void addWallFunctionOption(const string &name, unsigned short &list_size, string* &string_field, WALL_FUNCTIONS* &val_Kind_WF, unsigned short** &val_IntInfo_WF, su2double** &val_DoubleInfo_WF); @@ -6661,6 +6677,31 @@ class CConfig { */ su2double GetActDisk_Omega(const string& val_marker, unsigned short val_index) const; + /*! + * \brief Get the Center of the actuator disk with BEM. + */ + su2double GetActDiskBem_CG(unsigned short iDim, string val_marker, unsigned short val_index) const; + + /*! + * \brief Get the axis of the actuator disk with BEM. + */ + su2double GetActDiskBem_Axis(unsigned short iDim, string val_marker, unsigned short val_index) const; + + /*! + * \brief Get the frequency of updating the actuator disk with BEM. + */ + const unsigned short& GetActDiskBem_Frequency(void) const { return ActDiskBem_Frequency; } + + /*! + * \brief Get the blade angle of the propeller. + */ + su2double GetBEM_blade_angle(void) const { return BEM_blade_angle; } + + /*! + * \brief Get the filename of the propeller. + */ + const string& GetBEM_prop_filename(void) const { return BEM_prop_filename; } + /*! * \brief Get Actuator Disk Outlet for boundary val_marker (actuator disk inlet). * \return Actuator Disk Outlet from the config information for the marker val_marker. @@ -8193,6 +8234,20 @@ class CConfig { */ su2double GetActDiskOutlet_Power(const string& val_marker) const; + /*! + * \brief Get the thrust at the actuator disk outlet boundary. + * \param[in] val_marker - Marker corresponding to the outlet (actuator disk) boundary. + * \return The outlet (actuator disk) thrust. + */ + su2double GetActDiskOutlet_Thrust_BEM(string val_marker) const; + + /*! + * \brief Get the torque at the actuator disk outlet boundary. + * \param[in] val_marker - Marker corresponding to the outlet boundary. + * \return The outlet (actuator disk) torque. + */ + su2double GetActDiskOutlet_Torque_BEM(string val_marker) const; + /*! * \brief Get the back pressure (static) at an outlet boundary. * \param[in] val_index - Index corresponding to the outlet boundary. @@ -8228,6 +8283,24 @@ class CConfig { */ void SetActDiskOutlet_Power(unsigned short val_marker, su2double val_actdisk_power) { ActDiskOutlet_Power[val_marker] = val_actdisk_power; } + /*! + * \brief Set the thrust at the outlet (actuator disk) boundary. + * \param[in] val_marker - Marker corresponding to the outlet (actuator disk) boundary. + * \param[in] val_actdisk_thrust_bem - Value of the actuator disk thrust. + */ + void SetActDiskOutlet_Thrust_BEM(unsigned short val_marker, su2double val_actdisk_thrust_bem) { + ActDiskOutlet_Thrust_BEM[val_marker] = val_actdisk_thrust_bem; + } + + /*! + * \brief Get the back pressure (static) at an outlet boundary. + * \param[in] val_marker - Marker corresponding to the outlet boundary. + * \param[in] val_actdisk_torque_bem - Value of the actuator disk torque. + */ + void SetActDiskOutlet_Torque_BEM(unsigned short val_marker, su2double val_actdisk_torque_bem) { + ActDiskOutlet_Torque_BEM[val_marker] = val_actdisk_torque_bem; + } + /*! * \brief Get the displacement value at an displacement boundary. * \param[in] val_index - Index corresponding to the displacement boundary. diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 2cebd323f25..f537ca33637 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -1871,7 +1871,8 @@ enum ACTDISK_TYPE { DRAG_MINUS_THRUST = 4, /*!< \brief User specifies the D-T. */ MASSFLOW = 5, /*!< \brief User specifies the massflow. */ POWER = 6, /*!< \brief User specifies the power. */ - VARIABLE_LOAD = 7 /*!< \brief User specifies the load distribution. */ + VARIABLE_LOAD = 7, /*!< \brief User specifies the load distribution. */ + BLADE_ELEMENT = 8 /*!< \brief User specifies to use Blade element method. */ }; static const MapType ActDisk_Map = { MakePair("VARIABLES_JUMP", VARIABLES_JUMP) @@ -1881,6 +1882,7 @@ static const MapType ActDisk_Map = { MakePair("MASSFLOW", MASSFLOW) MakePair("POWER", POWER) MakePair("VARIABLE_LOAD", VARIABLE_LOAD) + MakePair("BLADE_ELEMENT", BLADE_ELEMENT) }; /*! diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index dee2cc63bef..416108b7b9b 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -557,6 +557,19 @@ void CConfig::addActDiskOption(const string & name, unsigned short & nMarker_Act option_map.insert(pair(name, val)); } +void CConfig::addActDiskBemOption(const string& name, + unsigned short& nMarker_ActDiskBemInlet, unsigned short& nMarker_ActDiskBemOutlet, + string*& Marker_ActDiskBemInlet, string*& Marker_ActDiskBemOutlet, + su2double**& ActDiskBem_X, su2double**& ActDiskBem_Y, su2double**& ActDiskBem_Z) { + assert(option_map.find(name) == option_map.end()); + all_options.insert(pair(name, true)); + COptionBase* val = new COptionActDisk(name, + nMarker_ActDiskBemInlet, nMarker_ActDiskBemOutlet, + Marker_ActDiskBemInlet, Marker_ActDiskBemOutlet, + ActDiskBem_X, ActDiskBem_Y, ActDiskBem_Z); + option_map.insert(pair(name, val)); +} + void CConfig::addWallFunctionOption(const string &name, unsigned short &list_size, string* &string_field, WALL_FUNCTIONS* &val_Kind_WF, unsigned short** &val_IntInfo_WF, su2double** &val_DoubleInfo_WF) { @@ -921,6 +934,9 @@ void CConfig::SetPointersNull() { ActDiskOutlet_Power = nullptr; ActDiskOutlet_Temperature = nullptr; ActDiskOutlet_TotalTemperature = nullptr; ActDiskOutlet_MassFlow = nullptr; + ActDiskOutlet_Thrust_BEM = nullptr; + ActDiskOutlet_Torque_BEM = nullptr; + ActDisk_DeltaPress = nullptr; ActDisk_DeltaTemp = nullptr; ActDisk_TotalPressRatio = nullptr; ActDisk_TotalTempRatio = nullptr; ActDisk_StaticPressRatio = nullptr; ActDisk_StaticTempRatio = nullptr; ActDisk_NetThrust = nullptr; ActDisk_GrossThrust = nullptr; @@ -1523,6 +1539,16 @@ void CConfig::SetConfig_Options() { nMarker_ActDiskInlet, nMarker_ActDiskOutlet, Marker_ActDiskInlet, Marker_ActDiskOutlet, ActDisk_PressJump, ActDisk_TempJump, ActDisk_Omega); + /*!\brief MARKER_ACTDISK_BEM_CG\n DESCRIPTION: Actuator disk CG for blade element momentum (BEM) method. \ingroup Config*/ + addActDiskBemOption("MARKER_ACTDISK_BEM_CG", + nMarker_ActDiskBemInlet, nMarker_ActDiskBemOutlet, Marker_ActDiskBemInlet, Marker_ActDiskBemOutlet, + ActDiskBem_CG[0], ActDiskBem_CG[1], ActDiskBem_CG[2]); + + /*!\brief MARKER_ACTDISK_BEM_AXIS\n DESCRIPTION: Actuator disk axis for blade element momentum (BEM) method. \ingroup Config*/ + addActDiskBemOption("MARKER_ACTDISK_BEM_AXIS", + nMarker_ActDiskBemInlet, nMarker_ActDiskBemOutlet, Marker_ActDiskBemInlet, Marker_ActDiskBemOutlet, + ActDiskBem_Axis[0], ActDiskBem_Axis[1], ActDiskBem_Axis[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")); @@ -1651,6 +1677,16 @@ void CConfig::SetConfig_Options() { addBoolOption("SUBSONIC_ENGINE", SubsonicEngine, false); /* DESCRIPTION: Actuator disk double surface */ addBoolOption("ACTDISK_DOUBLE_SURFACE", ActDisk_DoubleSurface, false); + + /* DESCRIPTION: Actuator disk BEM switch for history file appending.*/ + addBoolOption("HISTORY_FILE_APPEND", History_File_Append_Flag, false); + /* DESCRIPTION: Propeller blade angle for actuator disk BEM.*/ + addDoubleOption("BEM_PROP_BLADE_ANGLE", BEM_blade_angle, 23.9); + /* DESCRIPTION: Propeller file name for actuator disk BEM.*/ + addStringOption("BEM_PROP_FILENAME", BEM_prop_filename, string("prop_geom_alfclcd_data.txt")); + /* DESCRIPTION: Frequency for updating actuator disk with BEM.*/ + addUnsignedShortOption("BEM_FREQ", ActDiskBem_Frequency, 40); + /* DESCRIPTION: Only half engine is in the computational grid */ addBoolOption("ENGINE_HALF_MODEL", Engine_HalfModel, false); /* DESCRIPTION: Actuator disk double surface */ @@ -4978,6 +5014,18 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i SU2_MPI::Error("Vorticity confinement feature currently not supported for incompressible or non-equilibrium model or axisymmetric flows.", CURRENT_FUNCTION); } + /*--- Actuator disk BEM method for propellers feature currently not supported for incompressible or non-equilibrium model or axisymmetric flows. ---*/ + + if ((Kind_Solver == MAIN_SOLVER::INC_EULER + || Kind_Solver == MAIN_SOLVER::INC_NAVIER_STOKES + || Kind_Solver == MAIN_SOLVER::INC_RANS + || Kind_Solver == MAIN_SOLVER::NEMO_EULER + || Kind_Solver == MAIN_SOLVER::NEMO_NAVIER_STOKES + || Axisymmetric) + && ActDisk_DoubleSurface) { + SU2_MPI::Error("Actuator disk BEM method for propellers feature currently not supported for incompressible or non-equilibrium model or axisymmetric flows.", CURRENT_FUNCTION); + } + /*--- Check the coefficients for the polynomial models. ---*/ if (Kind_Solver != MAIN_SOLVER::INC_EULER && Kind_Solver != MAIN_SOLVER::INC_NAVIER_STOKES && Kind_Solver != MAIN_SOLVER::INC_RANS) { @@ -5530,7 +5578,9 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { nMarker_Supersonic_Inlet + nMarker_Supersonic_Outlet + nMarker_Displacement + nMarker_Load + nMarker_FlowLoad + nMarker_Custom + nMarker_Damper + nMarker_Fluid_Load + nMarker_Clamped + nMarker_Load_Sine + nMarker_Load_Dir + nMarker_Disp_Dir + - nMarker_ActDiskInlet + nMarker_ActDiskOutlet + nMarker_ZoneInterface; + nMarker_ActDiskInlet + nMarker_ActDiskOutlet + + nMarker_ActDiskBemInlet + nMarker_ActDiskBemOutlet + + nMarker_ZoneInterface; /*--- Add the possible send/receive domains ---*/ @@ -5685,6 +5735,9 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { ActDiskOutlet_Force = new su2double[nMarker_ActDiskOutlet] (); ActDiskOutlet_Power = new su2double[nMarker_ActDiskOutlet] (); + ActDiskOutlet_Thrust_BEM = new su2double[nMarker_ActDiskOutlet](); + ActDiskOutlet_Torque_BEM = new su2double[nMarker_ActDiskOutlet](); + for (iMarker_ActDiskOutlet = 0; iMarker_ActDiskOutlet < nMarker_ActDiskOutlet; iMarker_ActDiskOutlet++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_ActDiskOutlet[iMarker_ActDiskOutlet]; Marker_CfgFile_KindBC[iMarker_CfgFile] = ACTDISK_OUTLET; @@ -7601,6 +7654,12 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { } } + if (nMarker_ActDiskOutlet != 0) { + if (GetKind_ActDisk() == BLADE_ELEMENT) { + cout << endl << "Actuator disk with blade element momentum (BEM) method." << endl; + cout << "Actuator disk BEM method propeller data read from file: " << GetBEM_prop_filename() << endl; + } + } } bool CConfig::TokenizeString(string & str, string & option_name, @@ -8094,6 +8153,9 @@ CConfig::~CConfig() { delete[] ActDiskOutlet_Force; delete[] ActDiskOutlet_Power; + delete[] ActDiskOutlet_Thrust_BEM; + delete[] ActDiskOutlet_Torque_BEM; + delete[] Outlet_MassFlow; delete[] Outlet_Density; delete[] Outlet_Area; @@ -8679,6 +8741,22 @@ su2double CConfig::GetActDisk_Omega(const string& val_marker, unsigned short val return ActDisk_Omega[iMarker_ActDisk][val_value];; } +su2double CConfig::GetActDiskBem_CG(unsigned short iDim, string val_marker, unsigned short val_value) const { + unsigned short iMarker_ActDisk; + for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskBemInlet; iMarker_ActDisk++) + if ((Marker_ActDiskBemInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskBemOutlet[iMarker_ActDisk] == val_marker)) break; + return ActDiskBem_CG[iDim][iMarker_ActDisk][val_value]; +} + +su2double CConfig::GetActDiskBem_Axis(unsigned short iDim, string val_marker, unsigned short val_value) const { + unsigned short iMarker_ActDisk; + for (iMarker_ActDisk = 0; iMarker_ActDisk < nMarker_ActDiskBemInlet; iMarker_ActDisk++) + if ((Marker_ActDiskBemInlet[iMarker_ActDisk] == val_marker) || + (Marker_ActDiskBemOutlet[iMarker_ActDisk] == val_marker)) break; + return ActDiskBem_Axis[iDim][iMarker_ActDisk][val_value]; +} + su2double CConfig::GetOutlet_MassFlow(const string& val_marker) const { unsigned short iMarker_Outlet; for (iMarker_Outlet = 0; iMarker_Outlet < nMarker_Outlet; iMarker_Outlet++) @@ -9455,6 +9533,20 @@ su2double CConfig::GetActDiskOutlet_Power(const string& val_marker) const { return ActDiskOutlet_Power[iMarker_ActDiskOutlet]; } +su2double CConfig::GetActDiskOutlet_Thrust_BEM(string val_marker) const { + unsigned short iMarker_ActDiskOutlet; + for (iMarker_ActDiskOutlet = 0; iMarker_ActDiskOutlet < nMarker_ActDiskOutlet; iMarker_ActDiskOutlet++) + if (Marker_ActDiskOutlet[iMarker_ActDiskOutlet] == val_marker) break; + return ActDiskOutlet_Thrust_BEM[iMarker_ActDiskOutlet]; +} + +su2double CConfig::GetActDiskOutlet_Torque_BEM(string val_marker) const { + unsigned short iMarker_ActDiskOutlet; + for (iMarker_ActDiskOutlet = 0; iMarker_ActDiskOutlet < nMarker_ActDiskOutlet; iMarker_ActDiskOutlet++) + if (Marker_ActDiskOutlet[iMarker_ActDiskOutlet] == val_marker) break; + return ActDiskOutlet_Torque_BEM[iMarker_ActDiskOutlet]; +} + su2double CConfig::GetActDiskInlet_Temperature(const string& val_marker) const { unsigned short iMarker_ActDiskInlet; for (iMarker_ActDiskInlet = 0; iMarker_ActDiskInlet < nMarker_ActDiskInlet; iMarker_ActDiskInlet++) diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index 1e61c53ca06..7a6aa9fb3d8 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -65,6 +65,9 @@ class CEulerSolver : public CFVMFlowSolverBase > DonorGlobalIndex; /*!< \brief Value of the donor global index. */ vector DonorPrimVar; /*!< \brief Value of the donor variables at each boundary. */ vector > ActDisk_DeltaP; /*!< \brief Value of the Delta P. */ + vector > ActDisk_DeltaP_r; /*!< \brief Value of the DeltaP_r. */ + vector > ActDisk_Thrust_r; /*!< \brief Value of the Thrust_r. */ + vector > ActDisk_Torque_r; /*!< \brief Value of the Torque_r. */ vector > ActDisk_DeltaT; /*!< \brief Value of the Delta T. */ su2activevector @@ -76,6 +79,10 @@ class CEulerSolver : public CFVMFlowSolverBase > ActDisk_Fx; /*!< \brief Value of the actuator disk X component of the radial and tangential forces per Unit Area resultant. */ vector > ActDisk_Fy; /*!< \brief Value of the actuator disk Y component of the radial and tangential forces per Unit Area resultant. */ vector > ActDisk_Fz; /*!< \brief Value of the actuator disk Z component of the radial and tangential forces per Unit Area resultant. */ + vector > ActDisk_Fa_BEM; /*!< \brief Value of the actuator disk Axial Force per Unit Area. */ + vector > ActDisk_Fx_BEM; /*!< \brief Value of the actuator disk X component of the radial and tangential forces per Unit Area resultant. */ + vector > ActDisk_Fy_BEM; /*!< \brief Value of the actuator disk Y component of the radial and tangential forces per Unit Area resultant. */ + vector > ActDisk_Fz_BEM; /*!< \brief Value of the actuator disk Z component of the radial and tangential forces per Unit Area resultant. */ su2double Total_CL_Prev = 0.0, /*!< \brief Total lift coefficient for all the boundaries (fixed lift mode). */ @@ -217,6 +224,18 @@ class CEulerSolver : public CFVMFlowSolverBaseGetGas_Constant(), config->GetPressure_Critical(), config->GetTemperature_Critical(), config->GetAcentric_Factor()); break; - + case DATADRIVEN_FLUID: auxFluidModel = new CDataDrivenFluid(config); @@ -2515,6 +2528,7 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns Velocity2, Density, Area, SoundSpeed, TotalPressure, Vel_Infty2, RamDrag, TotalTemperature, VelocityJet, Vel_Infty, MaxPressure, MinPressure, MFR, InfVel2; + su2double DeltaPressure = 0.0, DeltaThrust = 0.0, DeltaTorque = 0.0; unsigned short iMarker_Inlet, iMarker_Outlet, nMarker_Inlet, nMarker_Outlet; string Inlet_TagBound, Outlet_TagBound; su2double DeltaPress = 0.0, DeltaTemp = 0.0, TotalPressRatio = 0.0, TotalTempRatio = 0.0, StaticPressRatio = 0.0, StaticTempRatio = 0.0, @@ -2567,6 +2581,10 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns auto *Outlet_Force = new su2double [config->GetnMarker_All()](); auto *Outlet_Power = new su2double [config->GetnMarker_All()](); + auto *Outlet_DeltaP = new su2double [config->GetnMarker_All()](); + auto *Outlet_Thrust = new su2double [config->GetnMarker_All()](); + auto *Outlet_Torque = new su2double [config->GetnMarker_All()](); + /*--- Comute MassFlow, average temp, press, etc. ---*/ for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { @@ -2675,6 +2693,9 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns TotalPressure = Pressure * pow( 1.0 + Mach * Mach * 0.5 * (Gamma - 1.0), Gamma / (Gamma - 1.0)); TotalTemperature = Temperature * (1.0 + Mach * Mach * 0.5 * (Gamma - 1.0)); VelocityJet = sqrt(Velocity2) ; + DeltaPressure = ActDisk_DeltaP_r[iMarker][iVertex]; + DeltaThrust = ActDisk_Thrust_r[iMarker][iVertex]; + DeltaTorque = ActDisk_Torque_r[iMarker][iVertex]; GrossThrust = MassFlow * VelocityJet; @@ -2686,6 +2707,9 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns Outlet_Area[iMarker] += Area; Outlet_GrossThrust[iMarker] += GrossThrust; Outlet_Power[iMarker] += MassFlow*Cp*TotalTemperature; + Outlet_DeltaP[iMarker] += DeltaPressure * Area; + Outlet_Thrust[iMarker] += DeltaThrust * Area; + Outlet_Torque[iMarker] += DeltaTorque * Area; su2double Outlet_ForceX = -(Pressure - Pressure_Inf)*Vector[0] -MassFlow*Velocity[0]; su2double Outlet_ForceY = -(Pressure - Pressure_Inf)*Vector[1] -MassFlow*Velocity[1]; @@ -2747,6 +2771,9 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns auto *Outlet_Force_Local = new su2double [nMarker_Outlet](); auto *Outlet_Power_Local = new su2double [nMarker_Outlet](); auto *Outlet_Area_Local = new su2double [nMarker_Outlet](); + auto *Outlet_DeltaP_Local = new su2double [nMarker_Outlet](); + auto *Outlet_Thrust_Local = new su2double [nMarker_Outlet](); + auto *Outlet_Torque_Local = new su2double [nMarker_Outlet](); auto *Outlet_MassFlow_Total = new su2double [nMarker_Outlet](); auto *Outlet_Pressure_Total = new su2double [nMarker_Outlet](); @@ -2757,6 +2784,9 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns auto *Outlet_Force_Total = new su2double [nMarker_Outlet](); auto *Outlet_Power_Total = new su2double [nMarker_Outlet](); auto *Outlet_Area_Total = new su2double [nMarker_Outlet](); + auto *Outlet_DeltaP_Total = new su2double [nMarker_Outlet](); + auto *Outlet_Thrust_Total = new su2double [nMarker_Outlet](); + auto *Outlet_Torque_Total = new su2double [nMarker_Outlet](); /*--- Copy the values to the local array for MPI ---*/ @@ -2806,6 +2836,9 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns Outlet_Force_Local[iMarker_Outlet] += Outlet_Force[iMarker]; Outlet_Power_Local[iMarker_Outlet] += Outlet_Power[iMarker]; Outlet_Area_Local[iMarker_Outlet] += Outlet_Area[iMarker]; + Outlet_DeltaP_Local[iMarker_Outlet] += Outlet_DeltaP[iMarker]; + Outlet_Thrust_Local[iMarker_Outlet] += Outlet_Thrust[iMarker]; + Outlet_Torque_Local[iMarker_Outlet] += Outlet_Torque[iMarker]; } } @@ -2856,6 +2889,9 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns SU2_MPI::Allreduce(Outlet_Force_Local, Outlet_Force_Total, nMarker_Outlet, MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); SU2_MPI::Allreduce(Outlet_Power_Local, Outlet_Power_Total, nMarker_Outlet, MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); SU2_MPI::Allreduce(Outlet_Area_Local, Outlet_Area_Total, nMarker_Outlet, MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); + SU2_MPI::Allreduce(Outlet_DeltaP_Local, Outlet_DeltaP_Total, nMarker_Outlet, MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); + SU2_MPI::Allreduce(Outlet_Thrust_Local, Outlet_Thrust_Total, nMarker_Outlet, MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); + SU2_MPI::Allreduce(Outlet_Torque_Local, Outlet_Torque_Total, nMarker_Outlet, MPI_DOUBLE, MPI_SUM, SU2_MPI::GetComm()); /*--- Compute the value of the average surface temperature and pressure and set the value in the config structure for future use ---*/ @@ -2946,6 +2982,8 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns config->SetActDiskOutlet_GrossThrust(iMarker_Outlet, Outlet_GrossThrust_Total[iMarker_Outlet]); config->SetActDiskOutlet_Force(iMarker_Outlet, Outlet_Force_Total[iMarker_Outlet]); config->SetActDiskOutlet_Power(iMarker_Outlet, Outlet_Power_Total[iMarker_Outlet]); + config->SetActDiskOutlet_Thrust_BEM(iMarker_Outlet, Outlet_Thrust_Total[iMarker_Outlet]); + config->SetActDiskOutlet_Torque_BEM(iMarker_Outlet, Outlet_Torque_Total[iMarker_Outlet]); } } @@ -3301,6 +3339,11 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns cout << setprecision(1) << Power * Ref * config->GetVelocity_Ref() / 550.0 << "." << endl; } + if (config->GetKind_ActDisk() == BLADE_ELEMENT) { + cout << setprecision(5); + cout << "Thrust_BEM (N): " << config->GetActDiskOutlet_Thrust_BEM(Outlet_TagBound) << ". "; + cout << "Torque_BEM (N-m): " << config->GetActDiskOutlet_Torque_BEM(Outlet_TagBound) << "." << endl; + } } } @@ -3320,6 +3363,9 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns delete [] Outlet_GrossThrust_Local; delete [] Outlet_Force_Local; delete [] Outlet_Power_Local; + delete [] Outlet_DeltaP_Local; + delete [] Outlet_Thrust_Local; + delete [] Outlet_Torque_Local; delete [] Outlet_MassFlow_Total; delete [] Outlet_Temperature_Total; @@ -3330,6 +3376,9 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns delete [] Outlet_GrossThrust_Total; delete [] Outlet_Force_Total; delete [] Outlet_Power_Total; + delete [] Outlet_DeltaP_Total; + delete [] Outlet_Thrust_Total; + delete [] Outlet_Torque_Total; delete [] Inlet_MassFlow_Local; delete [] Inlet_ReverseMassFlow_Local; @@ -3391,6 +3440,9 @@ void CEulerSolver::GetPower_Properties(CGeometry *geometry, CConfig *config, uns delete [] Outlet_GrossThrust; delete [] Outlet_Force; delete [] Outlet_Power; + delete [] Outlet_DeltaP; + delete [] Outlet_Thrust; + delete [] Outlet_Torque; } @@ -3433,6 +3485,11 @@ void CEulerSolver::SetActDisk_BCThrust(CGeometry *geometry, CSolver **solver_con Factor = (0.5*RefDensity*RefArea*RefVel2); Ref = config->GetDensity_Ref() * config->GetVelocity_Ref() * config->GetVelocity_Ref() * 1.0 * 1.0; + /*--- Blade element distribution is in input file. ---*/ + if (Kind_ActDisk == BLADE_ELEMENT) { + SetActDisk_BEM_VLAD(geometry, solver_container, config, iMesh, Output); + } + /*--- Variable load distribution is in input file. ---*/ if (Kind_ActDisk == VARIABLE_LOAD) { if(InnerIter == 0) { @@ -4038,6 +4095,432 @@ void CEulerSolver::ReadActDisk_InputFile(CGeometry *geometry, CSolver **solver_c } } +void CEulerSolver::SetActDisk_BEM_VLAD(CGeometry *geometry, CSolver **solver_container, + CConfig *config, unsigned short iMesh, bool Output) { + + /*! + * \function SetActDisk_BEM_VLAD + * \brief Actuator disk model with Blade Element Method (BEM) + * \author: Chandukrishna Y., T. N. Venkatesh and Josy Pullockara + * Institution: Computational and Theoretical Fluid Dynamics (CTFD), + * CSIR - National Aerospace Laboratories, Bangalore + * Academy of Scientific and Innovative Research, Ghaziabad + * \version 8.0.0 "Harrier" + * First release date : September 26 2023 + * modified on: + * + * Section properties of the propeller given in an input file. + * Cl, Cd of propeller sections need to be generated earlier and saved in this file + * Actuator disk data initialized in function SetActDisk_BCThrust. + * Propeller load calculated with Blade Element Method + * Interpolated load at each point on the actuator disk is set in SetActDisk_BEM_VLAD function + * Rest calculations follows the Variable Load (BC_ActDisk_VariableLoad) approach + * + */ + + /*--- InputFile reading ---*/ + static int ADBem_NBlade = 0, ADBem_NSection = 0, ADBem_NAlpha = 0; + static su2double ADBem_Diameter = 0.0, ADBem_HubRadius = 0.0, ADBem_Angle75R = 0.0; + static std::vector i_v, radius_v, chord_v, angle75r_v; + static std::vector > alpha_m, cl_m, cd_m; + + static su2double ADBem_Omega = 0.0; + static su2double ADBem_CG[MAXNDIM] = {0.0, 0.0, 0.0}; + static su2double ADBem_Axis[MAXNDIM] = {0.0}, ADBem_J = 0.0; + static unsigned short ADBem_Frequency = 0; + + /*--- BEM VLAD ---*/ + const int BEM_MAX_ITER = 20; + + unsigned long InnerIter = config->GetInnerIter(); + su2double Dens_FreeStream = config->GetDensity_FreeStream(); + const su2double* Vel_FreeStream = config->GetVelocity_FreeStream(); + + /*--- Input file provides force coefficients distributions along disk radius. + Initialization necessary only at initial iteration (InnerIter == 0) + when the tables (radius_v, chord_v, ...) are empty. ---*/ + if (radius_v.empty()) { + /*--- Get the RPM, CG, Axis and Frequency from config. ---*/ + for (unsigned short iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { + + if ((config->GetMarker_All_KindBC(iMarker) == ACTDISK_INLET) || + (config->GetMarker_All_KindBC(iMarker) == ACTDISK_OUTLET)) { + + const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); + ADBem_Omega = config->GetActDisk_Omega(Marker_Tag, 0); + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + ADBem_CG[iDim] = config->GetActDiskBem_CG(iDim, Marker_Tag, 0); + ADBem_Axis[iDim] = config->GetActDiskBem_Axis(iDim, Marker_Tag, 0); + } + } + } + ADBem_Frequency = config->GetActDiskBem_Frequency(); + + /*--- Get the file name that contains the propeller data. ---*/ + string ActDiskBem_filename = config->GetBEM_prop_filename(); + ifstream ActDiskBem_file; + + /*--- Open the file that contains the propeller data. ---*/ + ActDiskBem_file.open(ActDiskBem_filename.data(), ios::in); + + /*--- Error message if the propeller data input file fails to open. ---*/ + if (ActDiskBem_file.fail()) SU2_MPI::Error("Unable to open Actuator Disk BEM Input File", CURRENT_FUNCTION); + + string text_line_appo; + + getline(ActDiskBem_file, text_line_appo); + /*--- Read and assign the value of the number of propeller blades. ---*/ + getline(ActDiskBem_file, text_line_appo); + istringstream NBlade_value(text_line_appo); + NBlade_value >> ADBem_NBlade; + + /*--- Read and assign the value of the propeller diameter. ---*/ + getline(ActDiskBem_file, text_line_appo); + istringstream Diameter_value(text_line_appo); + Diameter_value >> ADBem_Diameter; + + /*--- Read and assign the value of the propeller hub radius. ---*/ + getline(ActDiskBem_file, text_line_appo); + istringstream HubR_value(text_line_appo); + HubR_value >> ADBem_HubRadius; + + /*--- Read and assign the value of the blade angle at 75% of R. ---*/ + getline(ActDiskBem_file, text_line_appo); + istringstream Angle75R_value(text_line_appo); + Angle75R_value >> ADBem_Angle75R; + + getline(ActDiskBem_file, text_line_appo); + /*--- Read and assign the value of the number of radial propeller blade sections and alphas for each. ---*/ + getline(ActDiskBem_file, text_line_appo); + istringstream NSection_NAlpha_value(text_line_appo); + NSection_NAlpha_value >> ADBem_NSection >> ADBem_NAlpha; + + /*--- Assign the vector dimensions. ---*/ + i_v.resize(ADBem_NSection, 0.0); + radius_v.resize(ADBem_NSection, 0.0); + chord_v.resize(ADBem_NSection, 0.0); + angle75r_v.resize(ADBem_NSection, 0.0); + + getline(ActDiskBem_file, text_line_appo); + /*--- Read and assign the values of the propeller blade section's id, radius, chord, angle75R. ---*/ + for (int iSection = 0; iSection < ADBem_NSection; iSection++) { + getline(ActDiskBem_file, text_line_appo); + istringstream sectionStream(text_line_appo); + sectionStream >> i_v[iSection] >> radius_v[iSection] >> chord_v[iSection] >> angle75r_v[iSection]; + } + + /*--- Assign the matrix dimensions. ---*/ + alpha_m.resize(ADBem_NAlpha, std::vector(ADBem_NSection, 0.0)); + cl_m.resize(ADBem_NAlpha, std::vector(ADBem_NSection, 0.0)); + cd_m.resize(ADBem_NAlpha, std::vector(ADBem_NSection, 0.0)); + + /*--- Read and assign the values for each of the propeller blade section's alpha, cl, cd. ---*/ + for (int iSection = 0; iSection < ADBem_NSection; iSection++) { + getline(ActDiskBem_file, text_line_appo); + for (int iAlpha = 0; iAlpha < ADBem_NAlpha; iAlpha++) { + getline(ActDiskBem_file, text_line_appo); + istringstream alphaStream(text_line_appo); + alphaStream >> alpha_m[iAlpha][iSection] >> cl_m[iAlpha][iSection] >> cd_m[iAlpha][iSection]; + } + } + } + + /*--- Update the propeller load according to the modified flow field after every ADBem_Frequency inner iterations. ---*/ + if (InnerIter % ADBem_Frequency != 0) return; + const su2double dia = ADBem_Diameter; + const su2double r_tip = 0.5 * dia; + su2double loc_Torque = 0.0; + su2double loc_thrust = 0.0; + su2double tot_area = 0.0, tot_tq = 0.0; + + su2double Normal[MAXNDIM]; + for (unsigned short iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { + if ((config->GetMarker_All_KindBC(iMarker) == ACTDISK_INLET) || + (config->GetMarker_All_KindBC(iMarker) == ACTDISK_OUTLET)) { + for (unsigned long iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) { + const unsigned long iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); + + /*--- Read Swirl params. ---*/ + const su2double Omega_RPM = ADBem_Omega; + const su2double omega_ref = config->GetOmega_Ref(); + const su2double Lref = config->GetLength_Ref(); + const su2double Omega_sw = Omega_RPM * (PI_NUMBER / 30.0) / (omega_ref); // Swirl rate + + /*--- Center of the rotor ---*/ + su2double Origin[3] = {0.0, 0.0, 0.0}; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + Origin[iDim] = ADBem_CG[iDim] / Lref; + } + + /*--- Compute the distance to the center of the rotor ---*/ + geometry->vertex[iMarker][iVertex]->GetNormal(Normal); + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + Normal[iDim] = -Normal[iDim]; + } + + /*--- Get propeller axis from config file. ---*/ + for (unsigned short iDim = 0; iDim < nDim; iDim++){ + ActDisk_Axis(iMarker, iDim) = ADBem_Axis[iDim]; + } + su2double Area = 0.0; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + Area += Normal[iDim] * Normal[iDim]; + } + Area = sqrt(Area); + + su2double UnitNormal[3] = {0.0, 0.0, 0.0}; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + UnitNormal[iDim] = Normal[iDim] / Area; + } + + const su2double* Coord = geometry->nodes->GetCoord(iPoint); + + su2double radius = 0.0; + su2double radius_[3] = {0.0, 0.0, 0.0}; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + radius += (Coord[iDim] - Origin[iDim]) * (Coord[iDim] - Origin[iDim]); + radius_[iDim] = (Coord[iDim] - Origin[iDim]); + } + radius = sqrt(radius); + + /*--- Current solution at this boundary node and jumps values ---*/ + const su2double* V_domain = nodes->GetPrimitive(iPoint); + + if (abs(Omega_sw) > 1.0e-1) { + su2double Vn = 0.0; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + Vn += V_domain[iDim + 1] * UnitNormal[iDim]; + } + + const su2double RPM = abs(Omega_RPM); + const su2double rps = RPM / 60.0; + ADBem_J = Vel_FreeStream[0] / (rps * dia); + const su2double rho = V_domain[nDim + 2]; + const su2double T = V_domain[0]; + const su2double blade_angle = config->GetBEM_blade_angle(); + const su2double V = fabs(Vn); + + /*--- BEM model without parameter 'a' (ref?) ---*/ + su2double Torque = 0.0, dp_av = 0.0, dp_at_r = 0.0; + { + std::vector DtDr(ADBem_NSection, 0.0); + + int s_prop_nblades = ADBem_NBlade; + int sprop_sec_nalf = ADBem_NAlpha; + int sprop_sec_nrad = ADBem_NSection; + std::vector& sprop_sec_r1 = radius_v; + std::vector& sprop_sec_chord = chord_v; + std::vector& sprop_sec_setangle = angle75r_v; + std::vector >& sprop_sec_alf = alpha_m; + std::vector >& sprop_sec_cl_arr = cl_m; + std::vector >& sprop_sec_cd_arr = cd_m; + + su2double rad_p = radius; + + int j, isec, converged, n_iter; + int NR = sprop_sec_nrad; + su2double r_hub, alpha_corr, cl_corr_fac; + su2double base_mach, s_mach, b_num, thrust, torque; + su2double r_dash, t_loss, c_phi, rad, phi, alpha, radtodeg; + su2double bnew, V0, V2, cl = 0.0, cd = 0.0, Vlocal, DqDr = 0.0, tem1, tem2, q; + std::vector delta_r(ADBem_NSection, 0.0); + std::vector b(ADBem_NSection, 0.0); + static std::vector Dtorq(ADBem_NSection, 0.0); + + su2double n, omega, a0, den; + su2double ang_offset = 0.0; + + radtodeg = 180.0 / PI_NUMBER; + r_hub = ADBem_HubRadius; + ang_offset = blade_angle - ADBem_Angle75R; + + alpha_corr = 0.0; + base_mach = 0.22; + b_num = sqrt(1.0 - base_mach * base_mach); + a0 = sqrt(1.4 * 287 * T); + /*--- Change pitch by ang_offset and calculate delta_r for integration by trapezoidal rule. ---*/ + n = RPM / 60.0; + omega = n * 2.0 * PI_NUMBER; + + for (j = 0; j < NR; j++) { + if (j < 1) { + delta_r[j] = sprop_sec_r1[j + 1] - r_hub; + } else { + if (j < NR - 1) { + delta_r[j] = sprop_sec_r1[j + 1] - sprop_sec_r1[j - 1]; + } else { + delta_r[j] = r_tip - sprop_sec_r1[j - 1]; + } + } + delta_r[j] *= 0.5; + } + + thrust = 0.0; + torque = 0.0; + + for (j = 0; j < NR; j++) { + b[j] = 0.01; + converged = 0; + n_iter = 1; + while (converged == 0) { + V2 = omega * sprop_sec_r1[j] * (1 - b[j]); + V0 = V; + + phi = atan2(V0, V2); + + alpha = sprop_sec_setangle[j] + ang_offset - radtodeg * phi + alpha_corr; + rad = sprop_sec_r1[j]; + + /*--- get cl, cd from lookup table. ---*/ + isec = j + 1; + { + int i, salf = 0; + su2double fact; + + /*--- interpolating values of cl and cd for given alpha. ---*/ + if (alpha >= sprop_sec_alf[salf][isec - 1] && + alpha <= sprop_sec_alf[sprop_sec_nalf - 1][isec - 1]) { + for (i = 0; i < sprop_sec_nalf - 1; i++) { + if (alpha >= sprop_sec_alf[i][isec - 1] && alpha <= sprop_sec_alf[i + 1][isec - 1]) { + fact = (alpha - sprop_sec_alf[i][isec - 1]) + / (sprop_sec_alf[i + 1][isec - 1] - sprop_sec_alf[i][isec - 1]); + cl = sprop_sec_cl_arr[i][isec - 1] + + fact * (sprop_sec_cl_arr[i + 1][isec - 1] - sprop_sec_cl_arr[i][isec - 1]); + cd = sprop_sec_cd_arr[i][isec - 1] + + fact * (sprop_sec_cd_arr[i + 1][isec - 1] - sprop_sec_cd_arr[i][isec - 1]); + } + } + } else { + if (alpha < sprop_sec_alf[salf][isec - 1]) { + cl = sprop_sec_cl_arr[0][isec - 1]; + cd = sprop_sec_cd_arr[0][isec - 1]; + } + if (alpha > sprop_sec_alf[sprop_sec_nalf - 1][isec - 1]) { + cl = sprop_sec_cl_arr[sprop_sec_nalf - 1][isec - 1]; + cd = sprop_sec_cd_arr[sprop_sec_nalf - 1][isec - 1]; + } + } + } + + Vlocal = sqrt(V0 * V0 + V2 * V2); + q = 0.5 * rho * Vlocal * Vlocal; + s_mach = Vlocal / a0; + cl_corr_fac = 1.0; + if (s_mach > base_mach) { + den = 1.0 - s_mach * s_mach; + if (den > 0.0) cl_corr_fac = b_num / sqrt(den); + } + cl *= cl_corr_fac; + + /*--- tip loss factor. ---*/ + r_dash = rad / r_tip + 1.0e-5; + c_phi = cos(phi); + t_loss = 1.0; + if (r_dash > 0.90) { + t_loss = (2.0 / PI_NUMBER) * acos(exp(-(1.0 * s_prop_nblades * (1 - r_dash) / (r_dash * c_phi)))); + } + + DtDr[j] = q * s_prop_nblades * sprop_sec_chord[j] * (cl * cos(phi) - cd * sin(phi)); + DqDr = q * s_prop_nblades * sprop_sec_chord[j] * rad * (cd * cos(phi) + cl * sin(phi)); + + DtDr[j] *= t_loss; + DqDr *= t_loss; + + tem2 = DqDr / (4.0 * PI_NUMBER * rad * rad * rad * rho * V * omega); + bnew = 0.6 * b[j] + 0.4 * tem2; + if (bnew > 0.9) bnew = 0.9; + if (fabs(bnew - b[j]) < 1.0e-5) { + converged = 1; + } + if (bnew < 0.1) { + b[j] = bnew; + } + n_iter++; + if (n_iter > BEM_MAX_ITER) { + converged = 1; + } + } + thrust = thrust + DtDr[j] * delta_r[j]; + torque = torque + DqDr * delta_r[j]; + Dtorq[j] = DqDr; + } + + tem1 = rho * n * n * dia * dia * dia * dia; + tem2 = tem1 * dia; + + Torque = 2.0 * PI_NUMBER * torque; + dp_av = 2.0 * PI_NUMBER * torque; + + for (j = 0; j < NR; j++) { + DtDr[j] /= (2.0 * PI_NUMBER * sprop_sec_r1[j]); + Dtorq[j] = Dtorq[j]; + } + + if (rad_p < sprop_sec_r1[0]) { + tem2 = sprop_sec_r1[0] - r_hub; + tem1 = (rad_p - r_hub) / tem2; + tem2 = 1.0 - tem1; + dp_at_r = DtDr[0] * tem1; + Torque = Dtorq[0] * tem1; + } else { + if (rad_p > r_tip) { + dp_at_r = 0.0; + Torque = 0.0; + } else { + if (rad_p > sprop_sec_r1[NR - 1]) { + tem2 = r_tip - sprop_sec_r1[NR - 1]; + tem1 = (rad_p - sprop_sec_r1[NR - 1]) / tem2; + tem2 = 1.0 - tem1; + dp_at_r = DtDr[NR - 1] * tem2; + Torque = Dtorq[NR - 1] * tem2; + } else { + for (j = 0; j < NR - 1; j++) { + if ((sprop_sec_r1[j] < rad_p) && (sprop_sec_r1[j + 1] >= rad_p)) { + tem2 = sprop_sec_r1[j + 1] - sprop_sec_r1[j]; + tem1 = (rad_p - sprop_sec_r1[j]) / tem2; + tem2 = 1.0 - tem1; + dp_at_r = DtDr[j] * tem2 + DtDr[j + 1] * tem1; + Torque = Dtorq[j] * tem2 + Dtorq[j + 1] * tem1; + } + } + } + } + } + } + + tot_area += Area; + loc_Torque += Torque * Area; + tot_tq += dp_av; + loc_thrust += dp_at_r * Area; + const su2double Target_Press_Jump = dp_at_r; + + ActDisk_DeltaP_r[iMarker][iVertex] = Target_Press_Jump; + ActDisk_Thrust_r[iMarker][iVertex] = dp_at_r; + ActDisk_Torque_r[iMarker][iVertex] = Torque / (2 * PI_NUMBER * radius); + /*--- Non-dimensionalize the elemental load. ---*/ + const su2double dCp_v = Torque * ((Omega_sw * r_tip) / (rho * rps * rps * rps * pow(dia, 5))); + /*--- Force radial load to 0 as there is no information of radial load from BEM. ---*/ + const su2double dCr_v = 0.0; + const su2double rad_v = radius / r_tip; + const su2double Fa = dp_at_r; + const su2double Ft = (dCp_v * (2 * Dens_FreeStream * pow(Vel_FreeStream[0], 2)) / + ((ADBem_J * PI_NUMBER * rad_v) * (ADBem_J * PI_NUMBER * rad_v))) / + config->GetPressure_Ref(); + const su2double Fr = (dCr_v * (2 * Dens_FreeStream * pow(Vel_FreeStream[0], 2)) / + (pow(ADBem_J, 2) * PI_NUMBER * rad_v)) / config->GetPressure_Ref(); + const su2double Fx = (Ft + Fr) * (radius_[0] / (radius)); + const su2double Fy = (Ft + Fr) * (radius_[2] / (radius)); + const su2double Fz = -(Ft + Fr) * (radius_[1] / (radius)); + ActDisk_Fa_BEM[iMarker][iVertex] = Fa; + ActDisk_Fx_BEM[iMarker][iVertex] = Fx; + ActDisk_Fy_BEM[iMarker][iVertex] = Fy; + ActDisk_Fz_BEM[iMarker][iVertex] = Fz; + } + } + } + } +} + void CEulerSolver::SetFarfield_AoA(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, bool Output) { @@ -5620,7 +6103,7 @@ void CEulerSolver::PreprocessBC_Giles(CGeometry *geometry, CConfig *config, CNum { Velocity_i[iDim] = nodes->GetVelocity(iPoint,iDim); } - + ComputeTurboVelocity(Velocity_i, turboNormal, turboVelocity, marker_flag, config->GetKind_TurboMachinery(iZone)); if(nDim ==2){ @@ -7644,7 +8127,7 @@ void CEulerSolver::BC_ActDisk_Inlet(CGeometry *geometry, CSolver **solver_contai unsigned short Kind_ActDisk = config->GetKind_ActDisk(); - if(Kind_ActDisk == VARIABLE_LOAD){ + if (Kind_ActDisk == VARIABLE_LOAD || Kind_ActDisk == BLADE_ELEMENT) { BC_ActDisk_VariableLoad(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker, true); } else{ @@ -7658,7 +8141,7 @@ void CEulerSolver::BC_ActDisk_Outlet(CGeometry *geometry, CSolver **solver_conta unsigned short Kind_ActDisk = config->GetKind_ActDisk(); - if(Kind_ActDisk == VARIABLE_LOAD){ + if (Kind_ActDisk == VARIABLE_LOAD || Kind_ActDisk == BLADE_ELEMENT) { BC_ActDisk_VariableLoad(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker, false); } else{ @@ -8116,6 +8599,8 @@ void CEulerSolver::BC_ActDisk_VariableLoad(CGeometry *geometry, CSolver **solver const auto Gas_Constant = config->GetGas_ConstantND(); const bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST); + unsigned short Kind_ActDisk = config->GetKind_ActDisk(); + /*--- Get the actuator disk center and axis coordinates for the current marker. ---*/ for (iDim = 0; iDim < nDim; iDim++){ Prop_Axis[iDim] = ActDisk_Axis(val_marker, iDim); @@ -8150,10 +8635,17 @@ void CEulerSolver::BC_ActDisk_VariableLoad(CGeometry *geometry, CSolver **solver /*--- Get the values of Fa (axial force per unit area), Fx, Fy and Fz (x, y and z components of the tangential and radial forces per unit area resultant). ---*/ - Fa = ActDisk_Fa[val_marker][iVertex]; - Fx = ActDisk_Fx[val_marker][iVertex]; - Fy = ActDisk_Fy[val_marker][iVertex]; - Fz = ActDisk_Fz[val_marker][iVertex]; + if (Kind_ActDisk == BLADE_ELEMENT) { + Fa = ActDisk_Fa_BEM[val_marker][iVertex]; + Fx = ActDisk_Fx_BEM[val_marker][iVertex]; + Fy = ActDisk_Fy_BEM[val_marker][iVertex]; + Fz = ActDisk_Fz_BEM[val_marker][iVertex]; + } else { /*--- default (Kind_ActDisk == VARIABLE_LOAD) ---*/ + Fa = ActDisk_Fa[val_marker][iVertex]; + Fx = ActDisk_Fx[val_marker][iVertex]; + Fy = ActDisk_Fy[val_marker][iVertex]; + Fz = ActDisk_Fz[val_marker][iVertex]; + } /*--- Get the primitive variables and the extrapolated variables. ---*/ if (val_inlet_surface){ diff --git a/TestCases/TestCase.py b/TestCases/TestCase.py index 488865bc936..1d1a181c8d8 100644 --- a/TestCases/TestCase.py +++ b/TestCases/TestCase.py @@ -361,7 +361,7 @@ def run_filediff(self, running_with_tsan=False): if len(fromlines) != len(tolines): diff = ["ERROR: Number of lines in " + fromfile + " and " + tofile + " differ."] passed = False - + # Loop through all lines for i_line in range(0, len(fromlines)): diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 551cd06a2d8..fc0fa0d16da 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -773,6 +773,7 @@ def main(): pywrapper_translating_naca0012.reference_file = "forces_0.csv.ref" pywrapper_translating_naca0012.reference_file_aarch64 = "forces_0_aarch64.csv.ref" pywrapper_translating_naca0012.test_file = "forces_0.csv" + pywrapper_translating_naca0012.tol_file_percent = 0.1 pywrapper_translating_naca0012.enabled_on_cpu_arch = ["x86_64"] pywrapper_translating_naca0012.enabled_with_tsan = False file_diff_list.append(pywrapper_translating_naca0012) @@ -786,6 +787,7 @@ def main(): pywrapper_updated_moving_frame_naca0012.reference_file = "forces_0.csv.ref" pywrapper_updated_moving_frame_naca0012.reference_file_aarch64 = "forces_0_aarch64.csv.ref" pywrapper_updated_moving_frame_naca0012.test_file = "forces_0.csv" + pywrapper_updated_moving_frame_naca0012.tol_file_percent = 0.1 pywrapper_updated_moving_frame_naca0012.enabled_on_cpu_arch = ["x86_64"] pywrapper_updated_moving_frame_naca0012.enabled_with_tsan = False file_diff_list.append(pywrapper_updated_moving_frame_naca0012) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index bba09e6b344..412b9c83c04 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -486,6 +486,16 @@ def main(): propeller.timeout = 3200 test_list.append(propeller) + # Actuator disk BEM method for propeller + actuatordisk_bem = TestCase('actuatordisk_bem') + actuatordisk_bem.cfg_dir = "rans/actuatordisk_bem" + actuatordisk_bem.cfg_file = "actuatordisk_bem.cfg" + actuatordisk_bem.test_iter = 15 + actuatordisk_bem.test_vals = [-5.282249, -10.335140, 0.001383, -0.375718] + actuatordisk_bem.timeout = 3200 + actuatordisk_bem.tol = 0.001 + test_list.append(actuatordisk_bem) + ####################################### ### Axisymmetric Compressible RANS ### ####################################### diff --git a/TestCases/rans/actuatordisk_bem/actuatordisk_bem.cfg b/TestCases/rans/actuatordisk_bem/actuatordisk_bem.cfg new file mode 100644 index 00000000000..cb74bf56621 --- /dev/null +++ b/TestCases/rans/actuatordisk_bem/actuatordisk_bem.cfg @@ -0,0 +1,122 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: Actuator Disk - Blade Element Method % +% Author: Y Chandukrishna, Josy Poulose Pullockara, T N Venkatesh % +% Institution: Computational and Theoretical Fluid Dynamics (CTFD), % +% CSIR - National Aerospace Laboratories, Bangalore % +% Academy of Scientific and Innovative Research, Ghaziabad % +% Comments : % +% Date: 23/09/2023 % +% File Version 8.0.0 "Harrier" % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%----------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION -------------------------% +SOLVER= RANS +KIND_TURB_MODEL= SA +%FREESTREAM_TURBULENCEINTENSITY=0.01 +MATH_PROBLEM= DIRECT +RESTART_SOL= YES +SYSTEM_MEASUREMENTS= SI + +% -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------% +MACH_NUMBER= 0.11617164 +AOA= 0.0 +SIDESLIP_ANGLE= 0.0 +REYNOLDS_NUMBER= 0.62E6 +REYNOLDS_LENGTH= 0.237 +FREESTREAM_TEMPERATURE= 295 +VISCOSITY_MODEL= CONSTANT_VISCOSITY +MU_CONSTANT= 1.84554E-5 +MU_REF= 1.716E-5 +MU_T_REF= 273.15 +SUTHERLAND_CONSTANT= 110.4 + +% ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% +REF_ORIGIN_MOMENT_X = 0.0 +REF_ORIGIN_MOMENT_Y = 0.0 +REF_ORIGIN_MOMENT_Z = 0.0 +REF_LENGTH= 1.0 +REF_AREA= 0.04411429 +REF_DIMENSIONALIZATION= DIMENSIONAL + +% --------------- ENGINE AND ACTUATOR DISK SIMULATION -------------------------% +% +HIGHLITE_AREA= 0.04411429 +ENGINE_NU_FACTOR= 0.0 + +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% +ACTDISK_DOUBLE_SURFACE = YES +ACTDISK_TYPE= BLADE_ELEMENT +ACTDISK_JUMP= DIFFERENCE +MARKER_ACTDISK = ( ACTDISK_IN, ACTDISK_OUT , 0.0, 0.0, 12715.2, 0.0, 0.0, 12715.2) +MARKER_ACTDISK_BEM_CG= ( ACTDISK_IN, ACTDISK_OUT, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) +MARKER_ACTDISK_BEM_AXIS= ( ACTDISK_IN, ACTDISK_OUT, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 ) +BEM_PROP_FILENAME = prop_geom_alfclcd_data.txt +BEM_PROP_BLADE_ANGLE = 23.9 +BEM_FREQ = 40 +MARKER_FAR= ( Farfield ) + +% ------------------------ SURFACES IDENTIFICATION ----------------------------% +% +MARKER_PLOTTING = ( ACTDISK_IN, ACTDISK_OUT ) +MARKER_MONITORING = ( ACTDISK_IN, ACTDISK_OUT ) +MARKER_ANALYZE = ( ACTDISK_IN, ACTDISK_OUT ) +MARKER_ANALYZE_AVERAGE = MASSFLUX + +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% +NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +CFL_NUMBER= 4.0 +CFL_ADAPT= NO +OBJECTIVE_FUNCTION= DRAG + +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1E-12 +LINEAR_SOLVER_ITER= 3 +CONV_CAUCHY_ELEMS= 1000 +CONV_CAUCHY_EPS= 1E-10 + +% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% +CONV_NUM_METHOD_FLOW= ROE +MUSCL_FLOW= YES +TIME_DISCRE_FLOW= EULER_IMPLICIT + +% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% +% +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +SLOPE_LIMITER_TURB= VENKATAKRISHNAN +TIME_DISCRE_TURB= EULER_IMPLICIT + +% --------------------------- CONVERGENCE PARAMETERS --------------------------% +% +ITER= 2000 +CONV_RESIDUAL_MINVAL= -8 +CONV_STARTITER= 10 + +% ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% +MESH_FILENAME= actuatordisk_bem.su2 +MESH_FORMAT= SU2 +MESH_OUT_FILENAME= mesh_out.su2 +SOLUTION_FILENAME= actuatordisk_bem.dat +TABULAR_FORMAT= CSV +CONV_FILENAME= history_actuatordisk_bem +OUTPUT_FILES= (RESTART, PARAVIEW, SURFACE_PARAVIEW) +WRT_FORCES_BREAKDOWN= YES +BREAKDOWN_FILENAME= forces_breakdown_actuatordisk_bem.dat +RESTART_FILENAME= restart_flow_actuatordisk_bem.dat +VOLUME_FILENAME= flow_actuatordisk_bem +SURFACE_FILENAME= surface_flow_actuatordisk_bem +OUTPUT_WRT_FREQ= 500 +%SCREEN_OUTPUT= (INNER_ITER, WALL_TIME, RMS_DENSITY, RMS_NU_TILDE, NONPHYSICAL_POINTS, LIFT, DRAG) +SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_NU_TILDE, LIFT, DRAG) +HISTORY_OUTPUT= (INNER_ITER, RMS_RES, LIFT, DRAG, AERO_COEFF) diff --git a/TestCases/rans/actuatordisk_bem/prop_geom_alfclcd_data.txt b/TestCases/rans/actuatordisk_bem/prop_geom_alfclcd_data.txt new file mode 100644 index 00000000000..8ee50cc1728 --- /dev/null +++ b/TestCases/rans/actuatordisk_bem/prop_geom_alfclcd_data.txt @@ -0,0 +1,558 @@ +# Geometric parameters of propeller +4 : number of blades +0.237 : diameter (m) +0.01754 : radius of hub (m) +23.9 : angle at 75% radius, has to be consistent with section data +# Nsection, Nalf + 22 23 +#section,radius,chord,set angle +1 0.029625 0.011802 39.738358 +2 0.035550 0.013272 36.824936 +3 0.041475 0.014546 34.978134 +4 0.047400 0.016093 33.867138 +5 0.053325 0.017495 32.648598 +6 0.056288 0.018061 31.824940 +7 0.059250 0.018628 30.987774 +8 0.065175 0.019253 29.155754 +9 0.068137 0.019335 28.223461 +10 0.071100 0.019398 27.291164 +11 0.077025 0.019398 26.051857 +12 0.079988 0.019224 25.441435 +13 0.082950 0.019038 24.831013 +14 0.088875 0.018572 23.900000 +15 0.091837 0.018218 23.311188 +16 0.094800 0.017864 22.824017 +17 0.100725 0.016862 21.970278 +18 0.103688 0.016231 21.604017 +19 0.106650 0.015600 21.237759 +20 0.109613 0.014859 20.871506 +21 0.112575 0.014110 20.506992 +22 0.115538 0.011545 20.322815 +#Sec_1, alpha,cl,cd +-15.00 -0.42201 0.14538 +-10.00 -0.47384 0.03066 +-7.000 -0.31633 0.02323 +-5.000 -0.17261 0.02101 +-2.000 0.062180 0.02041 +0.0000 0.217500 0.02160 +2.0000 0.362500 0.02415 +5.0000 0.545000 0.03092 +8.0000 0.663400 0.04315 +10.000 0.715250 0.05540 +12.000 0.772350 0.07025 +15.000 0.846930 0.09997 +17.000 0.793240 0.14274 +20.000 0.741380 0.21541 +25.000 0.809181 0.31423 +30.000 0.799410 0.45780 +35.000 0.842714 0.58514 +40.000 0.859940 0.72557 +50.000 0.842806 1.01662 +60.000 0.753790 1.27954 +70.000 0.581530 1.49396 +80.000 0.346121 1.63350 +90.000 0.074679 1.67220 +#Sec_2, alpha,cl,cd +-15.00 -0.42201 0.14538 +-10.00 -0.47384 0.03066 +-7.000 -0.31633 0.02323 +-5.000 -0.17261 0.02101 +-2.000 0.062180 0.02041 +0.0000 0.217500 0.02160 +2.0000 0.362500 0.02415 +5.0000 0.545000 0.03092 +8.0000 0.663400 0.04315 +10.000 0.715250 0.05540 +12.000 0.772350 0.07025 +15.000 0.846930 0.09997 +17.000 0.793240 0.14274 +20.000 0.741380 0.21541 +25.000 0.809181 0.31423 +30.000 0.799410 0.45780 +35.000 0.842714 0.58514 +40.000 0.859940 0.72557 +50.000 0.842806 1.01662 +60.000 0.753790 1.27954 +70.000 0.581530 1.49396 +80.000 0.346121 1.63350 +90.000 0.074679 1.67220 +#Sec_3, alpha,cl,cd +-15.00 -0.42201 0.14538 +-10.00 -0.47384 0.03066 +-7.000 -0.31633 0.02323 +-5.000 -0.17261 0.02101 +-2.000 0.062180 0.02041 +0.0000 0.217500 0.02160 +2.0000 0.362500 0.02415 +5.0000 0.545000 0.03092 +8.0000 0.663400 0.04315 +10.000 0.715250 0.05540 +12.000 0.772350 0.07025 +15.000 0.846930 0.09997 +17.000 0.793240 0.14274 +20.000 0.741380 0.21541 +25.000 0.809181 0.31423 +30.000 0.799410 0.45780 +35.000 0.842714 0.58514 +40.000 0.859940 0.72557 +50.000 0.842806 1.01662 +60.000 0.753790 1.27954 +70.000 0.581530 1.49396 +80.000 0.346121 1.63350 +90.000 0.074679 1.67220 +#Sec_4, alpha,cl,cd +-15.00 -0.42201 0.14538 +-10.00 -0.47384 0.03066 +-7.000 -0.31633 0.02323 +-5.000 -0.17261 0.02101 +-2.000 0.062180 0.02041 +0.0000 0.217500 0.02160 +2.0000 0.362500 0.02415 +5.0000 0.545000 0.03092 +8.0000 0.663400 0.04315 +10.000 0.715250 0.05540 +12.000 0.772350 0.07025 +15.000 0.846930 0.09997 +17.000 0.793240 0.14274 +20.000 0.741380 0.21541 +25.000 0.809181 0.31423 +30.000 0.799410 0.45780 +35.000 0.842714 0.58514 +40.000 0.859940 0.72557 +50.000 0.842806 1.01662 +60.000 0.753790 1.27954 +70.000 0.581530 1.49396 +80.000 0.346121 1.63350 +90.000 0.074679 1.67220 +#Sec_5, alpha,cl,cd +-15.00 -0.42201 0.14538 +-10.00 -0.47384 0.03066 +-7.000 -0.31633 0.02323 +-5.000 -0.17261 0.02101 +-2.000 0.062180 0.02041 +0.0000 0.217500 0.02160 +2.0000 0.362500 0.02415 +5.0000 0.545000 0.03092 +8.0000 0.663400 0.04315 +10.000 0.715250 0.05540 +12.000 0.772350 0.07025 +15.000 0.846930 0.09997 +17.000 0.793240 0.14274 +20.000 0.741380 0.21541 +25.000 0.809181 0.31423 +30.000 0.799410 0.45780 +35.000 0.842714 0.58514 +40.000 0.859940 0.72557 +50.000 0.842806 1.01662 +60.000 0.753790 1.27954 +70.000 0.581530 1.49396 +80.000 0.346121 1.63350 +90.000 0.074679 1.67220 +#Sec_6,alpha,cl,cd +-15.00 -0.38500 0.18600 +-10.00 -0.39240 0.08201 +-7.000 -0.34387 0.02873 +-5.000 -0.16518 0.02386 +-2.000 0.119372 0.02119 +0.0000 0.311530 0.02133 +2.0000 0.500006 0.02276 +5.0000 0.767233 0.02742 +8.0000 0.997630 0.03621 +10.000 1.114230 0.04588 +12.000 1.181340 0.06145 +15.000 1.152260 0.10511 +17.000 1.004230 0.16952 +20.000 0.920632 0.26388 +25.000 0.932029 0.40397 +30.000 0.956910 0.54778 +35.000 0.974480 0.71086 +40.000 0.990417 0.86521 +50.000 0.953389 1.17309 +60.000 0.823469 1.46302 +70.000 0.606730 1.70462 +80.000 0.320770 1.86131 +90.000 -0.00218 1.90357 +#Sec_7,alpha,cl,cd +-15.00 -0.38500 0.18600 +-10.00 -0.39240 0.08201 +-7.000 -0.34387 0.02873 +-5.000 -0.16518 0.02386 +-2.000 0.119372 0.02119 +0.0000 0.311530 0.02133 +2.0000 0.500006 0.02276 +5.0000 0.767233 0.02742 +8.0000 0.997630 0.03621 +10.000 1.114230 0.04588 +12.000 1.181340 0.06145 +15.000 1.152260 0.10511 +17.000 1.004230 0.16952 +20.000 0.920632 0.26388 +25.000 0.932029 0.40397 +30.000 0.956910 0.54778 +35.000 0.974480 0.71086 +40.000 0.990417 0.86521 +50.000 0.953389 1.17309 +60.000 0.823469 1.46302 +70.000 0.606730 1.70462 +80.000 0.320770 1.86131 +90.000 -0.00218 1.90357 +#Sec_8,alpha,cl,cd +-15.00 -0.38500 0.18600 +-10.00 -0.39240 0.08201 +-7.000 -0.34387 0.02873 +-5.000 -0.16518 0.02386 +-2.000 0.119372 0.02119 +0.0000 0.311530 0.02133 +2.0000 0.500006 0.02276 +5.0000 0.767233 0.02742 +8.0000 0.997630 0.03621 +10.000 1.114230 0.04588 +12.000 1.181340 0.06145 +15.000 1.152260 0.10511 +17.000 1.004230 0.16952 +20.000 0.920632 0.26388 +25.000 0.932029 0.40397 +30.000 0.956910 0.54778 +35.000 0.974480 0.71086 +40.000 0.990417 0.86521 +50.000 0.953389 1.17309 +60.000 0.823469 1.46302 +70.000 0.606730 1.70462 +80.000 0.320770 1.86131 +90.000 -0.00218 1.90357 +#Sec_9,alpha,cl,cd +-15.00 -0.38500 0.18600 +-10.00 -0.39240 0.08201 +-7.000 -0.34387 0.02873 +-5.000 -0.16518 0.02386 +-2.000 0.119372 0.02119 +0.0000 0.311530 0.02133 +2.0000 0.500006 0.02276 +5.0000 0.767233 0.02742 +8.0000 0.997630 0.03621 +10.000 1.114230 0.04588 +12.000 1.181340 0.06145 +15.000 1.152260 0.10511 +17.000 1.004230 0.16952 +20.000 0.920632 0.26388 +25.000 0.932029 0.40397 +30.000 0.956910 0.54778 +35.000 0.974480 0.71086 +40.000 0.990417 0.86521 +50.000 0.953389 1.17309 +60.000 0.823469 1.46302 +70.000 0.606730 1.70462 +80.000 0.320770 1.86131 +90.000 -0.00218 1.90357 +#Sec_10,alpha,cl,cd +-15.00 -0.38500 0.18600 +-10.00 -0.39240 0.08201 +-7.000 -0.34387 0.02873 +-5.000 -0.16518 0.02386 +-2.000 0.119372 0.02119 +0.0000 0.311530 0.02133 +2.0000 0.500006 0.02276 +5.0000 0.767233 0.02742 +8.0000 0.997630 0.03621 +10.000 1.114230 0.04588 +12.000 1.181340 0.06145 +15.000 1.152260 0.10511 +17.000 1.004230 0.16952 +20.000 0.920632 0.26388 +25.000 0.932029 0.40397 +30.000 0.956910 0.54778 +35.000 0.974480 0.71086 +40.000 0.990417 0.86521 +50.000 0.953389 1.17309 +60.000 0.823469 1.46302 +70.000 0.606730 1.70462 +80.000 0.320770 1.86131 +90.000 -0.00218 1.90357 +#Sec_11,alpha,cl,cd +-15.00 -0.38500 0.18600 +-10.00 -0.39240 0.08201 +-7.000 -0.34387 0.02873 +-5.000 -0.16518 0.02386 +-2.000 0.119372 0.02119 +0.0000 0.311530 0.02133 +2.0000 0.500006 0.02276 +5.0000 0.767233 0.02742 +8.0000 0.997630 0.03621 +10.000 1.114230 0.04588 +12.000 1.181340 0.06145 +15.000 1.152260 0.10511 +17.000 1.004230 0.16952 +20.000 0.920632 0.26388 +25.000 0.932029 0.40397 +30.000 0.956910 0.54778 +35.000 0.974480 0.71086 +40.000 0.990417 0.86521 +50.000 0.953389 1.17309 +60.000 0.823469 1.46302 +70.000 0.606730 1.70462 +80.000 0.320770 1.86131 +90.000 -0.00218 1.90357 +#Sec_12,alpha,cl,cd +-15.00 -0.38500 0.18600 +-10.00 -0.39240 0.08201 +-7.000 -0.34387 0.02873 +-5.000 -0.16518 0.02386 +-2.000 0.119372 0.02119 +0.0000 0.311530 0.02133 +2.0000 0.500006 0.02276 +5.0000 0.767233 0.02742 +8.0000 0.997630 0.03621 +10.000 1.114230 0.04588 +12.000 1.181340 0.06145 +15.000 1.152260 0.10511 +17.000 1.004230 0.16952 +20.000 0.920632 0.26388 +25.000 0.932029 0.40397 +30.000 0.956910 0.54778 +35.000 0.974480 0.71086 +40.000 0.990417 0.86521 +50.000 0.953389 1.17309 +60.000 0.823469 1.46302 +70.000 0.606730 1.70462 +80.000 0.320770 1.86131 +90.000 -0.00218 1.90357 +#Sec_13,alpha,cl,cd +-15.00 -0.38500 0.18600 +-10.00 -0.39240 0.08201 +-7.000 -0.34387 0.02873 +-5.000 -0.16518 0.02386 +-2.000 0.119372 0.02119 +0.0000 0.311530 0.02133 +2.0000 0.500006 0.02276 +5.0000 0.767233 0.02742 +8.0000 0.997630 0.03621 +10.000 1.114230 0.04588 +12.000 1.181340 0.06145 +15.000 1.152260 0.10511 +17.000 1.004230 0.16952 +20.000 0.920632 0.26388 +25.000 0.932029 0.40397 +30.000 0.956910 0.54778 +35.000 0.974480 0.71086 +40.000 0.990417 0.86521 +50.000 0.953389 1.17309 +60.000 0.823469 1.46302 +70.000 0.606730 1.70462 +80.000 0.320770 1.86131 +90.000 -0.00218 1.90357 +#Sec_14,alpha,cl,cd +-15.00 -0.71025 0.250000 +-10.00 -0.62520 0.152360 +-7.000 -0.46165 0.067514 +-5.000 -0.31109 0.028340 +-2.000 0.002995 0.020170 +0.0000 0.209724 0.019035 +2.0000 0.420804 0.019842 +5.0000 0.726100 0.024640 +8.0000 1.005110 0.035811 +10.000 1.142203 0.051340 +12.000 1.071063 0.097789 +15.000 0.885860 0.219350 +17.000 0.917480 0.273890 +20.000 0.929127 0.350000 +25.000 0.982100 0.480000 +30.000 1.038380 0.614900 +35.000 1.072214 0.704314 +40.000 1.082084 0.920430 +50.000 1.032150 1.244025 +60.000 0.884800 1.549000 +70.000 0.652577 1.810174 +80.000 0.346247 1.982400 +90.000 -0.00090 2.034369 +#Sec_15,alpha,cl,cd +-15.00 -0.71025 0.250000 +-10.00 -0.62520 0.152360 +-7.000 -0.46165 0.067514 +-5.000 -0.31109 0.028340 +-2.000 0.002995 0.020170 +0.0000 0.209724 0.019035 +2.0000 0.420804 0.019842 +5.0000 0.726100 0.024640 +8.0000 1.005110 0.035811 +10.000 1.142203 0.051340 +12.000 1.071063 0.097789 +15.000 0.885860 0.219350 +17.000 0.917480 0.273890 +20.000 0.929127 0.350000 +25.000 0.982100 0.480000 +30.000 1.038380 0.614900 +35.000 1.072214 0.704314 +40.000 1.082084 0.920430 +50.000 1.032150 1.244025 +60.000 0.884800 1.549000 +70.000 0.652577 1.810174 +80.000 0.346247 1.982400 +90.000 -0.00090 2.034369 +#Sec_16,alpha,cl,cd +-15.00 -0.450235 0.123572 +-10.00 -0.509059 0.092961 +-7.000 -0.473475 0.068098 +-5.000 -0.311293 0.028335 +-2.000 -0.000500 0.020111 +0.0000 0.212258 0.019451 +2.0000 0.423786 0.020642 +5.0000 0.731349 0.026056 +8.0000 1.008821 0.038666 +10.000 1.135043 0.058155 +12.000 0.937040 0.138576 +15.000 0.964997 0.255187 +17.000 0.872200 0.324306 +20.000 0.857793 0.333029 +25.000 0.922114 0.460801 +30.000 1.045545 0.626256 +35.000 1.076223 0.775646 +40.000 1.084297 0.932095 +50.000 1.031466 1.254707 +60.000 0.883621 1.561348 +70.000 0.645650 1.814277 +80.000 0.337736 1.982865 +90.000 -0.00965 2.034968 +#Sec_17,alpha,cl,cd +-15.00 -0.450235 0.123572 +-10.00 -0.509059 0.092961 +-7.000 -0.473475 0.068098 +-5.000 -0.311293 0.028335 +-2.000 -0.000500 0.020111 +0.0000 0.212258 0.019451 +2.0000 0.423786 0.020642 +5.0000 0.731349 0.026056 +8.0000 1.008821 0.038666 +10.000 1.135043 0.058155 +12.000 0.937040 0.138576 +15.000 0.964997 0.255187 +17.000 0.872200 0.324306 +20.000 0.857793 0.333029 +25.000 0.922114 0.460801 +30.000 1.045545 0.626256 +35.000 1.076223 0.775646 +40.000 1.084297 0.932095 +50.000 1.031466 1.254707 +60.000 0.883621 1.561348 +70.000 0.645650 1.814277 +80.000 0.337736 1.982865 +90.000 -0.00965 2.034968 +#Sec_18,alpha,cl,cd +-15.00 -0.450235 0.123572 +-10.00 -0.509059 0.092961 +-7.000 -0.473475 0.068098 +-5.000 -0.311293 0.028335 +-2.000 -0.000500 0.020111 +0.0000 0.212258 0.019451 +2.0000 0.423786 0.020642 +5.0000 0.731349 0.026056 +8.0000 1.008821 0.038666 +10.000 1.135043 0.058155 +12.000 0.937040 0.138576 +15.000 0.964997 0.255187 +17.000 0.872200 0.324306 +20.000 0.857793 0.333029 +25.000 0.922114 0.460801 +30.000 1.045545 0.626256 +35.000 1.076223 0.775646 +40.000 1.084297 0.932095 +50.000 1.031466 1.254707 +60.000 0.883621 1.561348 +70.000 0.645650 1.814277 +80.000 0.337736 1.982865 +90.000 -0.00965 2.034968 +#Sec_19,alpha,cl,cd +-15.00 -0.624154 0.154154 +-10.00 -0.538409 0.080512 +-7.000 -0.481732 0.075544 +-5.000 -0.313564 0.031177 +-2.000 -0.002507 0.018085 +0.0000 0.210838 0.016733 +2.0000 0.422316 0.017475 +5.0000 0.727235 0.022779 +8.0000 0.990487 0.038041 +10.000 1.023327 0.079155 +12.000 1.014323 0.123481 +15.000 1.002321 0.213523 +17.000 0.965321 0.261254 +20.000 0.942346 0.312364 +25.000 0.925641 0.375215 +30.000 1.056059 0.616220 +35.000 1.086160 0.764234 +40.000 1.097267 0.923027 +50.000 1.046694 1.250085 +60.000 0.903101 1.564407 +70.000 0.665977 1.821230 +80.000 0.357959 1.994476 +90.000 0.008920 2.053167 +#Sec_20,alpha,cl,cd +-15.00 -0.624154 0.154154 +-10.00 -0.538409 0.080512 +-7.000 -0.481732 0.075544 +-5.000 -0.313564 0.031177 +-2.000 -0.002507 0.018085 +0.0000 0.210838 0.016733 +2.0000 0.422316 0.017475 +5.0000 0.727235 0.022779 +8.0000 0.990487 0.038041 +10.000 1.023327 0.079155 +12.000 1.014323 0.123481 +15.000 1.002321 0.213523 +17.000 0.965321 0.261254 +20.000 0.942346 0.312364 +25.000 0.925641 0.375215 +30.000 1.056059 0.616220 +35.000 1.086160 0.764234 +40.000 1.097267 0.923027 +50.000 1.046694 1.250085 +60.000 0.903101 1.564407 +70.000 0.665977 1.821230 +80.000 0.357959 1.994476 +90.000 0.008920 2.053167 +#Sec_21,alpha,cl,cd +-15.00 -0.624154 0.154154 +-10.00 -0.538409 0.080512 +-7.000 -0.481732 0.075544 +-5.000 -0.313564 0.031177 +-2.000 -0.002507 0.018085 +0.0000 0.210838 0.016733 +2.0000 0.422316 0.017475 +5.0000 0.727235 0.022779 +8.0000 0.990487 0.038041 +10.000 1.023327 0.079155 +12.000 1.014323 0.123481 +15.000 1.002321 0.213523 +17.000 0.965321 0.261254 +20.000 0.942346 0.312364 +25.000 0.925641 0.375215 +30.000 1.056059 0.616220 +35.000 1.086160 0.764234 +40.000 1.097267 0.923027 +50.000 1.046694 1.250085 +60.000 0.903101 1.564407 +70.000 0.665977 1.821230 +80.000 0.357959 1.994476 +90.000 0.008920 2.053167 +#Sec_22,alpha,cl,cd +-15.00 -0.624154 0.154154 +-10.00 -0.538409 0.080512 +-7.000 -0.481732 0.075544 +-5.000 -0.313564 0.031177 +-2.000 -0.002507 0.018085 +0.0000 0.210838 0.016733 +2.0000 0.422316 0.017475 +5.0000 0.727235 0.022779 +8.0000 0.990487 0.038041 +10.000 1.023327 0.079155 +12.000 1.014323 0.123481 +15.000 1.002321 0.213523 +17.000 0.965321 0.261254 +20.000 0.942346 0.312364 +25.000 0.925641 0.375215 +30.000 1.056059 0.616220 +35.000 1.086160 0.764234 +40.000 1.097267 0.923027 +50.000 1.046694 1.250085 +60.000 0.903101 1.564407 +70.000 0.665977 1.821230 +80.000 0.357959 1.994476 +90.000 0.008920 2.053167 diff --git a/TestCases/rans/actuatordisk_bem/readme.txt b/TestCases/rans/actuatordisk_bem/readme.txt new file mode 100644 index 00000000000..58d2abceca3 --- /dev/null +++ b/TestCases/rans/actuatordisk_bem/readme.txt @@ -0,0 +1,16 @@ +Propeller data provided as the test case here is the propeller used in the studies of Sinnige et al. 2018 in their experimental studies. Isolated propeller geometry as .stp file and experimental results (J vs CT, J vs CP) are provided as supplementary materials along with the publication. + +The current test case corresponds to the four bladed propeller of diameter 0.237m in a freestream velocity (Vinf) of 40m/s, advance ratio of J=0.8, propeller blade angle at 0.75R is 23.9 degrees. + +The experimental thrust and power (Non-Dimensional) at J ~ 0.8 are as follows: + +J=Vinf/nD CT=Thrust/rho*n2*D4 CP=Power/rho*n3*D5 +0.7963 0.0953 0.1025 + +The dimensional values are Thrust = 16.30 N and Torque = 0.6612 N-m. + +Reference: +----------- +Sinnige, T., van Arnhem, N., Stokkermans, T. C. A., Eitelberg, G., Veldhuis, L. L. M., ``Wingtip-Mounted + Propellers: Aerodynamic Analysis of Interaction Effects and Comparison with Conventional Layout,'' + Journal of Aircraft, 2018. diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index b3de9a6a944..9485d0f5031 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -1068,6 +1068,7 @@ def main(): airfoilRBF.cfg_file = "config.cfg" airfoilRBF.test_iter = 1 airfoilRBF.test_vals = [1.000000, -2.786186, -4.977944] + airfoilRBF.tol = 0.0001 airfoilRBF.multizone = True test_list.append(airfoilRBF) diff --git a/config_template.cfg b/config_template.cfg index 4790c69d05f..fff3f40cdc9 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -927,8 +927,11 @@ MARKER_INLET= ( NONE ) % Inc. Mass Flow: ( outlet marker, mass flow target (kg/s), ... ) MARKER_OUTLET= ( NONE ) % +% Propeller blade element actuator disk double surface (inlet, outlet) boundary condition +ACTDISK_DOUBLE_SURFACE = NO +% % Actuator disk boundary type (VARIABLE_LOAD, VARIABLES_JUMP, BC_THRUST, -% DRAG_MINUS_THRUST) +% DRAG_MINUS_THRUST, BLADE_ELEMENT) ACTDISK_TYPE= VARIABLES_JUMP % % Actuator disk boundary marker(s) with the following formats (NONE = no marker) @@ -942,11 +945,33 @@ ACTDISK_TYPE= VARIABLES_JUMP % Drag-Thrust: ( inlet face marker, outlet face marker, % Takeoff Drag-Thrust (lbs), 0.0, Takeoff rev/min, % Cruise Drag-Thrust (lbs), 0.0, Cruise rev/min ) +% Blade element: ( inlet face marker, outlet face marker, +% Takeoff Drag-Thrust (lbs), 0.0, Takeoff rev/min, +% Cruise Drag-Thrust (lbs), 0.0, Cruise rev/min ) MARKER_ACTDISK= ( NONE ) % +% Blade element: ( inlet face marker, outlet face marker, +% X_CG of inlet, Y_CG of inlet, Z_CG of inlet, +% X_CG of outlet, Y_CG of outlet, Z_CG of outlet ) +MARKER_ACTDISK_BEM_CG= ( NONE ) +% +% Blade element: ( inlet face marker, outlet face marker, +% X_Axis of inlet, Y_Axis of inlet, Z_Axis of inlet, +% X_Axis of outlet, Y_Axis of outlet, Z_Axis of outlet ) +MARKER_ACTDISK_BEM_AXIS= ( NONE ) +% % Actuator disk data input file name ACTDISK_FILENAME= actuatordisk.dat % +% Propeller blade element section and aerodynamic data input file name +BEM_PROP_FILENAME = prop_geom_alfclcd_data.txt +% +% Propeller blade angle (degrees) at (0.75 * radius) +BEM_PROP_BLADE_ANGLE = 25.0 +% +% BEM calculation frequency +BEM_FREQ = 40 +% % Supersonic inlet boundary marker(s) (NONE = no marker) % Format: (inlet marker, temperature, static pressure, velocity_x, % velocity_y, velocity_z, ... ), i.e. primitive variables specified.