Module: fuelTank¶
Executive Summary¶
This class is an instantiation of the stateEffector abstract class and implements an effector representing a fuel tank. This fuel tank has one state associated with it and is the mass of the fuel inside the tank
The module
PDF Description
contains further information on this module’s function,
how to run it, as well as testing.
Message Connection Descriptions¶
The following table lists all the module input and output messages. The module msg variable name is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.
Msg Variable Name |
Msg Type |
Description |
---|---|---|
fuelTankOutMsg |
fuel tank output message name |
Defines
-
FUEL_TANK_H¶
Enums
Variables
-
FuelTankModelConstantVolume_t FuelTankModelConstantVolume¶
fuel tank variable
-
FuelTankModelConstantDensity_t FuelTankModelConstantDensity¶
fuel tank variable
-
FuelTankModelEmptying_t FuelTankModelEmptying¶
fuel tank variable
-
FuelTankModelUniformBurn_t FuelTankModelUniformBurn¶
fuel tank variable
-
FuelTankModelCentrifugalBurn_t FuelTankModelCentrifugalBurn¶
fuel tank variable
-
FuelTankModel *FuelTankModels[TANK_MODEL_LAST_MODEL - TANK_MODEL_FIRST_MODEL]¶
fuel tank variable
-
struct FuelTankModel¶
- #include <fuelTank.h>
fuel tank model structure
Subclassed by FuelTankModelCentrifugalBurn_t, FuelTankModelConstantDensity_t, FuelTankModelConstantVolume_t, FuelTankModelEmptying_t, FuelTankModelUniformBurn_t
Public Functions
-
virtual void computeTankProps(double mFuel) = 0¶
class method
-
virtual void computeTankPropDerivs(double mFuel, double mDotFuel) = 0¶
class method
-
inline FuelTankModel()¶
-
inline virtual ~FuelTankModel()¶
Public Members
-
double propMassInit¶
[kg] Initial propellant mass in tank
-
double maxFuelMass = 1.0¶
[kg] maximum tank mass
-
Eigen::Vector3d r_TcT_TInit¶
[m] Initial position vector from B to tank point in B frame comp.
-
Eigen::Matrix3d ITankPntT_T¶
[kg m^2] Inertia of tank about pnt T in B frame comp.
-
Eigen::Matrix3d IPrimeTankPntT_T¶
[kg m^2/s] Derivative of inertia of tank about pnt T in B frame comp.
-
Eigen::Vector3d r_TcT_T¶
[m] position vector from B to tank point in B frame comp.
-
Eigen::Vector3d rPrime_TcT_T¶
[m/s] Derivative of position vector from B to tank point in B frame comp.
-
Eigen::Vector3d rPPrime_TcT_T¶
[m/s^2] Second derivative of position vector from B to tank point in B frame comp.
-
virtual void computeTankProps(double mFuel) = 0¶
-
struct FuelTankModelConstantVolume_t : public FuelTankModel¶
- #include <fuelTank.h>
fuel tank constant volume structure
Public Functions
-
inline virtual void computeTankProps(double mFuel)¶
class method
-
inline virtual void computeTankPropDerivs(double mFuel, double mDotFuel)¶
class method
Public Members
-
double radiusTankInit¶
[m] Initial radius of the spherical tank
-
inline virtual void computeTankProps(double mFuel)¶
-
struct FuelTankModelConstantDensity_t : public FuelTankModel¶
- #include <fuelTank.h>
fuel tank constant density structure
-
struct FuelTankModelEmptying_t : public FuelTankModel¶
- #include <fuelTank.h>
fuel tank model emptying structure
Public Functions
-
inline virtual void computeTankProps(double mFuel)¶
class method
-
inline virtual void computeTankPropDerivs(double mFuel, double mDotFuel)¶
class method
Public Members
-
double radiusTankInit¶
[m] Initial radius of the spherical tank
-
double rhoFuel¶
[kg/m^3] density of the fuel
-
double thetaStar¶
[rad] angle from vertical to top of fuel
-
double thetaDotStar¶
[rad/s] derivative of angle from vertical to top of fuel
-
double thetaDDotStar¶
[rad/s^2] second derivative of angle from vertical to top of fuel
-
Eigen::Vector3d k3¶
Direction of fuel depletion
-
inline virtual void computeTankProps(double mFuel)¶
-
struct FuelTankModelUniformBurn_t : public FuelTankModel¶
- #include <fuelTank.h>
fuel tank model structure for a uniform burn
-
struct FuelTankModelCentrifugalBurn_t : public FuelTankModel¶
- #include <fuelTank.h>
fuel tank model structure for a centrifugal burn
-
class FuelTank : public StateEffector, public SysModel¶
- #include <fuelTank.h>
fuel tank model class
Public Functions
-
FuelTank()¶
Contructor
This is the constructor, setting variables to default values
-
~FuelTank()¶
Destructor
This is the destructor, nothing to report here
-
void WriteOutputMessages(uint64_t CurrentClock)¶
This method takes the computed fuel tank mass properties and outputs them to the messaging system.
- Parameters
CurrentClock – The current simulation time (used for time stamping)
- Returns
void
-
void UpdateState(uint64_t CurrentSimNanos)¶
This method allows the fuel tank to write out its messages to the messaging system
- Parameters
CurrentSimNanos – The current simulation time in nanoseconds
- Returns
void
-
void setTankModel(FuelTankModelTypes model)¶
set fuel tank model
- Parameters
model – fuel tank model type
- Returns
void
-
void pushFuelSloshParticle(FuelSlosh *particle)¶
Method to attach fuel slosh particle
This is a method to attach a fuel slosh particle to the tank
-
void registerStates(DynParamManager &states)¶
Method to register mass state with state manager
Method for fuel tank to register states. The fuel tank has one state associated with it: mass, and it also has the responsibility to call register states for the fuel slosh particles
-
void linkInStates(DynParamManager &states)¶
Method to give the tank access to other states
Method for fuel tank to access the states that it needs, needs omega
-
void updateEffectorMassProps(double integTime)¶
Method to add contribtution mass props from the tank
This method gives the fuel tank the ability to add its contributions the mass of the vehicle.
-
inline void addThrusterSet(DynamicEffector *NewdynEff)¶
Method to add thruster
-
virtual void updateContributions(double integTime, BackSubMatrices &backSubContr, Eigen::Vector3d sigma_BN, Eigen::Vector3d omega_BN_B, Eigen::Vector3d g_N)¶
Back-sub contributions
This method allows the fuel tank to add its contributions to the matrices for the back-sub method.
-
virtual void updateEnergyMomContributions(double integTime, Eigen::Vector3d &rotAngMomPntCContr_B, double &rotEnergyContr, Eigen::Vector3d omega_BN_B)¶
Energy and momentum calculations
This method allows the fuel tank to contribute to the energy and momentum calculations
-
virtual 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 allows the fuel tank to compute its derivative
Public Members
-
std::string nameOfMassState¶
name of mass state
-
std::vector<DynamicEffector*> dynEffectors¶
Vector of dynamic effectors for thrusters
-
Eigen::Matrix3d dcm_TB¶
DCM from body frame to tank frame
-
Eigen::Vector3d r_TB_B¶
[m] position of tank in B frame
-
bool updateOnly¶
Sets whether to use update only mass depletion
-
Message<FuelTankMsgPayload> fuelTankOutMsg¶
fuel tank output message name
-
FuelTankMsgPayload fuelTankMassPropMsg¶
instance of messaging system message struct
-
BSKLogger bskLogger¶
BSK Logging
-
FuelTank()¶