Class FuelSource
- Namespace
- NominalSystems.Classes
- Assembly
- NominalSystems.Classes.dll
[Nominal] Base class for 'FuelSource' types. This component is a container for fuel and applies energy momentum contributions to the spacecraft. It also calculates the mass flow between components.
public class FuelSource : StateEffector
- Inheritance
-
FuelSource
Constructors
FuelSource()
Construct a empty fuel container
protected FuelSource()
Fields
DryMass
The mass of the tank without fuel.
[Unit(UnitType.KILOGRAM)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(IsAdvanced = true)]
public double DryMass
Field Value
FuelModels
A list of the connected fuel models from the thrusters that have been added.
[Hidden]
public List<ThrusterFuelModel> FuelModels
Field Value
ModelType
The current fuel model type being used for the fuel source
[Unit(UnitType.NONE)]
public FuelSourceModelType ModelType
Field Value
Out_FuelAmountMsg
An output status message for the fuel source
public FuelAmountMessage? Out_FuelAmountMsg
Field Value
Out_FuelConfigMsg
A message definition for the configuration and size of the fuel source
public FuelConfigMessage? Out_FuelConfigMsg
Field Value
Properties
Amount
The current stored fuel.
[Unit(UnitType.KILOGRAM)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "Out_FuelAmountMsg")]
public double Amount { get; set; }
Property Value
Capacity
The maximum storage capacity.
[Unit(UnitType.KILOGRAM)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "Out_FuelAmountMsg")]
public double Capacity { get; set; }
Property Value
FlowRate
The current rate of change of mass.
[Unit(UnitType.KILOGRAM_PER_SECOND)]
[ReadOnly]
[Metadata(ContainedIn = "Out_FuelAmountMsg")]
public double FlowRate { get; }
Property Value
MaximumFlowRate
The maximum flow rate of the fuel source.
[Unit(UnitType.KILOGRAM_PER_SECOND)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "Out_FuelAmountMsg")]
public double MaximumFlowRate { get; set; }
Property Value
TankLength
Length of the tank.
[Unit(UnitType.METRE)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "Out_FuelConfigMsg")]
public double TankLength { get; set; }
Property Value
TankRadius
Initial radius of the cylindrical tank.
[Unit(UnitType.METRE)]
[Range(0, 1.7976931348623157E+308)]
[Metadata(ContainedIn = "Out_FuelConfigMsg")]
public double TankRadius { get; set; }
Property Value
Methods
ComputeDerivatives(double, Vector3, Vector3, Vector3)
Computers the Derivatives of the Body along with the Kinematic Derivatives
public override void ComputeDerivatives(double time, Vector3 rDDot_BN_N, Vector3 omegaDot_BN_B, Vector3 sigma_BN)
Parameters
time
doubleThe current computation time
rDDot_BN_N
Vector3The acceleration in the body frame
omegaDot_BN_B
Vector3The derivative of the attitude rate in the body frame
sigma_BN
Vector3The current attitude in the body frame
LinkStateProperties(StateModel?)
Links and registers any of the states from the state model that is associated with the root object.
public override void LinkStateProperties(StateModel? properties)
Parameters
properties
StateModelThe model that contains the list of states to fetch
OnBegin(double)
Called when the object is beginning ticking for the first time. This is when the simulation calls the very first tick and will run before the update call.
protected override void OnBegin(double time)
Parameters
time
double[s] Current time of the simulation before the tick
OnCreate()
Called when the 'Component' is created from the controller.
protected override void OnCreate()
OnFinish(double)
Called when the object is deleted from the simulation and can handle any cleanup of variables.
protected override void OnFinish(double time)
Parameters
time
double[s] The current clock time when deleted
OnLoad(double)
Called after all of the data has been loaded from a save state on this object. This enables any post-load operations to be performed and extra data to be loaded from the metadata.
protected override void OnLoad(double time)
Parameters
time
double[s] The current clock time of the simulation
OnSave()
Called before the object is saved into the save state. This ensures that any additional metadata can be saved on the object before it is automatically serialized.
protected override void OnSave()
OnUpdate(double, double)
Called when the object should update from the simulation tick. This will take in a time and a step, where the time is the time of the clock before updating the object.
protected override void OnUpdate(double time, double step)
Parameters
time
double[s] Current time of the simulation before the update
step
double[s] The time-step to update during this tick
UpdateBackContributions(double, ref BackSubstitutionMatrices, Vector3, Vector3, Vector3)
Substitutes in the Back Substitution Matrices and performs some calculations.
public override void UpdateBackContributions(double time, ref BackSubstitutionMatrices backSubMatrices, Vector3 sigma_BN, Vector3 omega_BN_B, Vector3 g_N)
Parameters
time
doubleThe current time [s]
backSubMatrices
BackSubstitutionMatricesA reference to the Matrices
sigma_BN
Vector3The current Attitude
omega_BN_B
Vector3The current Attitude rate
g_N
Vector3The spacecraft local gravity vector
UpdateEnergyContributions(double, ref Vector3, ref double, Vector3)
Computes the Energy and Momentum Contributions from the Body
public override void UpdateEnergyContributions(double time, ref Vector3 angMomentum_B, ref double energy, Vector3 omega_BN_B)
Parameters
time
doubleThe current time [s]
angMomentum_B
Vector3A reference to the Angular Momentum Vector
energy
doubleA reference to the Energy Contribution value
omega_BN_B
Vector3The current Attitude Rate of the body
UpdateMassProperties(double, double)
Updates the mass properties of the current physical object at a particular time.
public override void UpdateMassProperties(double time, double step)