fr.cnes.sirius.patrius.assembly.models
Class MassModel

java.lang.Object
  extended by fr.cnes.sirius.patrius.assembly.models.MassModel
All Implemented Interfaces:
Cloneable, MassProvider

public class MassModel
extends Object
implements MassProvider

This class represents a mass model for an assembly with parts that have mass properties.

Note : when using this model within a propagation, it is necessary to feed the additional equations to the propagator. This has to be done prior to any propagation, to allow this model to account mass variations (i.e. due to maneuvers), using the method org.orekit.propagation.numerical.NumericalPropagator#addMassProviderEquation which will register the additional equation and initialize the initial additional state.

Since:
1.2
Version:
$Id: MassModel.java 16643 2016-09-20 12:12:48Z bignon $
Author:
Thomas Trapier, Rami Houdroge
See Also:
Assembly, MassProperty, ImpulseManeuver, ConstantThrustManeuver
Concurrency :
not thread-safe
Concurrency comment :
uses internal mutable attributes

Field Summary
 
Fields inherited from interface org.orekit.propagation.MassProvider
MASS
 
Constructor Summary
MassModel(Assembly assembly)
          Builds a mass model from an assembly and proceed to a first mass computation.
 
Method Summary
 void addMassDerivative(String partName, double flowRate)
          Add the mass derivate of the given part.
 AdditionalEquations getAdditionalEquation(String name)
          Get the mass equation related to the part.
 List<String> getAllPartsNames()
          Get the list of the name of the parts.
 double getMass(String partName)
          Return the mass of the given part.
 double getTotalMass()
          Return the mass of the spacecraft.
 double getTotalMass(SpacecraftState state)
          Return the mass of the spacecraft following the order.
 void setMassDerivativeZero(String partName)
          Set mass derivative to zero.
 void updateMass(String partName, double newMass)
          Update the mass of the given part.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MassModel

public MassModel(Assembly assembly)
Builds a mass model from an assembly and proceed to a first mass computation.

Parameters:
assembly - the assembly
Method Detail

getTotalMass

public double getTotalMass()
Return the mass of the spacecraft.

Specified by:
getTotalMass in interface MassProvider
Returns:
spacecraft mass

getTotalMass

public double getTotalMass(SpacecraftState state)
Return the mass of the spacecraft following the order.

Specified by:
getTotalMass in interface MassProvider
Parameters:
state - spacecraft state
Returns:
spacecraft mass

getMass

public double getMass(String partName)
Return the mass of the given part.

Specified by:
getMass in interface MassProvider
Parameters:
partName - given part
Returns:
mass of part

updateMass

public void updateMass(String partName,
                       double newMass)
                throws OrekitException
Update the mass of the given part.

Specified by:
updateMass in interface MassProvider
Parameters:
partName - given part
newMass - mass of the given part
Throws:
OrekitException - thrown if the mass becomes negative (OrekitMessages.SPACECRAFT_MASS_BECOMES_NEGATIVE)

addMassDerivative

public void addMassDerivative(String partName,
                              double flowRate)
Add the mass derivate of the given part.

Specified by:
addMassDerivative in interface MassProvider
Parameters:
partName - name of part subject to mass variation
flowRate - flow rate of specified part

setMassDerivativeZero

public void setMassDerivativeZero(String partName)
Set mass derivative to zero.

Specified by:
setMassDerivativeZero in interface MassProvider
Parameters:
partName - name of part whose mass derivative is set to zero

getAdditionalEquation

public AdditionalEquations getAdditionalEquation(String name)
Get the mass equation related to the part.

Specified by:
getAdditionalEquation in interface MassProvider
Parameters:
name - part name
Returns:
the associated mass equation

getAllPartsNames

public List<String> getAllPartsNames()
Get the list of the name of the parts.

Specified by:
getAllPartsNames in interface MassProvider
Returns:
the list of the spacecraft parts name.


Copyright © 2016 CNES. All Rights Reserved.