Skip to content

Commit

Permalink
Added flag to ensure that mac velocity not sampled for init or restar…
Browse files Browse the repository at this point in the history
…t in Actuator (#889)

Co-authored-by: Michael Kuhn <[email protected]>
  • Loading branch information
tonyinme and mbkuhn authored Jul 27, 2023
1 parent 761b26d commit 9fda161
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion amr-wind/wind_energy/actuator/Actuator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ void Actuator::update_positions()
m_container->update_positions();

// Sample velocities at the new locations
if (m_sample_nmhalf) {
if (m_sample_nmhalf &&
(m_sim.time().current_time() > m_sim.time().start_time())) {
// Avoid using mac velocities if at init or restart
const auto& umac = m_sim.repo().get_field("u_mac");
const auto& vmac = m_sim.repo().get_field("v_mac");
const auto& wmac = m_sim.repo().get_field("w_mac");
Expand Down

0 comments on commit 9fda161

Please sign in to comment.