The Node class defined in C++ is a specialized type of Frame used to apply forces and sense accelerations at fixed locations on bodies. It is fully fixed to its parent and includes specific handles for applying forces and moments.

The Node Class

Description and Naming

The Node class is a templated class with one template argument - T. Node<T> represents a fixed frame with additional functionalities for force and moment applications. It inherits from the Frame class and includes the following key parameters:

  • force - The force applied at the node.

  • force_frame - The frame in which the force is applied.

  • moment - The moment applied at the node.

  • moment_frame - The frame in which the moment is applied.

For a complete guide on interacting with the Node class, refer to the Doxygen documentation: Node Doxygen

Creating a Node

Description C++ Example Python Example

Default Constructor - Creates a node with a specified name

Node<double> node1("Node1");
node1 = NodeD("Node1")

Default Constructor - Creates a node with a specified name and parent

Node<double> node1("Node1", parent_frame_ptr);
node1 = NodeD("Node1", parent_frame)

Applying Forces and Moments

Description C++ Example Python Example

Set Applied Force - Sets the force applied at the node.

CartesianVector<double, 3> force({1.0, 0.0, 0.0});
node1.force(force);
force = CartesianVector3D([1.0, 0.0, 0.0])
node1.force(force)

Set Applied Force Frame - Sets the frame in which the force is applied.

node1.force_frame(&frame1);
node1.force_frame(frame1)

Set Applied Moment - Sets the moment applied at the node.

CartesianVector<double, 3> moment({0.0, 1.0, 0.0});
node1.moment(moment);
moment = CartesianVector3D([1.0, 0.0, 0.0])
node1.moment(moment)

Set Applied Moment Frame - Sets the frame in which the moment is applied.

node1.moment_frame(&frame1);
node1.moment_frame(frame1)