/home/runner/work/kynema/kynema/kynema/src/interfaces/cfd/interface_builder.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/interfaces/cfd/interface_builder.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
interface_builder.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "interface.hpp"
4#include "interface_input.hpp"
5
7
21 InterfaceBuilder& SetGravity(const std::array<double, 3>& gravity);
22
30
37 InterfaceBuilder& SetTimeStep(double time_step);
38
45 InterfaceBuilder& SetDampingFactor(double rho_inf);
46
54
61 InterfaceBuilder& SetFloatingPlatformPosition(const std::array<double, 7>& p);
62
69 InterfaceBuilder& SetFloatingPlatformVelocity(const std::array<double, 6>& v);
70
77 InterfaceBuilder& SetFloatingPlatformAcceleration(const std::array<double, 6>& a);
78
86 const std::array<std::array<double, 6>, 6>& mass_matrix
87 );
88
96
104 InterfaceBuilder& SetMooringLineStiffness(size_t line, double stiffness);
105
113 InterfaceBuilder& SetMooringLineUndeformedLength(size_t line, double length);
114
122 InterfaceBuilder& SetMooringLineFairleadPosition(size_t line, const std::array<double, 3>& p);
123
131 InterfaceBuilder& SetMooringLineAnchorPosition(size_t line, const std::array<double, 3>& p);
132
140 InterfaceBuilder& SetMooringLineAnchorVelocity(size_t line, const std::array<double, 3>& v);
141
149 InterfaceBuilder& SetMooringLineAnchorAcceleration(size_t line, const std::array<double, 3>& a);
150
157 InterfaceBuilder& SetOutputFile(const std::string& path);
158
164 [[nodiscard]] Interface Build() const;
165
166private:
167 InterfaceInput interface_input;
168};
169
170} // namespace kynema::interfaces::cfd
The main interface for controlling the CFD problem.
Definition interface.hpp:22
Definition floating_platform.hpp:9
A factory for configuring and building a CFD interface object.
Definition interface_builder.hpp:14
InterfaceBuilder & SetMooringLineUndeformedLength(size_t line, double length)
Sets the undeformed length of the mooring line.
Definition interface_builder.cpp:72
Interface Build() const
Builds the Interface based on current settings.
Definition interface_builder.cpp:113
InterfaceBuilder & SetFloatingPlatformVelocity(const std::array< double, 6 > &v)
Sets the velocity of the platform.
Definition interface_builder.cpp:42
InterfaceBuilder & SetFloatingPlatformAcceleration(const std::array< double, 6 > &a)
Sets the acceleration of the platform.
Definition interface_builder.cpp:47
InterfaceBuilder & SetOutputFile(const std::string &path)
Sets the output file name.
Definition interface_builder.cpp:108
InterfaceBuilder & SetNumberOfMooringLines(size_t number)
Sets the number of mooring lines and sizes the appropriate data structures.
Definition interface_builder.cpp:59
InterfaceBuilder & SetMooringLineAnchorPosition(size_t line, const std::array< double, 3 > &p)
Sets the position of the anchor node of the mooring line.
Definition interface_builder.cpp:87
InterfaceBuilder & EnableFloatingPlatform(bool enable)
Sets if the floating platform is enabled.
Definition interface_builder.cpp:32
InterfaceBuilder & SetDampingFactor(double rho_inf)
Sets the numerical damping factor used by the generalized alpha solver.
Definition interface_builder.cpp:24
InterfaceBuilder & SetMaximumNonlinearIterations(size_t max_iter)
Sets the maximum number of nonlinear iterations per time step.
Definition interface_builder.cpp:11
InterfaceBuilder & SetMooringLineAnchorVelocity(size_t line, const std::array< double, 3 > &v)
Sets the velocity of the anchor node of the mooring line.
Definition interface_builder.cpp:94
InterfaceBuilder & SetTimeStep(double time_step)
Sets the time step size.
Definition interface_builder.cpp:16
InterfaceBuilder & SetMooringLineFairleadPosition(size_t line, const std::array< double, 3 > &p)
Sets the position of the fairlead node of the mooring line.
Definition interface_builder.cpp:80
InterfaceBuilder & SetMooringLineAnchorAcceleration(size_t line, const std::array< double, 3 > &a)
Sets the acceleration of the anchor node of the mooring line.
Definition interface_builder.cpp:101
InterfaceBuilder & SetFloatingPlatformMassMatrix(const std::array< std::array< double, 6 >, 6 > &mass_matrix)
Sets the mass matrix to represent the platform as a point mass.
Definition interface_builder.cpp:52
InterfaceBuilder & SetGravity(const std::array< double, 3 > &gravity)
Sets the gravity vector for the problem.
Definition interface_builder.cpp:6
InterfaceBuilder & SetMooringLineStiffness(size_t line, double stiffness)
Sets the stiffness of a given mooring line.
Definition interface_builder.cpp:64
InterfaceBuilder & SetFloatingPlatformPosition(const std::array< double, 7 > &p)
Sets the position of the platform.
Definition interface_builder.cpp:37
An object describing the configuration of the interface.
Definition interface_input.hpp:13