linearSpringMassDamper#

Executive Summary#

This class in an instantiation of the state effector class and implements an effector representing a oscillating particle

The module PDF Description contains further information on this module’s function, how to run it, as well as testing.

Message Connection Descriptions#

This state effector does not have any input or output messsages.

Class LinearSpringMassDamper#

class LinearSpringMassDamper : public StateEffector, public SysModel, public FuelSlosh#

linear spring mass damper state effector class

Public Functions

LinearSpringMassDamper()#

— Contructor

This is the constructor, setting variables to default values

~LinearSpringMassDamper()#

— Destructor

This is the destructor, nothing to report here

void registerStates(DynParamManager &states)#

— Method for SMD to register its states

This is the method for the spring mass damper particle to register its states: rho and rhoDot

void linkInStates(DynParamManager &states)#

— Method for SMD to get access of other states

Method for spring mass damper particle to access the states that it needs. It needs gravity and the hub states

void retrieveMassValue(double integTime)#

This is method is used to pass mass properties information to the fuelTank

void calcForceTorqueOnBody(double integTime, Eigen::Vector3d omega_BN_B)#

— Force and torque on s/c due to linear spring mass damper

void updateEffectorMassProps(double integTime)#

— Method for stateEffector to give mass contributions

This is the method for the SMD to add its contributions to the mass props and mass prop rates of the vehicle

void updateContributions(double integTime, BackSubMatrices &backSubContr, Eigen::Vector3d sigma_BN, Eigen::Vector3d omega_BN_B, Eigen::Vector3d g_N)#

— Back-sub contributions

This method is for the SMD to add its contributions to the back-sub method

void updateEnergyMomContributions(double integTime, Eigen::Vector3d &rotAngMomPntCContr_B, double &rotEnergyContr, Eigen::Vector3d omega_BN_B)#

— Energy and momentum calculations

This method is for the SMD to add its contributions to energy and momentum

void computeDerivatives(double integTime, Eigen::Vector3d rDDot_BN_N, Eigen::Vector3d omegaDot_BN_B, Eigen::Vector3d sigma_BN)#

— Method for each stateEffector to calculate derivatives

This method is used to define the derivatives of the SMD. One is the trivial kinematic derivative and the other is derived using the back-sub method

Public Members

double k#

[N/m] linear spring constant for spring mass damper

double c#

[N-s/m] linear damping term for spring mass damper

double rhoInit#

[m] Initial value for spring mass damper particle offset

double rhoDotInit#

[m/s] Initial value for spring mass damper particle offset derivative

double massInit#

[m] Initial value for spring mass damper particle mass

std::string nameOfRhoState#

[-] Identifier for the rho state data container

std::string nameOfRhoDotState#

[-] Identifier for the rhoDot state data container

std::string nameOfMassState#

[-] Identifier for the mass state data container

Eigen::Vector3d r_PB_B#

[m] position vector from B point to particle equilibrium, P, in body frame

Eigen::Vector3d pHat_B#

[-] particle direction unit vector, in body frame

StateData *massState#

— state data for the particles mass

BSKLogger bskLogger#

— BSK Logging