Constraint Struct Reference

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

Defines a constraint between two nodes or enforces a boundary condition at a single node. More...

#include <constraint.hpp>

Public Member Functions

 Constraint (size_t id, ConstraintType c_type, const std::array< size_t, 2 > &ids, const std::array< double, 3 > &v={0., 0., 0.}, const std::array< double, 7 > &init_disp={0., 0., 0., 1., 0., 0., 0.}, double *ctrl=nullptr)
 Constructs a constraint with specified parameters.
 

Public Attributes

size_t ID
 Unique identifier for constraint.
 
ConstraintType type
 Type of constraint.
 
std::array< size_t, 2 > node_ids
 Node IDs for: {base_node, target_node}.
 
std::array< double, 3 > axis_vector
 Vector for rotation/control axis.
 
std::array< double, 7 > initial_displacement
 Initial displacement for prescribed BC.
 
double * control
 Pointer to control signal (if any)
 

Detailed Description

Defines a constraint between two nodes or enforces a boundary condition at a single node.

A constraint establishes a relationship between two nodes, restricting their relative motion in specific ways. This can be utilized to model various scenarios such as fixed boundary conditions, prescribed displacements, rigid body motions, lower-pair kinematic joints, and control signals.

Constructor & Destructor Documentation

◆ Constraint()

kynema::constraints::Constraint::Constraint ( size_t  id,
ConstraintType  c_type,
const std::array< size_t, 2 > &  ids,
const std::array< double, 3 > &  v = {0., 0., 0.},
const std::array< double, 7 > &  init_disp = {0., 0., 0., 1., 0., 0., 0.},
double *  ctrl = nullptr 
)
inline

Constructs a constraint with specified parameters.

Parameters
idUnique identifier for the constraint
c_typeType of constraint
idsArray containing {base_node_id, target_node_id}
vGeometric configuration/axis vector (default: {0, 0, 0})
init_dispInitial displacement for prescribed BCs (default: {0, 0, 0, 1, 0, 0, 0})
ctrlPointer to control signal (default: nullptr for static constraints)

Member Data Documentation

◆ axis_vector

std::array<double, 3> kynema::constraints::Constraint::axis_vector

Vector for rotation/control axis.

◆ control

double* kynema::constraints::Constraint::control

Pointer to control signal (if any)

◆ ID

size_t kynema::constraints::Constraint::ID

Unique identifier for constraint.

◆ initial_displacement

std::array<double, 7> kynema::constraints::Constraint::initial_displacement

Initial displacement for prescribed BC.

◆ node_ids

std::array<size_t, 2> kynema::constraints::Constraint::node_ids

Node IDs for: {base_node, target_node}.

◆ type

ConstraintType kynema::constraints::Constraint::type

Type of constraint.


The documentation for this struct was generated from the following file:
  • /home/runner/work/kynema/kynema/kynema/src/constraints/constraint.hpp