/home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/actuator/Actuator.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/actuator/Actuator.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
Actuator.H
Go to the documentation of this file.
1#ifndef ACTUATOR_H
2#define ACTUATOR_H
3
6
12namespace amr_wind {
13
14class Field;
15
16namespace actuator {
17
18class ActuatorModel;
19class ActuatorContainer;
20
30class Actuator : public Physics::Register<Actuator>
31{
32public:
33 static std::string identifier() { return "Actuator"; }
34
35 explicit Actuator(CFDSim& /*sim*/);
36
37 ~Actuator() override;
38
39 void
40 initialize_fields(int /*level*/, const amrex::Geometry& /*geom*/) override
41 {}
42
43 void pre_init_actions() override;
44
45 void post_init_actions() override;
46
47 void post_regrid_actions() override;
48
49 void pre_advance_work() override;
50
51 void post_advance_work() override;
52
53 ActuatorModel& get_act(int index) const { return *m_actuators.at(index); }
54
55 ActuatorModel& get_act_bylabel(const std::string& actlabel) const;
56
57 template <typename T>
58 T* get_actuator(std::string& key) const;
59
60protected:
62 int num_actuators() const { return static_cast<int>(m_actuators.size()); }
63
64 virtual void prepare_outputs();
65
66private:
67 void setup_container();
68
69 void update_positions();
70
71 void update_velocities();
72
73 void compute_forces();
74
76
78
80
82
83 std::vector<std::unique_ptr<ActuatorModel>> m_actuators;
84
85 std::unique_ptr<ActuatorContainer> m_container;
86};
87
88} // namespace actuator
89} // namespace amr_wind
90
91#endif /* ACTUATOR_H */
Definition CFDSim.H:47
Definition Field.H:116
Definition Actuator.H:31
void setup_container()
Definition Actuator.cpp:198
int num_actuators() const
Total number of actuator components (e.g., turbines) in the flow field.
Definition Actuator.H:62
ActuatorModel & get_act_bylabel(const std::string &actlabel) const
Definition Actuator.cpp:342
virtual void prepare_outputs()
Definition Actuator.cpp:311
static std::string identifier()
Definition Actuator.H:33
void post_regrid_actions() override
Definition Actuator.cpp:120
std::vector< std::unique_ptr< ActuatorModel > > m_actuators
Definition Actuator.H:83
Actuator(CFDSim &)
Definition Actuator.cpp:14
void initialize_fields(int, const amrex::Geometry &) override
Definition Actuator.H:40
ActuatorModel & get_act(int index) const
Definition Actuator.H:53
void compute_forces()
Definition Actuator.cpp:274
Field & m_act_source
Definition Actuator.H:81
void update_velocities()
Definition Actuator.cpp:254
T * get_actuator(std::string &key) const
Definition Actuator.cpp:357
std::unique_ptr< ActuatorContainer > m_container
Definition Actuator.H:85
void update_positions()
Definition Actuator.cpp:231
void post_advance_work() override
Definition Actuator.cpp:330
void pre_advance_work() override
Definition Actuator.cpp:145
void communicate_turbine_io()
Definition Actuator.cpp:157
void compute_source_term()
Definition Actuator.cpp:284
void post_init_actions() override
Definition Actuator.cpp:85
CFDSim & m_sim
Definition Actuator.H:79
void pre_init_actions() override
Definition Actuator.cpp:21
Definition ActuatorModel.H:30
Definition BCInterface.cpp:7