Skip to content
Lorena A. Barba edited this page May 21, 2025 · 1 revision
Screenshot 2025-05-21 at 6 15 51 PM

"Tour the Dynamics of Change and Motion with Python," or EngComp3 is the third learning module of the Engineering Computations collection.

Since February 2018, until April 2025, the module was complemented by an open online course in a self-hosted instance of the Open edX learning platform. After seven years, this platform is being taken offline. Here, we reproduce the contents of the "About" page of the online course.


Course Description

This is the third module in Engineering Computations (EngComp3), building from a foundation in Python programming to develop modeling and simulation practices, and computational problem-solving. You learn to capture motion from images and videos, to compute velocity and acceleration from position data, to obtain velocity and position from accelerometer data, and to study differential models of mechanical vibrations.

The target audience is second-year science and engineering students, with some background in calculus and ordinary differential equations.

What You'll Learn

  • Capture position data of moving objects from images and video
  • Compute velocity and acceleration from position data, using numerical derivatives (in free-fall and projectile motion)
  • Compute velocity and position from accelerometer data, using time-stepping to solve a differential equation
  • Pose a second-order differential equation as a system in vector form, and compute the solution in state space
  • Visualize direction fields and trajectories in the phase plane

Instructor

Lorena A. Barba Professor of Mechanical and Aerospace Engineering The George Washington University

Course Outline

  • About this course

    • Overview
    • Installing Python or using cloud
    • Copyright notice
  • Catch things in motion

    • Acceleration of a falling ball
    • Projectile motion
    • Numerical derivatives
    • What we've learned
    • Graded HW1
    • Graded HW2
  • Step to the future

    • A roller-coaster ride
    • Euler's method and initial-value problems
    • Numerical solution vs. experiment
    • Air resistance
    • What we've learned
    • Graded HW3
    • Graded HW4
  • Get with the oscillations

    • Spring-mass system
    • Euler-Cromer method
    • Convergence
    • Modified Euler's method
    • What we've learned
    • Graded HW5
  • Bird's-eye view of mechanical vibrations

    • General spring-mass system
    • Case with linear damping
    • Case with sinusoidal driving, and damping
    • Solutions on the phase plane
    • What we've learned

About This Course

This is the third learning module of the “Engineering Computations” series. It develops modeling and simulation practices using as context the study of motion, and introduces the techniques of numerical derivatives and time stepping to solve a differential problem.

This learning module uses the Python programming language, and Jupyter notebooks. All of the learning tools are free and open source, and all the materials are open and free.

The module consists of four lessons:

  1. Catch things in motion
  2. Step to the future
  3. Get with the oscillations
  4. Bird's-eye view of mechanical vibrations

Requirements

This module assumes a foundation in Python programming, as provided by completing our first module, "Get Data Off the Ground with Python." It also assumes some background in calculus and ordinary differential equations.

Lessons

Follow the links below to see each lesson rendered by the nbviewer service as a static webpage.

You can also launch an interactive session with the course's Jupyter notebooks using the free Binder service. Try it!

Launch in Binder

After Binder launches, you should see a Jupyter dashboard (file navigator). Select the folder notebooks_en to access the four lessons of this course as fully executable Jupyter notebooks.

Please note that Binder is a free service from Project Jupyter. Depending on demand, it can be a bit slow. But it's free!

Lesson 1: Catch things in motion

Working with images and videos in Python using imageio. Interactive Matplotlib figures in the notebook, and capturing mouse clicks on images for digitizing an object's position. Computing velocity and acceleration from position captures: a falling ball, and projectile motion. Computing numerical derivatives using differences. Free-fall acceleration from real data.

Lesson 2: Step to the future

Computing velocity and position from accelerometer data: a roller-coaster ride. Using the subplot() function go draw more than one plot in the same figure. Euler's method for initial-value problems, and Taylor expansion showing first-order accuracy. The second-order differential model for an object in free fall written as two first-order differential equations, leading to a vector form. General design of a code to solve ordinary differential equations (ODEs). Application to free fall of a tennis ball and comparison with experimental data. Improved model accounting for air resistance.

Lesson 3: Get with the oscillations

Differential model of a spring-mass system without friction: state vector and system in vector form. Amplitude growth with Euler's method on oscillatory systems, and the fix: Euler-Cromer method (semi-implicit Euler). Numerically observed order of accuracy using a convergence plot: numerical error with different time increments, ∆t. Modified Euler's method, and observed order of accuracy.

Lesson 4: Bird's-eye view of mechanical vibrations

General spring-mass systems with damping and a driving force, revealing a variety of behaviors. Presents a powerful new method to study dynamical systems based on visualizing direction fields and trajectories in the phase plane.

Frequently Asked Questions

Why are you using Python?

Python is free. Python is a complete programming solution, with excellent interactive options and visualization tools. Python is a good learning language: it has easy syntax, it is interpreted and it has dynamic typing. Python has a large community: people post and answer each other's questions about Python all the time. For numerical computing, Python libraries can do everything you need to do. Python is exploding in popularity and is used for teaching programming at the top schools. Python is used in industry; it can help you get a job.

I'm having problems viewing the course. Could it be my browser?

The Open edX platform works best with current versions of Chrome, Firefox or Safari, or with Internet Explorer version 9 and above. See the list of supported browsers for the most up-to-date information.

What software do I need for this course?

At first, you can work on this course without any new software: just your browser. We will guide you to use free online resources for interactive computing with Python and Jupyter. For example, you can follow along with our lessons using the free website jupyter.org/try. Bear in mind that it doesn't give you permanent storage: if you create a Jupyter document on this service, be sure to download it before leaving the website.

What is Jupyter?

Jupyter is a set of open-source tools for interactive computing. At the center of the Jupyter world is the Notebook: a document that combines text and multi-media content with executable code. It is a powerful platform to learn computing because it lets you chunk a program into small, digestible portions, and intermix these with narration and explanation. It is also becoming the staple environment to develop ideas and present finished analyses in data science and engineering.

What does it mean that the course materials are open?

It means that the authors of all the materials used in this course give everyone in the world a license to use the material in any way, to redistribute, modify and essentially do whatever they like with it. The only condition is that we are given attribution. Content is under a Creative Commons CC-BY 4.0 International license and code is under a BSD 3-clause license.

Is there a required textbook for this course?

There is no required textbook. We have written up original materials and share them with everyone completely free. You can even download a PDF version for printing. You can cite the typeset document as:

  • Barba, Lorena A.; Clementi, Natalia C. (2017): Engineering Computations Module 3 figshare. doi:10.6084/m9.figshare.5673526

I'm an instructor at another institution. Can I adopt these materials for my course?

Feel free! We're happy if you use the materials in any way. All we ask is that you attribute the materials to us.