Solving Projectile Launch with Leap Frog Integration

Has
Jun 17, 2022

--

Leapfrog integration is the process of updating displacements and velocities at staggered points in time so that they “leapfrog” over one another.

Leapfrog integration is a method for numerically integrating differential equations of the type:

d x squared by dt² equals A of x

In order to solve the above equation the following numerical scheme is used:

The leap frog algorithm is show in the figure below where displacements and velocities are calculated at alternate hopping intervals.

Visual representation of Leap Frog method

Python Implementation

Importing necessary modules matplotlib for plotting and numpy for math operations.

Declaring constants such as gravity, drag coefficient, time steps and initial velocity.

Setting up equations of motion and initial conditions for projectile motion

Solving for Each time step using Leap Frog integration

Plotting results from arrays

Plotting projectile motion using python
Plot of Projectile Motion

--

--

No responses yet