InterfaceBuilder Struct Reference

Kynema API: kynema::interfaces::cfd::InterfaceBuilder Struct Reference
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
kynema::interfaces::cfd::InterfaceBuilder Struct Reference

A factory for configuring and building a CFD interface object. More...

#include <interface_builder.hpp>

Public Member Functions

InterfaceBuilderSetGravity (const std::array< double, 3 > &gravity)
 Sets the gravity vector for the problem.
 
InterfaceBuilderSetMaximumNonlinearIterations (size_t max_iter)
 Sets the maximum number of nonlinear iterations per time step.
 
InterfaceBuilderSetTimeStep (double time_step)
 Sets the time step size.
 
InterfaceBuilderSetDampingFactor (double rho_inf)
 Sets the numerical damping factor used by the generalized alpha solver.
 
InterfaceBuilderEnableFloatingPlatform (bool enable)
 Sets if the floating platform is enabled.
 
InterfaceBuilderSetFloatingPlatformPosition (const std::array< double, 7 > &p)
 Sets the position of the platform.
 
InterfaceBuilderSetFloatingPlatformVelocity (const std::array< double, 6 > &v)
 Sets the velocity of the platform.
 
InterfaceBuilderSetFloatingPlatformAcceleration (const std::array< double, 6 > &a)
 Sets the acceleration of the platform.
 
InterfaceBuilderSetFloatingPlatformMassMatrix (const std::array< std::array< double, 6 >, 6 > &mass_matrix)
 Sets the mass matrix to represent the platform as a point mass.
 
InterfaceBuilderSetNumberOfMooringLines (size_t number)
 Sets the number of mooring lines and sizes the appropriate data structures.
 
InterfaceBuilderSetMooringLineStiffness (size_t line, double stiffness)
 Sets the stiffness of a given mooring line.
 
InterfaceBuilderSetMooringLineUndeformedLength (size_t line, double length)
 Sets the undeformed length of the mooring line.
 
InterfaceBuilderSetMooringLineFairleadPosition (size_t line, const std::array< double, 3 > &p)
 Sets the position of the fairlead node of the mooring line.
 
InterfaceBuilderSetMooringLineAnchorPosition (size_t line, const std::array< double, 3 > &p)
 Sets the position of the anchor node of the mooring line.
 
InterfaceBuilderSetMooringLineAnchorVelocity (size_t line, const std::array< double, 3 > &v)
 Sets the velocity of the anchor node of the mooring line.
 
InterfaceBuilderSetMooringLineAnchorAcceleration (size_t line, const std::array< double, 3 > &a)
 Sets the acceleration of the anchor node of the mooring line.
 
InterfaceBuilderSetOutputFile (const std::string &path)
 Sets the output file name.
 
Interface Build () const
 Builds the Interface based on current settings.
 

Detailed Description

A factory for configuring and building a CFD interface object.

every method returns a reference to this InterfaceBuilder for chaining multiple method calls together in a single statement.

Member Function Documentation

◆ Build()

Interface kynema::interfaces::cfd::InterfaceBuilder::Build ( ) const

Builds the Interface based on current settings.

Returns
The constructed Interface

◆ EnableFloatingPlatform()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::EnableFloatingPlatform ( bool  enable)

Sets if the floating platform is enabled.

Parameters
enableIf the flating platform is enabled
Returns
A reference to this InterfaceBuilder

◆ SetDampingFactor()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetDampingFactor ( double  rho_inf)

Sets the numerical damping factor used by the generalized alpha solver.

Parameters
rho_infthe numerical damping factor
Returns
A reference to this InterfaceBuilder

◆ SetFloatingPlatformAcceleration()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetFloatingPlatformAcceleration ( const std::array< double, 6 > &  a)

Sets the acceleration of the platform.

Parameters
aThe acceleration/angular acceleration of the platform
Returns
A reference to this InterfaceBuilder

