Module: 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 : public StateEffector, public SysModel, public FuelSlosh
#include <linearSpringMassDamper.h>

linear spring mass damper state effector class

Public Functions

LinearSpringMassDamper()

&#8212; Contructor

This is the constructor, setting variables to default values

~LinearSpringMassDamper()

&#8212; Destructor

This is the destructor, nothing to report here

void registerStates(DynParamManager &states)

&#8212; 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)

&#8212; 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)

&#8212; Force and torque on s/c due to linear spring mass damper

void updateEffectorMassProps(double integTime)

&#8212; 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)

&#8212; 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)

&#8212; 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)

&#8212; 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

&#8212; state data for the particles mass

BSKLogger bskLogger

&#8212; BSK Logging

Private Members

double cRho

&#8212; Term needed for back-sub method

double rho

[m] spring mass damper displacement from equilibrium

double rhoDot

[m/s] time derivative of displacement from equilibrium

double massSMD

[kg] mass of spring mass damper particle

Eigen::Vector3d r_PcB_B

[m] position vector form B to center of mass location of particle

Eigen::Matrix3d rTilde_PcB_B

[m] tilde matrix of r_Pc_B

Eigen::Vector3d rPrime_PcB_B

[m/s] Body time derivative of r_Pc_B

Eigen::Matrix3d rPrimeTilde_PcB_B

[m/s] Tilde matrix of rPrime_PcB_B

Eigen::Vector3d aRho

&#8212; Term needed for back-sub method

Eigen::Vector3d bRho

&#8212; Term needed for back-sub method

Eigen::MatrixXd *g_N

[m/s^2] Gravitational acceleration in N frame components

StateData *rhoState

&#8212; state data for spring mass damper displacement from equilibrium

Eigen::MatrixXd *c_B

[m] Vector from point B to CoM of s/c in B frame components

Eigen::MatrixXd *cPrime_B

[m/s] Body time derivative of vector c_B in B frame components

StateData *rhoDotState

&#8212; state data for time derivative of rho;

Private Static Attributes

static uint64_t effectorID = 1

[] ID number of this panel