/home/runner/work/kynema/kynema/kynema/src/interfaces/blade/blade_interface.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/interfaces/blade/blade_interface.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
blade_interface.hpp
Go to the documentation of this file.
1#pragma once
2
9#include "model/model.hpp"
10
11namespace kynema::interfaces {
12
20public:
21 using DeviceType =
22 Kokkos::Device<Kokkos::DefaultExecutionSpace, Kokkos::DefaultExecutionSpace::memory_space>;
23
30 explicit BladeInterface(
31 const components::SolutionInput& solution_input, const components::BeamInput& blade_input,
32 const components::OutputsConfig& outputs_config
33 );
34
36 [[nodiscard]] components::Beam& Blade();
37
42 [[nodiscard]] bool Step();
43
45 void SaveState();
46
48 void RestoreState();
49
55 void SetRootDisplacement(const std::array<double, 7>& u) const;
56
57private:
58 Model model;
59 components::Beam blade;
60 State<DeviceType> state;
61 Elements<DeviceType> elements;
62 Constraints<DeviceType> constraints;
63 StepParameters parameters;
64 Solver<DeviceType> solver;
65 State<DeviceType> state_save;
66 HostState<DeviceType> host_state;
67 std::unique_ptr<Outputs> outputs;
68};
69
70} // namespace kynema::interfaces
Struct to define the connectivity structure of elements, nodes, and constraints defining an Kynema pr...
Definition model.hpp:74
Interface for blade simulation that manages state, solver, and components.
Definition blade_interface.hpp:19
Kokkos::Device< Kokkos::DefaultExecutionSpace, Kokkos::DefaultExecutionSpace::memory_space > DeviceType
Definition blade_interface.hpp:22
void SetRootDisplacement(const std::array< double, 7 > &u) const
Sets the displacement for the root node.
Definition blade_interface.cpp:101
bool Step()
Steps forward in time.
Definition blade_interface.cpp:57
void SaveState()
Saves the current state for potential restoration (in correction step)
Definition blade_interface.cpp:87
components::Beam & Blade()
Returns a reference to the blade model.
Definition blade_interface.cpp:53
void RestoreState()
Restores the previously saved state (in correction step)
Definition blade_interface.cpp:91
Represents a turbine blade with nodes, elements, and constraints.
Definition beam.hpp:24
Definition blade_interface.cpp:9
Container class for managing multiple constraints in a simulation.
Definition constraints.hpp:29
A container providing handle to all structural elements present in the model.
Definition elements.hpp:20
This object manages the assembly and solution of linear system arising from the generalized-alpha bas...
Definition solver.hpp:21
Container for storing the complete system state of the simulation at a given time increment.
Definition state.hpp:18
A Struct containing the paramters used to control the time stepping process.
Definition step_parameters.hpp:12
Host-side mirror of the simulation state for a given time increment.
Definition host_state.hpp:22
Complete input specification for a beam.
Definition beam_input.hpp:85
A configuration object used to create the Outputs object.
Definition outputs_config.hpp:13
A configuration object used to create the low level StepParameters object.
Definition solution_input.hpp:13