8 #ifdef NALU_USES_OPENFAST 15 #ifndef ActuatorLineFAST_h 16 #define ActuatorLineFAST_h 18 #include <stk_util/parallel/ParallelVectorConcat.hpp> 34 class ActuatorLineFASTInfo {
36 ActuatorLineFASTInfo();
37 ~ActuatorLineFASTInfo();
41 std::string turbineName_;
50 class ActuatorLineFASTPointInfo {
52 ActuatorLineFASTPointInfo(
53 size_t globTurbId,
Point centroidCoords,
double searchRadius, Coordinates epsilon, fast::ActuatorNodeType nType);
54 ~ActuatorLineFASTPointInfo();
56 Point centroidCoords_;
60 stk::mesh::Entity bestElem_;
62 fast::ActuatorNodeType nodeType_;
64 std::vector<double> isoParCoords_;
65 std::vector<stk::mesh::Entity> elementVec_;
139 class ActuatorLineFAST:
public Actuator {
152 void readTurbineData(
int iTurb, fast::fastInputs & fi,
YAML::Node turbNode);
158 void allocateTurbinesToProcs() ;
167 void populate_candidate_procs();
170 void populate_candidate_elements();
173 void create_actuator_line_point_info_map();
176 void determine_elems_to_ghost();
179 void manage_ghosting();
182 void complete_search();
188 void resize_std_vector(
189 const int &sizeOfField,
190 std::vector<double> &theVector,
191 stk::mesh::Entity elem,
192 const stk::mesh::BulkData & bulkData);
196 const int &sizeOfField,
198 const stk::mesh::FieldBase &stkField,
199 stk::mesh::Entity
const* elem_node_rels,
200 const int &nodesPerElement);
202 void gather_field_for_interp(
203 const int &sizeOfField,
205 const stk::mesh::FieldBase &stkField,
206 stk::mesh::Entity
const* elem_node_rels,
207 const int &nodesPerElement);
210 double compute_volume(
212 stk::mesh::Entity elem,
213 const stk::mesh::BulkData & bulkData);
216 void interpolate_field(
217 const int &sizeOfField,
218 stk::mesh::Entity elem,
219 const stk::mesh::BulkData & bulkData,
220 double *isoParCoords,
221 const double *fieldAtNodes,
225 void compute_elem_centroid(
227 double *elemCentroid,
228 const int &nodesPerElement);
231 double compute_distance(
233 const double *elemCentroid,
234 const double *pointCentroid);
238 void compute_elem_force_given_weight(
241 const double *pointForce,
245 double isotropic_Gaussian_projection(
248 const Coordinates &epsilon);
251 void assemble_source_to_nodes(
253 stk::mesh::Entity elem,
254 const stk::mesh::BulkData & bulkData,
255 const double &elemVolume,
256 const std::vector<double> & elemForce,
257 const double &gLocal,
258 stk::mesh::FieldBase & elemCoords,
259 stk::mesh::FieldBase &actuator_source,
260 stk::mesh::FieldBase &g,
261 stk::mesh::FieldBase &dualNodalVolume,
262 const std::vector<double> & hubPt,
263 const std::vector<double> & hubShftDir,
264 std::vector<double> & thr,
265 std::vector<double> & tor);
267 void assemble_source_to_nodes(
269 stk::mesh::Entity elem,
270 const stk::mesh::BulkData & bulkData,
271 const double &elemVolume,
272 const std::vector<double> & elemForce,
273 const double &gLocal,
274 stk::mesh::FieldBase & elemCoords,
275 stk::mesh::FieldBase &actuator_source,
276 stk::mesh::FieldBase &g,
277 stk::mesh::FieldBase &dualNodalVolume,
278 const std::vector<double> & hubPt,
279 const std::vector<double> & hubShftDir);
283 stk::search::SearchMethod searchMethod_;
285 stk::mesh::Ghosting *actuatorLineGhosting_;
286 uint64_t needToGhostCount_;
287 stk::mesh::EntityProcVec elemsToGhost_;
291 std::vector<std::pair<theKey, theKey> > searchKeyPair_;
294 std::vector<boundingSphere> boundingSphereVec_;
295 std::vector<boundingElementBox> boundingElementBoxVec_;
296 std::vector<boundingSphere> boundingHubSphereVec_;
297 std::vector<boundingElementBox> boundingProcBoxVec_;
299 std::vector<std::string> searchTargetNames_;
301 std::vector<ActuatorLineFASTInfo *> actuatorLineInfo_;
303 std::map<size_t, ActuatorLineFASTPointInfo *> actuatorLinePointInfoMap_;
306 std::vector<double> ws_coordinates_;
307 std::vector<double> ws_scv_volume_;
308 std::vector<double> ws_velocity_;
309 std::vector<double> ws_density_;
310 std::vector<double> ws_viscosity_;
315 std::vector<std::vector<double>> thrust;
316 std::vector<std::vector<double>> torque;
Definition: ABLForcingAlgorithm.C:26
void initialize(int N, aligned_vector &x, aligned_vector &y)
Definition: UnitTestSimdBasic.C:37
stk::search::Point< double > Point
Definition: OversetManager.h:32
Tpetra::Map< LocalOrdinal, GlobalOrdinal >::node_type Node
Definition: LinearSolver.h:32