frispy.disc

Module Contents

Classes

Disc

Flying spinning disc object. The disc object contains only physical

Result

A namedtuple subclass that contains the coordinate variables

class frispy.disc.Disc(model: frispy.model.Model = Model(), eom: Optional[frispy.equations_of_motion.EOM] = None, **kwargs)[source]

Flying spinning disc object. The disc object contains only physical parameters of the disc and environment that it exists (e.g. gravitational acceleration and air density). Note that the default area, mass, and inertial moments are for Discraft Ultrastars (175 grams or 0.175 kg).

All masses are kg, lengths are meters (m) and times are seconds (s). That is, these files all use mks units. Angular units use radians (rad), and angular velocities are in rad/s.

Parameters
  • model (Model, optional) –

  • eom (EOM, optional) – the equations of motion

  • kwargs – keyword arguments of a numeric type to specify the initial conditions of the disc. For example x=3 or vz=10..

_default_initial_conditions
compute_trajectory(self, flight_time: float = 3.0, return_scipy_results: bool = False, **kwargs)[source]

Call the differential equation solver to compute the trajectory. The kinematic variables and timesteps are saved as the current_trajectory attribute, which is a dictionary, which is also returned by this function.

See the scipy docs for more information on the solver.

Warning

You cannot pass a flight_time if t_span is a key in solver_args.

Parameters
  • flight_time (float, optional) – time in seconds that the simulation will run over. Default is 3 seconds.

  • return_scipy_results (bool, optional) – Default is False. Flag to indicate whether to return the full results object of the solver. See the scipy docs for more information.

  • kwargs – extra keyword arguments to pass to the scipy.integrate.solver_ivp()

reset_initial_conditions(self) None[source]

Set the initial_conditions of the disc to the default and clear the trajectory.

set_default_initial_conditions(self, **kwargs) None[source]
property environment(self) frispy.environment.Environment
property trajectory_object(self) frispy.trajectory.Trajectory
property coordinate_names(self) List[str]

Names of the kinematic variables

class frispy.disc.Result[source]

Bases: namedtuple('Result', list(Disc._default_initial_conditions.keys())+['times'])

A namedtuple subclass that contains the coordinate variables and a times attribute. One can reference the variables in the result as an attribute result.x.