Skip to content

Commit

Permalink
Transfer unit test files from regression->external directory + add al…
Browse files Browse the repository at this point in the history
…l required input files for the ADI library
  • Loading branch information
faisal-bhuiyan committed Oct 2, 2024
1 parent 6ae5a0e commit bab9fe9
Show file tree
Hide file tree
Showing 24 changed files with 4,831 additions and 33 deletions.
20 changes: 7 additions & 13 deletions src/utilities/aerodynamics/aerodyn_inflow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,23 +561,20 @@ class AeroDynInflowLibrary {
public:
/// Constructor to initialize AeroDyn Inflow library with default settings and optional path
AeroDynInflowLibrary(
std::string shared_lib_path = "", ErrorHandling eh = ErrorHandling{},
FluidProperties fp = FluidProperties{},
std::string shared_lib_path = "aerodyn_inflow_c_binding.dll",
ErrorHandling eh = ErrorHandling{}, FluidProperties fp = FluidProperties{},
EnvironmentalConditions ec = EnvironmentalConditions{},
TurbineSettings ts = TurbineSettings{}, StructuralMesh sm = StructuralMesh{},
SimulationControls sc = SimulationControls{}, VTKSettings vtk = VTKSettings{}
)
: error_handling_(std::move(eh)),
: lib_{shared_lib_path, util::dylib::no_filename_decorations},
error_handling_(std::move(eh)),
air_(std::move(fp)),
env_conditions_(std::move(ec)),
turbine_settings_(std::move(ts)),
structural_mesh_(std::move(sm)),
sim_controls_(std::move(sc)),
vtk_settings_(std::move(vtk)) {
if (!shared_lib_path.empty()) {
lib_ = util::dylib(shared_lib_path, util::dylib::no_filename_decorations);
}
}
vtk_settings_(std::move(vtk)) {}

/// Destructor to take care of Fortran-side cleanup if the library is initialized
~AeroDynInflowLibrary() noexcept {
Expand Down Expand Up @@ -953,11 +950,8 @@ class AeroDynInflowLibrary {
}

private:
bool is_initialized_{false}; //< Flag to check if the library is initialized
util::dylib lib_{
"libaerodyn_inflow_c_binding.dylib",
util::dylib::no_filename_decorations //< Dynamic library object for AeroDyn Inflow
};
bool is_initialized_{false}; //< Flag to check if the library is initialized
util::dylib lib_; //< Dynamic library object for AeroDyn Inflow
ErrorHandling error_handling_; //< Error handling settings
FluidProperties air_; //< Properties of the working fluid (air)
EnvironmentalConditions env_conditions_; //< Environmental conditions
Expand Down
1 change: 1 addition & 0 deletions tests/unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ add_executable(openturbine_unit_tests)

# Add subdirectories for additional components
add_subdirectory(beams)
add_subdirectory(external)
add_subdirectory(model)
add_subdirectory(regression)
add_subdirectory(solver)
Expand Down
59 changes: 59 additions & 0 deletions tests/unit_tests/external/5MW_Baseline/Airfoils/Cylinder1.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
! ------------ AirfoilInfo v1.01.x Input File ----------------------------------
! Round root section with a Cd of 0.50
! Made by Jason Jonkman
! note that this file uses Marshall Buhl's new input file processing; start all comment lines with !
! ------------------------------------------------------------------------------
"DEFAULT" InterpOrd ! Interpolation order to use for quasi-steady table lookup {1=linear; 3=cubic spline; "default"} [default=1]
1 NonDimArea ! The non-dimensional area of the airfoil (area/chord^2) (set to 1.0 if unsure or unneeded)
@"Cylinder1_coords.txt" NumCoords ! The number of coordinates in the airfoil shape file. Set to zero if coordinates not included.
"unused" BL_file ! The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
1 NumTabs ! Number of airfoil tables in this file.
! ------------------------------------------------------------------------------
! data for table 1
! ------------------------------------------------------------------------------
0.75 Re ! Reynolds number in millions
0 UserProp ! User property (control) setting
True InclUAdata ! Is unsteady aerodynamics data included in this table? If TRUE, then include 30 UA coefficients below this line
!........................................
0 alpha0 ! 0-lift angle of attack, depends on airfoil.
0 alpha1 ! Angle of attack at f=0.7, (approximately the stall angle) for AOA>alpha0. (deg)
0 alpha2 ! Angle of attack at f=0.7, (approximately the stall angle) for AOA<alpha0. (deg)
0 eta_e ! Recovery factor in the range [0.85 - 0.95] used only for UAMOD=1, it is set to 1 in the code when flookup=True. (-)
0 C_nalpha ! Slope of the 2D normal force coefficient curve. (1/rad)
3 T_f0 ! Initial value of the time constant associated with Df in the expression of Df and f''. [default = 3]
6 T_V0 ! Initial value of the time constant associated with the vortex lift decay process; it is used in the expression of Cvn. It depends on Re,M, and airfoil class. [default = 6]
1.7 T_p ! Boundary-layer,leading edge pressure gradient time constant in the expression of Dp. It should be tuned based on airfoil experimental data. [default = 1.7]
11 T_VL ! Initial value of the time constant associated with the vortex advection process; it represents the non-dimensional time in semi-chords, needed for a vortex to travel from LE to trailing edge (TE); it is used in the expression of Cvn. It depends on Re, M (weakly), and airfoil. [valid range = 6 - 13, default = 11]
0.14 b1 ! Constant in the expression of phi_alpha^c and phi_q^c. This value is relatively insensitive for thin airfoils, but may be different for turbine airfoils. [from experimental results, defaults to 0.14]
0.53 b2 ! Constant in the expression of phi_alpha^c and phi_q^c. This value is relatively insensitive for thin airfoils, but may be different for turbine airfoils. [from experimental results, defaults to 0.53]
5 b5 ! Constant in the expression of K'''_q,Cm_q^nc, and k_m,q. [from experimental results, defaults to 5]
0.3 A1 ! Constant in the expression of phi_alpha^c and phi_q^c. This value is relatively insensitive for thin airfoils, but may be different for turbine airfoils. [from experimental results, defaults to 0.3]
0.7 A2 ! Constant in the expression of phi_alpha^c and phi_q^c. This value is relatively insensitive for thin airfoils, but may be different for turbine airfoils. [from experimental results, defaults to 0.7]
1 A5 ! Constant in the expression of K'''_q,Cm_q^nc, and k_m,q. [from experimental results, defaults to 1]
0 S1 ! Constant in the f curve best-fit for alpha0<=AOA<=alpha1; by definition it depends on the airfoil. [ignored if UAMod<>1]
0 S2 ! Constant in the f curve best-fit for AOA> alpha1; by definition it depends on the airfoil. [ignored if UAMod<>1]
0 S3 ! Constant in the f curve best-fit for alpha2<=AOA< alpha0; by definition it depends on the airfoil. [ignored if UAMod<>1]
0 S4 ! Constant in the f curve best-fit for AOA< alpha2; by definition it depends on the airfoil. [ignored if UAMod<>1]
0 Cn1 ! Critical value of C0n at leading edge separation. It should be extracted from airfoil data at a given Mach and Reynolds number. It can be calculated from the static value of Cn at either the break in the pitching moment or the loss of chord force at the onset of stall. It is close to the condition of maximum lift of the airfoil at low Mach numbers.
0 Cn2 ! As Cn1 for negative AOAs.
0.19 St_sh ! Strouhal's shedding frequency constant. [default = 0.19]
0.5 Cd0 ! 2D drag coefficient value at 0-lift.
0 Cm0 ! 2D pitching moment coefficient about 1/4-chord location, at 0-lift, positive if nose up. [If the aerodynamics coefficients table does not include a column for Cm, this needs to be set to 0.0]
0 k0 ! Constant in the \hat(x)_cp curve best-fit; = (\hat(x)_AC-0.25). [ignored if UAMod<>1]
0 k1 ! Constant in the \hat(x)_cp curve best-fit. [ignored if UAMod<>1]
0 k2 ! Constant in the \hat(x)_cp curve best-fit. [ignored if UAMod<>1]
0 k3 ! Constant in the \hat(x)_cp curve best-fit. [ignored if UAMod<>1]
0 k1_hat ! Constant in the expression of Cc due to leading edge vortex effects. [ignored if UAMod<>1]
0.2 x_cp_bar ! Constant in the expression of \hat(x)_cp^v. [ignored if UAMod<>1, default = 0.2]
"DEFAULT" UACutout ! Angle of attack above which unsteady aerodynamics are disabled (deg). [Specifying the string "Default" sets UACutout to 45 degrees]
"DEFAULT" filtCutOff ! Reduced frequency cut-off for low-pass filtering the AoA input to UA, as well as the 1st and 2nd derivatives (-) [default = 0.5]
!........................................
! Table of aerodynamics coefficients
3 NumAlf ! Number of data lines in the following table
! Alpha Cl Cd Cm
! (deg) (-) (-) (-)
-180.00 0.000 0.5000 0.0
0.00 0.000 0.5000 0.0
180.00 0.000 0.5000 0.0
! ------------------------------------------------------------------------------

Loading

0 comments on commit bab9fe9

Please sign in to comment.