aerosandbox.dynamics.point_mass =============================== .. py:module:: aerosandbox.dynamics.point_mass Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/aerosandbox/dynamics/point_mass/common_point_mass/index /autoapi/aerosandbox/dynamics/point_mass/point_1D/index /autoapi/aerosandbox/dynamics/point_mass/point_2D/index /autoapi/aerosandbox/dynamics/point_mass/point_3D/index Classes ------- .. autoapisummary:: aerosandbox.dynamics.point_mass.DynamicsPointMass1DHorizontal aerosandbox.dynamics.point_mass.DynamicsPointMass1DVertical aerosandbox.dynamics.point_mass.DynamicsPointMass2DCartesian aerosandbox.dynamics.point_mass.DynamicsPointMass2DSpeedGamma aerosandbox.dynamics.point_mass.DynamicsPointMass3DCartesian aerosandbox.dynamics.point_mass.DynamicsPointMass3DSpeedGammaTrack Package Contents ---------------- .. py:class:: DynamicsPointMass1DHorizontal(mass_props = None, x_e = 0, u_e = 0) Bases: :py:obj:`aerosandbox.dynamics.point_mass.point_3D.cartesian.DynamicsPointMass3DCartesian` Dynamics instance: * simulating a point mass * in 1D, oriented horizontally (i.e., the .add_gravity() method will have no effect) State variables: x_e: x-position, in Earth axes. [meters] u_e: x-velocity, in Earth axes. [m/s] Control variables: Fx_e: Force along the Earth-x axis. [N] .. py:attribute:: mass_props For each state variable, self.state_var = state_var For each indirect control variable, self.indirect_control_var = indirect_control_var For each control variable, self.control_var = 0 .. py:attribute:: x_e :value: 0 .. py:attribute:: y_e :value: 0 .. py:attribute:: z_e :value: 0 .. py:attribute:: u_e :value: 0 .. py:attribute:: v_e :value: 0 .. py:attribute:: w_e :value: 0 .. py:attribute:: alpha :value: 0 .. py:attribute:: beta :value: 0 .. py:attribute:: bank :value: 0 .. py:attribute:: Fx_e :value: 0 .. py:attribute:: Fy_e :value: 0 .. py:attribute:: Fz_e :value: 0 .. py:property:: state :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] 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, >>> ... >>> } .. py:property:: control_variables :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] .. py:method:: state_derivatives() A function that returns the derivatives with respect to time of the state specified in the `state` property. Should return a Dict with the same keys as the `state` property. .. py:class:: DynamicsPointMass1DVertical(mass_props = None, z_e = 0, w_e = 0) Bases: :py:obj:`aerosandbox.dynamics.point_mass.point_3D.cartesian.DynamicsPointMass3DCartesian` Dynamics instance: * simulating a point mass * in 1D, oriented vertically (i.e., the .add_gravity() method will have an effect) State variables: z_e: z-position, in Earth axes. [meters] w_e: z-velocity, in Earth axes. [m/s] Control variables: Fz_e: Force along the Earth-x axis. [N] .. py:attribute:: mass_props For each state variable, self.state_var = state_var For each indirect control variable, self.indirect_control_var = indirect_control_var For each control variable, self.control_var = 0 .. py:attribute:: x_e :value: 0 .. py:attribute:: y_e :value: 0 .. py:attribute:: z_e :value: 0 .. py:attribute:: u_e :value: 0 .. py:attribute:: v_e :value: 0 .. py:attribute:: w_e :value: 0 .. py:attribute:: alpha :value: 0 .. py:attribute:: beta :value: 0 .. py:attribute:: bank :value: 0 .. py:attribute:: Fx_e :value: 0 .. py:attribute:: Fy_e :value: 0 .. py:attribute:: Fz_e :value: 0 .. py:property:: state :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] 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, >>> ... >>> } .. py:property:: control_variables :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] .. py:method:: state_derivatives() A function that returns the derivatives with respect to time of the state specified in the `state` property. Should return a Dict with the same keys as the `state` property. .. py:class:: DynamicsPointMass2DCartesian(mass_props = None, x_e = 0, z_e = 0, u_e = 0, w_e = 0, alpha = 0) Bases: :py:obj:`aerosandbox.dynamics.point_mass.point_3D.cartesian.DynamicsPointMass3DCartesian` Dynamics instance: * simulating a point mass * in 2D * with velocity parameterized in Cartesian coordinates State variables: x_e: x-position, in Earth axes. [meters] z_e: z-position, in Earth axes. [meters] u_e: x-velocity, in Earth axes. [m/s] w_e: z-velocity, in Earth axes. [m/s] Indirect control variables: alpha: Angle of attack. [degrees] Control variables: Fx_e: Force along the Earth-x axis. [N] Fz_e: Force along the Earth-z axis. [N] .. py:attribute:: mass_props For each state variable, self.state_var = state_var For each indirect control variable, self.indirect_control_var = indirect_control_var For each control variable, self.control_var = 0 .. py:attribute:: x_e :value: 0 .. py:attribute:: y_e :value: 0 .. py:attribute:: z_e :value: 0 .. py:attribute:: u_e :value: 0 .. py:attribute:: v_e :value: 0 .. py:attribute:: w_e :value: 0 .. py:attribute:: alpha :value: 0 .. py:attribute:: beta :value: 0 .. py:attribute:: bank :value: 0 .. py:attribute:: Fx_e :value: 0 .. py:attribute:: Fy_e :value: 0 .. py:attribute:: Fz_e :value: 0 .. py:property:: state :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] 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, >>> ... >>> } .. py:property:: control_variables :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] .. py:method:: state_derivatives() A function that returns the derivatives with respect to time of the state specified in the `state` property. Should return a Dict with the same keys as the `state` property. .. py:class:: DynamicsPointMass2DSpeedGamma(mass_props = None, x_e = 0, z_e = 0, speed = 0, gamma = 0, alpha = 0) Bases: :py:obj:`aerosandbox.dynamics.point_mass.point_3D.speed_gamma_track.DynamicsPointMass3DSpeedGammaTrack` Dynamics instance: * simulating a point mass * in 2D * with velocity parameterized in speed-gamma space. State variables: x_e: x-position, in Earth axes. [meters] z_e: z-position, in Earth axes. [meters] speed: Speed; equivalent to u_w, the x-velocity in wind axes. [m/s] gamma: Flight path angle. [rad] Indirect control variables: alpha: Angle of attack. [degrees] Control variables: Fx_w: Force along the wind-x axis. [N] Fz_w: Force along the wind-z axis. [N] .. py:attribute:: mass_props For each state variable, self.state_var = state_var For each indirect control variable, self.indirect_control_var = indirect_control_var For each control variable, self.control_var = 0 .. py:attribute:: x_e :value: 0 .. py:attribute:: y_e :value: 0 .. py:attribute:: z_e :value: 0 .. py:attribute:: speed :value: 0 .. py:attribute:: gamma :value: 0 .. py:attribute:: track :value: 0 .. py:attribute:: bank :value: 0 .. py:attribute:: alpha :value: 0 .. py:attribute:: beta :value: 0 .. py:attribute:: Fx_w :value: 0 .. py:attribute:: Fy_w :value: 0 .. py:attribute:: Fz_w :value: 0 .. py:property:: state :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] 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, >>> ... >>> } .. py:property:: control_variables :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] .. py:method:: state_derivatives() A function that returns the derivatives with respect to time of the state specified in the `state` property. Should return a Dict with the same keys as the `state` property. .. py:class:: DynamicsPointMass3DCartesian(mass_props = None, x_e = 0, y_e = 0, z_e = 0, u_e = 0, v_e = 0, w_e = 0, alpha = 0, beta = 0, bank = 0) Bases: :py:obj:`aerosandbox.dynamics.point_mass.common_point_mass._DynamicsPointMassBaseClass` Dynamics instance: * simulating a point mass * in 3D * with velocity parameterized in Cartesian coordinates State variables: x_e: x-position, in Earth axes. [meters] y_e: y-position, in Earth axes. [meters] z_e: z-position, in Earth axes. [meters] u_e: x-velocity, in Earth axes. [m/s] v_e: v-velocity, in Earth axes. [m/s] w_e: z-velocity, in Earth axes. [m/s] Indirect control variables: alpha: Angle of attack. [degrees] beta: Sideslip angle. [degrees] bank: Bank angle. [radians] Control variables: Fx_e: Force along the Earth-x axis. [N] Fy_e: Force along the Earth-y axis. [N] Fz_e: Force along the Earth-z axis. [N] .. py:attribute:: mass_props For each state variable, self.state_var = state_var For each indirect control variable, self.indirect_control_var = indirect_control_var For each control variable, self.control_var = 0 .. py:attribute:: x_e :value: 0 .. py:attribute:: y_e :value: 0 .. py:attribute:: z_e :value: 0 .. py:attribute:: u_e :value: 0 .. py:attribute:: v_e :value: 0 .. py:attribute:: w_e :value: 0 .. py:attribute:: alpha :value: 0 .. py:attribute:: beta :value: 0 .. py:attribute:: bank :value: 0 .. py:attribute:: Fx_e :value: 0 .. py:attribute:: Fy_e :value: 0 .. py:attribute:: Fz_e :value: 0 .. py:property:: state :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] 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, >>> ... >>> } .. py:property:: control_variables :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] .. py:method:: state_derivatives() A function that returns the derivatives with respect to time of the state specified in the `state` property. Should return a Dict with the same keys as the `state` property. .. py:property:: speed :type: float .. py:property:: gamma Returns the flight path angle, in radians. Positive flight path angle indicates positive vertical speed. .. py:property:: track Returns the track angle, in radians. * Track of 0 == North == aligned with x_e axis * Track of np.pi / 2 == East == aligned with y_e axis .. py:method:: convert_axes(x_from, y_from, z_from, from_axes, to_axes) Converts a vector [x_from, y_from, z_from], as given in the `from_axes` frame, to an equivalent vector [x_to, y_to, z_to], as given in the `to_axes` frame. Identical to OperatingPoint.convert_axes(), but adds in "earth" as a valid axis frame. For more documentation, see the docstring of OperatingPoint.convert_axes(). Both `from_axes` and `to_axes` should be a string, one of: * "geometry" * "body" * "wind" * "stability" * "earth" :param x_from: x-component of the vector, in `from_axes` frame. :param y_from: y-component of the vector, in `from_axes` frame. :param z_from: z-component of the vector, in `from_axes` frame. :param from_axes: The axes to convert from. See above for options. :param to_axes: The axes to convert to. See above for options. Returns: The x-, y-, and z-components of the vector, in `to_axes` frame. Given as a tuple. .. py:method:: add_force(Fx = 0, Fy = 0, Fz = 0, axes='earth') Adds a force (in whichever axis system you choose) to this Dynamics instance. :param Fx: Force in the x-direction in the axis system chosen. [N] :param Fy: Force in the y-direction in the axis system chosen. [N] :param Fz: Force in the z-direction in the axis system chosen. [N] :param axes: The axis system that the specified force is in. One of: * "geometry" * "body" * "wind" * "stability" * "earth" Returns: None (in-place) .. py:class:: DynamicsPointMass3DSpeedGammaTrack(mass_props = None, x_e = 0, y_e = 0, z_e = 0, speed = 0, gamma = 0, track = 0, alpha = 0, beta = 0, bank = 0) Bases: :py:obj:`aerosandbox.dynamics.point_mass.common_point_mass._DynamicsPointMassBaseClass` Dynamics instance: * simulating a point mass * in 3D * with velocity parameterized in speed-gamma-track space State variables: x_e: x-position, in Earth axes. [meters] y_e: y-position, in Earth axes. [meters] z_e: z-position, in Earth axes. [meters] speed: Speed; equivalent to u_w, the x-velocity in wind axes. [m/s] gamma: Flight path angle. [radians] track: Track angle. [radians] * Track of 0 == North == aligned with x_e axis * Track of np.pi / 2 == East == aligned with y_e axis Indirect control variables: alpha: Angle of attack. [degrees] beta: Sideslip angle. [degrees] bank: Bank angle. [radians] Control variables: Fx_w: Force along the wind-x axis. [N] Fy_w: Force along the wind-y axis. [N] Fz_w: Force along the wind-z axis. [N] .. py:attribute:: mass_props For each state variable, self.state_var = state_var For each indirect control variable, self.indirect_control_var = indirect_control_var For each control variable, self.control_var = 0 .. py:attribute:: x_e :value: 0 .. py:attribute:: y_e :value: 0 .. py:attribute:: z_e :value: 0 .. py:attribute:: speed :value: 0 .. py:attribute:: gamma :value: 0 .. py:attribute:: track :value: 0 .. py:attribute:: alpha :value: 0 .. py:attribute:: beta :value: 0 .. py:attribute:: bank :value: 0 .. py:attribute:: Fx_w :value: 0 .. py:attribute:: Fy_w :value: 0 .. py:attribute:: Fz_w :value: 0 .. py:property:: state :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] 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, >>> ... >>> } .. py:property:: control_variables :type: Dict[str, Union[float, aerosandbox.numpy.ndarray]] .. py:method:: state_derivatives() A function that returns the derivatives with respect to time of the state specified in the `state` property. Should return a Dict with the same keys as the `state` property. .. py:property:: u_e .. py:property:: v_e .. py:property:: w_e .. py:method:: convert_axes(x_from, y_from, z_from, from_axes, to_axes) Converts a vector [x_from, y_from, z_from], as given in the `from_axes` frame, to an equivalent vector [x_to, y_to, z_to], as given in the `to_axes` frame. Identical to OperatingPoint.convert_axes(), but adds in "earth" as a valid axis frame. For more documentation, see the docstring of OperatingPoint.convert_axes(). Both `from_axes` and `to_axes` should be a string, one of: * "geometry" * "body" * "wind" * "stability" * "earth" :param x_from: x-component of the vector, in `from_axes` frame. :param y_from: y-component of the vector, in `from_axes` frame. :param z_from: z-component of the vector, in `from_axes` frame. :param from_axes: The axes to convert from. See above for options. :param to_axes: The axes to convert to. See above for options. Returns: The x-, y-, and z-components of the vector, in `to_axes` frame. Given as a tuple. .. py:method:: add_force(Fx = 0, Fy = 0, Fz = 0, axes='wind') Adds a force (in whichever axis system you choose) to this Dynamics instance. :param Fx: Force in the x-direction in the axis system chosen. [N] :param Fy: Force in the y-direction in the axis system chosen. [N] :param Fz: Force in the z-direction in the axis system chosen. [N] :param axes: The axis system that the specified force is in. One of: * "geometry" * "body" * "wind" * "stability" * "earth" Returns: None (in-place)