Module: fuelTank¶
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.
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
-
void
computeTankProps
(double mFuel) = 0¶ class method
-
void
computeTankPropDerivs
(double mFuel, double mDotFuel) = 0¶ class method
-
FuelTankModel
()¶
-
~FuelTankModel
()¶
Public Members
-
double
propMassInit
¶ [kg] Initial propellant mass in tank
-
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.
-
void
-
struct
FuelTankModelConstantVolume_t
: public FuelTankModel¶ - #include <fuelTank.h>
fuel tank constant volume structure
Public Functions
-
void
computeTankProps
(double mFuel)¶ class method
-
void
computeTankPropDerivs
(double mFuel, double mDotFuel)¶ class method
Public Members
-
double
radiusTankInit
¶ [m] Initial radius of the spherical tank
-
void
-
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
-
void
computeTankProps
(double mFuel)¶ class method
-
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
-
void
-
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
SelfInit
()¶ This method initializes the object. It creates the module’s output messages.
- Return
void
-
void
CrossInit
()¶ This method allows for cross initialization between different modules
- Return
void
-
void
WriteOutputMessages
(uint64_t CurrentClock)¶ This method takes the computed fuel tank mass properties and outputs them to the messaging system.
- Return
void
- Parameters
CurrentClock
: The current simulation time (used for time stamping)
-
void
UpdateState
(uint64_t CurrentSimNanos)¶ This method allows the fuel tank to write out its messages to the messaging system
- Return
void
- Parameters
CurrentSimNanos
: The current simulation time in nanoseconds
-
void
setTankModel
(FuelTankModelTypes model)¶ set fuel tank model
- Return
void
- Parameters
model
: fuel tank model type
-
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.
-
void
addThrusterSet
(DynamicEffector *NewdynEff)¶ Method to add thruster
-
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.
-
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
-
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
-
std::string
FuelTankOutMsgName
¶ fuel tank output message name
-
FuelTankSimMsg
FuelTankMassPropMsg
¶ instance of messaging system message struct
-
BSKLogger
bskLogger
¶ BSK Logging
Private Members
-
double
fuelConsumption
¶ [kg/s] rate of fuel being consumed
-
double
tankFuelConsumption
¶ [kg/s] rate of fuel being consumed from tank
-
FuelTankModel *
fuelTankModel
¶ style of tank to simulate
-
Eigen::Matrix3d
ITankPntT_B
¶
-
Eigen::Vector3d
r_TcB_B
¶
-
int64_t
FuelTankOutMsgId
¶ state output message ID
-