From aa5a6e1bfd32a7920ae8671639137ccee4398ce1 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 16 Dec 2024 09:59:33 -0700 Subject: [PATCH 1/3] documentation update with default --- docs/sphinx/user/inputs_Actuator.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/sphinx/user/inputs_Actuator.rst b/docs/sphinx/user/inputs_Actuator.rst index 9a422cc041..7a87515ec1 100644 --- a/docs/sphinx/user/inputs_Actuator.rst +++ b/docs/sphinx/user/inputs_Actuator.rst @@ -103,12 +103,14 @@ Example for ``FixedWingLine``:: .. input_param:: Actuator.FixedWingLine.fllc_type - **type:** String, optional - - This option tells whether to use the original fllc formulation as outlined in - `Martinez-Tossas and Meneveau (2019) `_ - which assumes a constant chord length across blade (`constant_chord`), or - to use a new formulation which accounts for chord variations (`variable_chord`). + **type:** String, optional, default = ``variable_chord`` + + This option tells whether to use the original fllc formulation outlined in + `Martinez-Tossas and Meneveau (2019) `_, + which assumes a constant chord length across blade (specified as ``constant_chord``), or + to use a new formulation outlined in `Martinez-Tossas et al. (2023) + `_, which accounts for chord + variations (specified as ``variable_chord``). .. input_param:: Actuator.FixedWingLine.fllc_relaxation_factor From 5252b7c9940a57c85625538ccb14d59bfc950d13 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 16 Dec 2024 10:43:23 -0700 Subject: [PATCH 2/3] provide error message before map exception can take place --- amr-wind/wind_energy/actuator/FLLC.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/amr-wind/wind_energy/actuator/FLLC.cpp b/amr-wind/wind_energy/actuator/FLLC.cpp index 01a3577bbb..e24dfa1799 100644 --- a/amr-wind/wind_energy/actuator/FLLC.cpp +++ b/amr-wind/wind_energy/actuator/FLLC.cpp @@ -112,6 +112,12 @@ void fllc_parse(const utils::ActParser& pp, FLLCData& data) pp.query("fllc_start_time", data.fllc_start_time); std::string typeString = "variable_chord"; pp.query("fllc_type", typeString); + const int match = FLLCTypeMap.count(typeString); + if (match == 0) { + amrex::Abort( + "fllc_parse: Invalid fllc_type provided. Available options are " + "constant_chord and variable_chord."); + } data.correction_type = FLLCTypeMap.at(typeString); pp.query("fllc_nonuniform", data.nonuniform); pp.query("fllc_epsilon_dr_ratio", data.eps_dr); From 16a948926c73c118a02de38a0586b3b968574cff Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 16 Dec 2024 11:28:20 -0700 Subject: [PATCH 3/3] use auto --- amr-wind/wind_energy/actuator/FLLC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amr-wind/wind_energy/actuator/FLLC.cpp b/amr-wind/wind_energy/actuator/FLLC.cpp index e24dfa1799..662ab8fec4 100644 --- a/amr-wind/wind_energy/actuator/FLLC.cpp +++ b/amr-wind/wind_energy/actuator/FLLC.cpp @@ -112,7 +112,7 @@ void fllc_parse(const utils::ActParser& pp, FLLCData& data) pp.query("fllc_start_time", data.fllc_start_time); std::string typeString = "variable_chord"; pp.query("fllc_type", typeString); - const int match = FLLCTypeMap.count(typeString); + const auto match = FLLCTypeMap.count(typeString); if (match == 0) { amrex::Abort( "fllc_parse: Invalid fllc_type provided. Available options are "