# Dynamics

## Submodules

### Derivatives and the Golden Rule

$$\frac{ {}^N{d\vec{v}}}{dt} = \frac{ {}^A{d\vec{v}}}{dt} + {}^N{\vec{w}}^{A} \times \vec{v}$$

### Falling Rod Example

This example shows how to implement contact and friction using a penalty method and damping

### Forces and Torques

Introduction Non-Conservative Forces Damping $$\vec{f} = -b\vec{v}$$ Friction Friction is typically formulated as the forces acting between two bodies $A$ and $B$

### Frames, Basis Vectors, and Vectors

Frames When analyzing a system, sometimes it’s convenient or simple to represent a system in a specific way.

### Inertias for common shapes

Rectangular parallelepiped/prism (a box) with length $a$, width $b$, height $c$

### Kane's method

Frames Frame A $${}^{N}{}{\vec{\omega}}^{A}{} = \dot{\theta} \hat{n}_z= \dot{\theta} \hat{a}_z$$

### Rotations

Introduction While there may be many ways to navigate and describe the same three-dimensional space using reference frames, it is also necessary and desireable to be able to change representations; this can be useful for interpreting motion from a differet perspective, for adding forces or torques to a system using dirctional components which are a more natural description, or in order to perform mathematical operations between vectors which are represented by different basis vectors.

### Triple Pendulum Example

%matplotlib inline Try running with this variable set to true and to false and see the difference in the resulting equations of motion

### Unit Scaling

import idealab_tools.units idealab_tools.units.force kilogram*meter/second^2 idealab_tools.units.force.base_units {'kilogram': 1, 'meter': 1, 'second': -2} idealab_tools.

### Variable Types

Variables in pynamics may be grouped into different categories, and used for different things.

## Others

### Drag in Granular Media

import pynamics from pynamics.frame import Frame from pynamics.variable_types import Differentiable,Constant from pynamics.

## External Resources

1. Kane, T. R., & Levinson, D. A. (1985). Dynamics: Theory and Applications, 402. https://doi.org/10.1016/0094-114X(86)90059-5
2. Mitiguy, P. (2009). Advanced Dynamics and Motion Simulation.