aerosandbox.dynamics.rigid_body.rigid_2D
#
Submodules#
Package Contents#
Classes#
Dynamics instance: |
- class aerosandbox.dynamics.rigid_body.rigid_2D.DynamicsRigidBody2DBody(mass_props=None, x_e=0, z_e=0, u_b=0, w_b=0, theta=0, q=0)[source]#
Bases:
aerosandbox.dynamics.rigid_body.rigid_3D.body_euler.DynamicsRigidBody3DBodyEuler
Dynamics instance: * simulating a rigid body * in 2D * with velocity parameterized in body axes
- State variables:
x_e: x-position, in Earth axes. [meters] z_e: z-position, in Earth axes. [meters] u_b: x-velocity, in body axes. [m/s] w_b: z-velocity, in body axes. [m/s] theta: pitch angle. [rad] q: y-angular-velocity, in body axes. [rad/sec]
- Control variables:
Fx_b: Force along the body-x axis. [N] Fz_b: Force along the body-z axis. [N] My_b: Moment about the body-y axis. [Nm]
- Parameters:
mass_props (aerosandbox.weights.mass_properties.MassProperties) –
x_e (Union[float, aerosandbox.numpy.ndarray]) –
z_e (Union[float, aerosandbox.numpy.ndarray]) –
u_b (Union[float, aerosandbox.numpy.ndarray]) –
w_b (Union[float, aerosandbox.numpy.ndarray]) –
theta (Union[float, aerosandbox.numpy.ndarray]) –
q (Union[float, aerosandbox.numpy.ndarray]) –
- property state#
Returns the state variables of this Dynamics instance as a Dict.
Keys are strings that give the name of the variables. Values are the variables themselves.
- This method should look something like:
>>> { >>> "x_e": self.x_e, >>> "u_e": self.u_e, >>> ... >>> }
- property control_variables#
- state_derivatives()[source]#
Computes the state derivatives (i.e. equations of motion) for a body in 3D space.
Based on Section 9.8.2 of Flight Vehicle Aerodynamics by Mark Drela.
- Returns:
- {
“xe” : d_xe, “ye” : d_ye, “ze” : d_ze, “u” : d_u, “v” : d_v, “w” : d_w, “phi” : d_phi, “theta”: d_theta, “psi” : d_psi, “p” : d_p, “q” : d_q, “r” : d_r,
}
- Return type:
Time derivatives of each of the 12 state variables, given in a dictionary