Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D Pitching Fixed Wing #983

Merged
merged 52 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
fc1c166
Added functionality to read and apply a pitch actuation time series f…
ET14 Feb 20, 2024
d1b4e26
Pitch Actuation: fix small bugs for declaration
ET14 Feb 20, 2024
8f24edf
Pitch Actuation: fix small bugs for declaration
ET14 Feb 20, 2024
8510099
Pitch Actuation: fix small bugs for declaration
ET14 Feb 20, 2024
20f49c4
Pitch Actuation: fix small bugs for declaration
Feb 21, 2024
7eaca46
formatting
mbkuhn Feb 26, 2024
76ca2db
correcting usage of amrex::Print()
mbkuhn Feb 26, 2024
b27368b
Add file identifier for pitch angle input file name and remove else s…
ET14 Feb 27, 2024
57b57d7
Remove unnecessary declaration of aoa
ET14 Feb 27, 2024
d074c45
formatting
mbkuhn Feb 27, 2024
1b14397
Merge branch 'main' into 2DPitchingFixedWing
mbkuhn Feb 27, 2024
04d05ca
missing }
mbkuhn Feb 27, 2024
4936631
Merge branch '2DPitchingFixedWing' of https://github.com/ET14/amr-win…
mbkuhn Feb 27, 2024
2f9afa9
1) Added 2D Gaussian for 2D problems 2) Modified pitch angle interpol…
ET14 Mar 12, 2024
a631931
Added 1) In case of 2D Gaussian: Rescaling of actuator force with the…
May 8, 2024
336ff75
Merge branch 'main' into 2DPitchingFixedWing
mbkuhn Jun 4, 2024
1f29057
formatting
mbkuhn Jun 4, 2024
3d757ae
ability to zero specific distance and force components
mbkuhn Jun 4, 2024
38c3f0a
fix bug changing the order of epsilon
mbkuhn Jun 4, 2024
0cd2f1a
better user interface for 2D actuator, apply factors for 2D
mbkuhn Jun 4, 2024
d472efd
minor
mbkuhn Jun 4, 2024
be4a82e
more minor stuff
mbkuhn Jun 4, 2024
3df9596
fixing comment
mbkuhn Jun 4, 2024
3e01f78
misspelling
mbkuhn Jun 4, 2024
9783f4c
fix bug with epsilon order
mbkuhn Jun 4, 2024
260d67b
making 2D capability explicitly in spanwise direction and updating bo…
mbkuhn Jun 4, 2024
ab62bda
remove variables left behind
mbkuhn Jun 4, 2024
f8d1980
more efficient parsing
mbkuhn Jun 4, 2024
352ba98
little thing
mbkuhn Jun 4, 2024
1016008
warning for non-periodic spanwise direction
mbkuhn Jun 5, 2024
8d7019a
don't require pitch when timetable is specified
mbkuhn Jun 5, 2024
d44d04a
set up reg test (mostly)
mbkuhn Jun 5, 2024
6b99a86
new query capability
mbkuhn Jun 5, 2024
e918e18
add sine pitch time series input file to the test case and adjust win…
Jun 20, 2024
672cea9
file names
mbkuhn Jun 27, 2024
c8158df
code review changes
mbkuhn Jun 27, 2024
1845fb6
changed too much
mbkuhn Jun 27, 2024
12701a3
move things outside loop if not function of ip, edit comments, use li…
mbkuhn Jun 28, 2024
3497ffe
trim reg test
mbkuhn Jun 28, 2024
3b198fb
update transformation matrix with time
mbkuhn Jun 28, 2024
3ef87d8
output pitch as function of time to netcdf postprocessing
mbkuhn Jun 28, 2024
0d2b101
add detail to print statement to reflect meaning of "current" pitch
mbkuhn Jun 28, 2024
312760a
removing wing_ops read_inputs
mbkuhn Jul 3, 2024
01a468d
removing excess make_component_view
mbkuhn Jul 3, 2024
a7e7eae
unit tests!
mbkuhn Jul 3, 2024
5cb9b9b
put header into pitch timetable file
mbkuhn Jul 3, 2024
9865439
remove commented inclusions
mbkuhn Jul 3, 2024
fee3ae3
add another option to match results in paper
mbkuhn Jul 3, 2024
45d3388
documentation
mbkuhn Jul 5, 2024
ce96edb
Merge branch 'main' into 2DPitchingFixedWing
mbkuhn Jul 5, 2024
7fffb2c
minor improvements
mbkuhn Jul 8, 2024
c605c22
all const
mbkuhn Jul 8, 2024
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
9 changes: 9 additions & 0 deletions amr-wind/wind_energy/actuator/wing/ActuatorWing.H
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ struct WingBaseData
//! Pitch angle for the wing
amrex::Real pitch{0.0};

//! File name for pitch actuation table
std::string pitch_timetable_file;

//! Pitch actuation: time table
amrex::Vector<amrex::Real> time_table;

//! Pitch actuation: pitch angle table
amrex::Vector<amrex::Real> pitch_table;

//! Relative velocity at the actuator node
VecList vel_rel;

Expand Down
18 changes: 18 additions & 0 deletions amr-wind/wind_energy/actuator/wing/fixed_wing_ops.H
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ struct ReadInputsOp<FixedWing, ActSrcLine>
bool use_fllc = false;
pp.query("fllc", use_fllc);

// Initialize tables for pitch actuation (in degrees)
pp.query("pitch_timetable", wdata.pitch_timetable_file);
if (!wdata.pitch_timetable_file.empty()) {
std::ifstream ifh(wdata.pitch_timetable_file, std::ios::in);
if (!ifh.good()) {
amrex::Abort(
"Cannot find input file: " + wdata.pitch_timetable_file);
}
amrex::Real data_time;
amrex::Real data_pitch_deg;
ifh.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
while (ifh >> data_time) {
ifh >> data_pitch_deg;
wdata.time_table.push_back(data_time);
wdata.pitch_table.push_back(data_pitch_deg);
}
}

pp.query("motion_type", wdata.motion_type);
{
// do nothing for default, "none"
Expand Down
14 changes: 13 additions & 1 deletion amr-wind/wind_energy/actuator/wing/wing_ops.H
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "amr-wind/wind_energy/actuator/aero/AirfoilTable.H"
#include "amr-wind/wind_energy/actuator/ActParser.H"
#include "amr-wind/wind_energy/actuator/FLLCOp.H"
#include "amr-wind/utilities/linear_interpolation.H"

namespace amr_wind::actuator {
namespace wing {
Expand Down Expand Up @@ -164,8 +165,19 @@ struct ComputeForceOp<
windvector[2] = (grid.vel[ip] - wdata.vel_tr) & blade_z;

const auto vmag = vs::mag(windvector);

// Calculate the aoa based on the pitch actuation table if supplied
// (interpolate pitch angle at step n) or the initial pitch angle
amrex::Real aoa;
if (!wdata.pitch_timetable_file.empty()) {
wdata.pitch = amr_wind::interp::linear(
mbkuhn marked this conversation as resolved.
Show resolved Hide resolved
wdata.time_table, wdata.pitch_table, time.current_time());
amrex::Print() << "Wing Ops: Current wing pitch is "
<< wdata.pitch << " degrees.\n";

const auto aoa = std::atan2(windvector[2], windvector[0]) +
amr_wind::utils::radians(wdata.pitch);
amr_wind::utils::radians(wdata.pitch);


// Make up some Cl, Cd values
amrex::Real cl, cd;
Expand Down