Skip to content

Commit

Permalink
For the Joukowsky ADM, change input from rad/s to RPM, and add a defa…
Browse files Browse the repository at this point in the history
…ult for the vortex core size. (Exawind#645)
  • Loading branch information
neilmatula authored Jun 30, 2022
1 parent d7530c0 commit 2513bb3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
16 changes: 12 additions & 4 deletions amr-wind/wind_energy/actuator/disk/Joukowsky_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ void check_for_parse_conflicts(const utils::ActParser& pp)
{
auto error_collector = ops::base::check_for_parse_conflicts(pp);
// clang-format off
base::collect_parse_dependencies(pp, "thrust_coeff", "angular_velocity", error_collector);
base::collect_parse_dependencies(pp, "use_root_correction", "vortex_core_size", error_collector);
base::collect_parse_dependencies(pp, "thrust_coeff", "rpm", error_collector);
// clang-format on
ops::base::check_error_stream(error_collector);
}
Expand All @@ -22,7 +21,12 @@ void optional_parameters(JoukowskyData& meta, const utils::ActParser& pp)
ops::base::optional_parameters(meta, pp);
pp.query("use_root_correction", meta.use_root_correction);
pp.query("use_tip_correction", meta.use_tip_correction);
pp.query("vortex_core_size", meta.vortex_core_size);
if (pp.contains("vortex_core_size")) {
pp.get("vortex_core_size", meta.vortex_core_size);
} else {
// Default to 20% of radius
meta.vortex_core_size = 0.1 * meta.diameter;
}
pp.query("root_correction_exponent", meta.root_correction_exponent);
pp.query("root_correction_coefficient", meta.root_correction_coefficient);
pp.query("num_blades", meta.num_blades);
Expand All @@ -33,7 +37,11 @@ void required_parameters(JoukowskyData& meta, const utils::ActParser& pp)
ops::base::required_parameters(meta, pp);
pp.get("num_points_t", meta.num_vel_pts_t);
pp.get("num_points_r", meta.num_vel_pts_r);
pp.getarr("angular_velocity", meta.angular_velocity);
pp.getarr("rpm", meta.angular_velocity);
// Convert from rpm to rad/s
for (int i = 0; i < meta.angular_velocity.size(); ++i) {
meta.angular_velocity[i] = meta.angular_velocity[i] * M_PI / 30.0;
}
}

void parse_and_gather_params(const utils::ActParser& pp, JoukowskyData& data)
Expand Down
2 changes: 1 addition & 1 deletion test/test_files/joukowsky_disk/joukowsky_disk.i
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Actuator.JoukowskyDisk.yaw = 270.0 # degrees (yaw is relative to north which def
Actuator.JoukowskyDisk.sample_yaw = 270.0 # set velocity sampling to be in the normal flow direction
Actuator.JoukowskyDisk.thrust_coeff = 0.0 0.7 1.2
Actuator.JoukowskyDisk.wind_speed = 0.0 10.0 12.0
Actuator.JoukowskyDisk.angular_velocity = 0.0 1.0 1.5
Actuator.JoukowskyDisk.rpm = 0.0 9.549296585513720146133 14.3239448782705802192
Actuator.JoukowskyDisk.epsilon = 20.0
Actuator.JoukowskyDisk.density = 1.225
Actuator.JoukowskyDisk.diameters_to_sample = 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ActJoukowskyTest : public MeshTest
pp.addarr("disk_center", amrex::Vector<amrex::Real>{16.0, 16.0, 16.0});
pp.addarr("disk_normal", amrex::Vector<amrex::Real>{-1.0, 0.0, 0.0});
pp.addarr("thrust_coeff", amrex::Vector<amrex::Real>{1});
pp.addarr("angular_velocity", amrex::Vector<amrex::Real>{0.0});
pp.addarr("rpm", amrex::Vector<amrex::Real>{0.0});
}
};

Expand Down

0 comments on commit 2513bb3

Please sign in to comment.