◆ SetFloatingPlatformMassMatrix()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetFloatingPlatformMassMatrix ( const std::array< std::array< double, 6 >, 6 > &  mass_matrix)

Sets the mass matrix to represent the platform as a point mass.

Parameters
mass_matrixThe mass matrix with the mass and inertia information
Returns
A reference to this InterfaceBuilder

◆ SetFloatingPlatformPosition()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetFloatingPlatformPosition ( const std::array< double, 7 > &  p)

Sets the position of the platform.

Parameters
pThe position/orientation of the platform as a quatnernion
Returns
A reference to this InterfaceBuilder

◆ SetFloatingPlatformVelocity()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetFloatingPlatformVelocity ( const std::array< double, 6 > &  v)

Sets the velocity of the platform.

Parameters
vThe velocity/angular velocity of the platform
Returns
A reference to this InterfaceBuilder

◆ SetGravity()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetGravity ( const std::array< double, 3 > &  gravity)

Sets the gravity vector for the problem.

Parameters
gravityThe gravity vector
Returns
A reference to this InterfaceBuilder

◆ SetMaximumNonlinearIterations()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetMaximumNonlinearIterations ( size_t  max_iter)

Sets the maximum number of nonlinear iterations per time step.

Parameters
max_iterthe maximum number of nonlinear iterations
Returns
A reference to this InterfaceBuilder

◆ SetMooringLineAnchorAcceleration()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetMooringLineAnchorAcceleration ( size_t  line,
const std::array< double, 3 > &  a 
)

Sets the acceleration of the anchor node of the mooring line.

Parameters
linethe mooring line number to be set
athe acceleration of the anchor node
Returns
A reference to this InterfaceBuilder

◆ SetMooringLineAnchorPosition()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetMooringLineAnchorPosition ( size_t  line,
const std::array< double, 3 > &  p 
)

Sets the position of the anchor node of the mooring line.

Parameters
linethe mooring line number to be set
pthe position of the anchor node
Returns
A reference to this InterfaceBuilder

◆ SetMooringLineAnchorVelocity()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetMooringLineAnchorVelocity ( size_t  line,
const std::array< double, 3 > &  v 
)

Sets the velocity of the anchor node of the mooring line.

Parameters
linethe mooring line number to be set
vthe velocity of the anchor node
Returns
A reference to this InterfaceBuilder

◆ SetMooringLineFairleadPosition()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetMooringLineFairleadPosition ( size_t  line,
const std::array< double, 3 > &  p 
)

Sets the position of the fairlead node of the mooring line.

Parameters
linethe mooring line number to be set
pthe position of the fairlead node
Returns
A reference to this InterfaceBuilder

◆ SetMooringLineStiffness()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetMooringLineStiffness ( size_t  line,
double  stiffness 
)

Sets the stiffness of a given mooring line.

Parameters
linethe mooring line number to be set
stiffnessthe spring stiffness of the line
Returns
A reference to this InterfaceBuilder

◆ SetMooringLineUndeformedLength()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetMooringLineUndeformedLength ( size_t  line,
double  length 
)

Sets the undeformed length of the mooring line.

Parameters
linethe mooring line number to be set
lengththe underformed length of the line
Returns
A reference to this InterfaceBuilder

◆ SetNumberOfMooringLines()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetNumberOfMooringLines ( size_t  number)

Sets the number of mooring lines and sizes the appropriate data structures.

Parameters
numberthe number of mooring lines
Returns
A reference to this InterfaceBuilder

◆ SetOutputFile()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetOutputFile ( const std::string &  path)

Sets the output file name.

Parameters
paththe output file name
Returns
A reference to this InterfaceBuilder

◆ SetTimeStep()

InterfaceBuilder & kynema::interfaces::cfd::InterfaceBuilder::SetTimeStep ( double  time_step)

Sets the time step size.

Parameters
time_stepthe time step size
Returns
A reference to this InterfaceBuilder

The documentation for this struct was generated from the following files: