Node Struct Reference

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

Represents a node in the finite element model. More...

#include <node.hpp>

Public Member Functions

 Node (size_t node_id)
 Construct a node with an ID.
 
 Node (size_t node_id, std::array< double, 7 > position, std::array< double, 7 > displacement=std::array< double, 7 >{0., 0., 0., 1., 0., 0., 0.}, std::array< double, 6 > velocity=std::array< double, 6 >{0., 0., 0., 0., 0., 0.}, std::array< double, 6 > acceleration=std::array< double, 6 >{0., 0., 0., 0., 0., 0.})
 Construct a node with an ID, position, displacement, velocity, and acceleration vectors.
 
std::array< double, 7 > DisplacedPosition () const
 
NodeTranslate (std::span< const double, 3 > displacement)
 Translate node by a displacement vector.
 
NodeRotateAboutPoint (std::span< const double, 4 > q, std::span< const double, 3 > point)
 Rotate node by a quaternion about the given point.
 
NodeTranslateDisplacement (std::span< const double, 3 > displacement)
 Add translational displacement to node displacement vector.
 
NodeRotateDisplacementAboutPoint (std::span< const double, 4 > q, std::span< const double, 3 > point)
 Rotate node displacement by a quaternion about the given point.
 
void SetVelocityAboutPoint (std::span< const double, 6 > velocity, std::span< const double, 3 > point)
 Set node velocity based on rigid body motion about a reference point.
 
void SetAccelerationAboutPoint (std::span< const double, 6 > acceleration, std::span< const double, 3 > omega, std::span< const double, 3 > point)
 Set node acceleration based on rigid body motion about a reference point.
 

Public Attributes

size_t id
 
std::array< double, 7 > x0
 
std::array< double, 7 > u
 
std::array< double, 6 > v
 
std::array< double, 6 > vd
 
double s
 

Detailed Description

Represents a node in the finite element model.

A node is a point in 3D space that can have position, orientation, displacement, velocity, and acceleration. Nodes are the fundamental building blocks that connect elements in the structural model. Each node has:

  • Unique identifier (id) -> used to reference the node in elements and constraints
  • Initial position and orientation (x0) -> 7 x 1 vector
  • Displacement from initial position (u) -> 7 x 1 vector
  • Velocity (v) -> 6 x 1 vector
  • Acceleration (vd) -> 6 x 1 vector
  • Parametric position within an element (s) -> scalar

The position and displacement vectors contain 7 components: [x, y, z, qw, qx, qy, qz] where the first 3 are translational and the last 4 represent orientation as a quaternion.

The velocity and acceleration vectors contain 6 components: [vx, vy, vz, wx, wy, wz] where the first 3 are translational and the last 3 are rotational components.

Constructor & Destructor Documentation

◆ Node() [1/2]

kynema::Node::Node ( size_t  node_id)
inlineexplicit

Construct a node with an ID.

◆ Node() [2/2]

kynema::Node::Node ( size_t  node_id,
std::array< double, 7 >  position,
std::array< double, 7 >  displacement = std::array<double, 7>{0., 0., 0., 1., 0., 0., 0.},
std::array< double, 6 >  velocity = std::array<double, 6>{0., 0., 0., 0., 0., 0.},
std::array< double, 6 >  acceleration = std::array<double, 6>{0., 0., 0., 0., 0., 0.} 
)
inline

Construct a node with an ID, position, displacement, velocity, and acceleration vectors.

Member Function Documentation

◆ DisplacedPosition()

std::array< double, 7 > kynema::Node::DisplacedPosition ( ) const
inline

◆ RotateAboutPoint()

Node & kynema::Node::RotateAboutPoint ( std::span< const double, 4 >  q,
std::span< const double, 3 >  point 
)
inline

Rotate node by a quaternion about the given point.

◆ RotateDisplacementAboutPoint()

Node & kynema::Node::RotateDisplacementAboutPoint ( std::span< const double, 4 >  q,
std::span< const double, 3 >  point 
)
inline

Rotate node displacement by a quaternion about the given point.

◆ SetAccelerationAboutPoint()

void kynema::Node::SetAccelerationAboutPoint ( std::span< const double, 6 >  acceleration,
std::span< const double, 3 >  omega,
std::span< const double, 3 >  point 
)
inline

Set node acceleration based on rigid body motion about a reference point.

◆ SetVelocityAboutPoint()

void kynema::Node::SetVelocityAboutPoint ( std::span< const double, 6 >  velocity,
std::span< const double, 3 >  point 
)
inline

Set node velocity based on rigid body motion about a reference point.

◆ Translate()

Node & kynema::Node::Translate ( std::span< const double, 3 >  displacement)
inline

Translate node by a displacement vector.

◆ TranslateDisplacement()

Node & kynema::Node::TranslateDisplacement ( std::span< const double, 3 >  displacement)
inline

Add translational displacement to node displacement vector.

Member Data Documentation

◆ id

size_t kynema::Node::id

◆ s

double kynema::Node::s

◆ u

std::array<double, 7> kynema::Node::u

◆ v

std::array<double, 6> kynema::Node::v

◆ vd

std::array<double, 6> kynema::Node::vd

◆ x0

std::array<double, 7> kynema::Node::x0

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