# Simple Variable Mass 3DOF (Body Axes)

Implement three-degrees-of-freedom equations of motion of simple variable mass with respect to body axes

## Library

Equations of Motion/3DOF

## Description

The Simple Variable Mass 3DOF (Body Axes) block considers the rotation in the vertical plane of a body-fixed coordinate frame about a flat Earth reference frame.

The equations of motion are

`$\begin{array}{l}{A}_{xb}=\stackrel{˙}{u}=\frac{{F}_{x}}{m}-\frac{\stackrel{˙}{m}Ur{e}_{b}}{m}-qw-g\mathrm{sin}\theta \\ {A}_{be}=\left[\begin{array}{c}{A}_{xe}\\ {A}_{ze}\end{array}\right]=\frac{{F}_{b}-\stackrel{˙}{m}{V}_{re}}{m}-\overline{g}\\ Vr{e}_{b}=\begin{array}{cc}\left[Ure& {Wre\right]}_{b}\end{array}\\ {A}_{zb}=\stackrel{˙}{w}=\frac{{F}_{z}}{m}-\frac{\stackrel{˙}{m}Wr{e}_{b}}{m}+qu+g\mathrm{cos}\theta \\ \stackrel{˙}{q}=\frac{M-{\stackrel{˙}{I}}_{yy}q}{{I}_{yy}}\\ \stackrel{˙}{\theta }=q\\ {\stackrel{˙}{I}}_{yy}=\frac{{I}_{yyfull}-{I}_{yyempty}}{{m}_{full}-{m}_{empty}}\stackrel{˙}{m}\end{array}$`

where the applied forces are assumed to act at the center of gravity of the body. Ureb and Wreb are the relative velocities of the mass flow ($\stackrel{˙}{m}$) being added to or ejected from the body in body-fixed axes.

## Parameters

Units

Specifies the input and output units:

Units

Forces

Moment

Acceleration

Velocity

Position

Mass

Inertia

`Metric (MKS)`

Newton

Newton meter

Meters per second squared

Meters per second

Meters

Kilogram

Kilogram meter squared

`English (Velocity in ft/s)`

Pound

Foot pound

Feet per second squared

Feet per second

Feet

Slug

Slug foot squared

`English (Velocity in kts)`

Pound

Foot pound

Feet per second squared

Knots

Feet

Slug

Slug foot squared

Mass Type

Select the type of mass to use:

 `Fixed` Mass is constant throughout the simulation. `Simple Variable` Mass and inertia vary linearly as a function of mass rate. `Custom Variable` Mass and inertia variations are customizable.

The `Simple Variable` selection conforms to the previously described equations of motion.

Initial velocity

A scalar value for the initial velocity of the body, (V0).

Initial body attitude

A scalar value for the initial pitch attitude of the body, (θ0).

Initial incidence

A scalar value for the initial angle between the velocity vector and the body, $\left({\alpha }_{0}\right)$.

Initial body rotation rate

A scalar value for the initial body rotation rate, (q0).

Initial position (x,z)

A two-element vector containing the initial location of the body in the flat Earth reference frame.

Initial mass

A scalar value for the initial mass of the body.

Inertia

A scalar value for the inertia of the body.

Empty mass

A scalar value for the empty mass of the body.

Full mass

A scalar value for the full mass of the body.

Empty inertia

A scalar value for the empty inertia of the body.

Full inertia

A scalar value for the full inertia of the body.

Gravity source

Specify source of gravity:

 `External` Variable gravity input to block `Internal` Constant gravity specified in Acceleration due to gravity
Acceleration due to gravity

A scalar value for the acceleration due to gravity used if internal gravity source is selected. If gravity is to be neglected in the simulation, this value can be set to 0. This parameter appears if you set Gravity source to `Internal`.

Include mass flow relative velocity

Select this check box to add a mass flow relative velocity port. This is the relative velocity at which the mass is accreted or ablated.

Include inertial acceleration

Select this check box to enable an additional output port for the accelerations in body-fixed axes with respect to the inertial frame. You typically connect this signal to the accelerometer.

## Inputs and Outputs

InputDimension TypeDescription

First

Contains the force acting along the body x-axis, (Fx).

Second

Contains the force acting along the body z-axis, (Fz).

Third

Contains the applied pitch moment, (M).

Fourth

Contains one or more rates of change of mass, $\left(\stackrel{˙}{m}\right)$ (positive if accreted, negative if ablated).

Fifth (Optional)

Contains the gravity in the selected units.

Sixth (Optional)

Two-element vectorContains one or more relative velocities at which the mass is accreted to or ablated from the body in body-fixed axes.
OutputDimension TypeDescription

First

Contains the pitch attitude, in radians (θ).

Second

Contains the pitch angular rate, in radians per second (q).

Third

Contains the pitch angular acceleration, in radians per second squared $\left(\stackrel{˙}{q}\right)$.

Fourth

Two-element vectorContains the location of the body, in the flat Earth reference frame, (Xe, Ze).

Fifth

Two-element vectorContains the velocity of the body resolved into the body-fixed coordinate frame, (u, w).

Sixth

Two-element vectorContains the acceleration of the body resolved into the body-fixed coordinate frame, (Ax,Az).

Seventh

Scalar elementContains a flag for fuel tank status, (Fuel):
• 1 indicates that the tank is full.

• 0 indicates that the integral is neither full nor empty.

• -1 indicates that the tank is empty.

Eighth (Optional)

Two-element vectorContains the accelerations in body-fixed axes with respect to inertial frame (flat Earth). You typically connect this signal to the accelerometer.