Class PhysicalApparentMassBody#
Defined in File ApparentMassBody.h
Inheritance Relationships#
Base Type#
public Karana::Dynamics::PhysicalBody(Class PhysicalBody)
Class Documentation#
-
class PhysicalApparentMassBody : public Karana::Dynamics::PhysicalBody#
An apparent mass body is an exentsion of PhysicalBody that includes logic to calculate the effects of apparent mass.
Public Functions
-
PhysicalApparentMassBody(const std::string &name, kc::ks_ptr<Multibody> mb)#
Constructs a PhysicalApparentMassBody.
- Parameters:
name – The name of the PhysicalApparentMassBody.
mb – The Multibody to add this PhysicalApparentMassBody to.
-
inline virtual const std::string &typeString() const noexcept override#
Returns the type string of the SubTree.
- Returns:
The type string.
-
virtual double kineticEnergy() const override#
Return the kinetic energy contribution for the body.
- Returns:
the kinetic energy value
-
virtual km::SpatialVector spatialMomentum() const override#
Return the spatial momentum contribution for the body.
- Returns:
the spatial momentum vector
-
inline void enableApparentMass(bool flag)#
Enable/disable the inclusion of apparent mass effects in the dynamics computations.
- Parameters:
flag – if true, enable apparent mass inclusion
-
inline bool isApparentMassEnabled()#
Determine if the apparent mass is enabled.
- Returns:
A boolean indicating whether the apparent mass is enabled.
-
void setApparentMassData(const km::Mat66 &app_mat)#
Set the apparent mass properties for the body.
Strictly speaking this data is made up of a symmmetric 6x6 matrix (i.e. 21 distinct parameters) though in practice only 3-4 of these parameters are specified. The data provide here are the delta values from the physical spatial inertia values.
- Parameters:
app_mat – the apparent mass data
-
void setWindData(const km::Vec3 &vel, const km::Vec3 &accel)#
Set the wind linear velocity and acceleration values.
The input data is assumed to be in the inertial frame
- Parameters:
vel – the linear wind velocity
accel – the linear wind acceleration
-
void setParachuteSpecialization(bool enable)#
Set the parachute specialization.
If using the parachute specialization, subtract off the \tilde{\lambda} \times A_{\lambda\lambda} \lambda term. For parachutes, the wind-tunnel data often already includes this value, so we don’t want to double-count it here.
- Parameters:
enable – Boolean that indicateds whether the parachute specialization should be enabled or not.
-
km::Mat66 getApparentMassData() const#
Get the apparent mass data.
- Returns:
The apparent mass data.
-
virtual bool isFinalized() const override#
Checks is the params for the object have been initialized.
- Returns:
True if the params have set up.
Public Static Functions
-
static kc::ks_ptr<PhysicalApparentMassBody> create(const std::string &name, kc::ks_ptr<Multibody> mb)#
Creates a new PhysicalApparentMassBody.
- Parameters:
name – The name of the PhysicalApparentMassBody.
mb – The Multibody to add this PhysicalApparentMassBody to.
- Returns:
A ks_ptr to the new PhysicalApparentMassBody.
Protected Functions
-
virtual void _computeGyroscopicForce(km::SpatialVector&) const override#
Data cache callback for updating the body’s gyroscopic spatial force. This gyroscopic term corresponds to rigid body equations of motion where the body frame derivatives are used for generalized accel, i.e. the accel corresonds to pframeDerivRelSpAcell(). The returned spatial force is about the and at the pnode frame.
-
virtual km::Mat66 _getPnodeMassMatrix() const override#
For a rigid body, return the body spatial inertia mass properties transformed rigidly to the pnode as a 6x6 matrix. For a flex body, return the (nU+6) square body level mass matrix transformed to the pnode.
Protected Attributes
-
bool _apparent_mass_enabled = true#
if true turn on apparent mass dynamics, else fall back to rigid body dynamics
-
bool _parachute_specialization = false#
Use parachute specialization.
If using the parachute specialization, subtract off the \tilde{\lambda} \times A_{\lambda\lambda} \lambda term. For parachutes, the wind-tunnel data often already includes this value, so we don’t want to double-count it here.
-
km::Mat66 _apparent_mass_data#
the values to be added to the phyiscal spatial inertia matrix for the body to include in apparent mass effects
-
km::Vec3 _wind_lin_vel = km::Vec3(0, 0, 0)#
the inertial wind linear velocity
-
km::Vec3 _wind_lin_accel = km::Vec3(0, 0, 0)#
the inertial wind linear acceleration
-
PhysicalApparentMassBody(const std::string &name, kc::ks_ptr<Multibody> mb)#