Module: linearSpringMassDamper¶
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.
- 
class LinearSpringMassDamper: public StateEffector, public SysModel, public FuelSlosh¶
- #include <linearSpringMassDamper.h>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 
 - 
BSKLogger bskLogger¶
- BSK Logging 
 Private Members - 
double cRho¶
- 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¶
- Term needed for back-sub method 
 - 
Eigen::Vector3d bRho¶
- Term needed for back-sub method 
 - 
Eigen::MatrixXd *g_N¶
- [m/s^2] Gravitational acceleration in N frame components 
 - 
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 
 
-