Skip to content

rcc02007/CompMech03-IVPs

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Computational Mechanics 03- Initial Value Problems

Learning to frame engineering equations as numerical methods

Welcome to Computational Mechanics Module #3! In this module we will explore some more data analysis, find better ways to solve differential equations, and learn how to solve engineering problems with Python.

01_Catch_Motion

  • Work with images and videos in Python using imageio.
  • Get interactive figures using the %matplotlib notebook command.
  • Capture mouse clicks with Matplotlib's mpl_connect().
  • Observed acceleration of falling bodies is less than $9.8\rm{m/s}^2$.
  • Capture mouse clicks on several video frames using widgets!
  • Projectile motion is like falling under gravity, plus a horizontal velocity.
  • Save our hard work as a numpy .npz file Check the Problems for loading it back into your session
  • Compute numerical derivatives using differences via array slicing.
  • Real data shows free-fall acceleration decreases in magnitude from $9.8\rm{m/s}^2$.

02_Step_Future

  • Integrating an equation of motion numerically.
  • Drawing multiple plots in one figure,
  • Solving initial-value problems numerically
  • Using Euler's method.
  • Euler's method is a first-order method.
  • Freefall with air resistance is a more realistic model.

03_Get_Oscillations

  • vector form of the spring-mass differential equation
  • Euler's method produces unphysical amplitude growth in oscillatory systems
  • the Euler-Cromer method fixes the amplitude growth (while still being first
  • order)
  • Euler-Cromer does show a phase lag after a long simulation
  • a convergence plot confirms the first-order accuracy of Euler's method
  • a convergence plot shows that modified Euler's method, using the derivatives
  • evaluated at the midpoint of the time interval, is a second-order method
  • How to create an implicit integration method
  • The difference between implicit and explicit integration
  • The difference between stable and unstable methods

04_Getting_to_the_root

  • How to find the 0 of a function, aka root-finding
  • The difference between a bracketing and an open methods for finding roots
  • Two bracketing methods: incremental search and bisection methods
  • Two open methods: Newton-Raphson and modified secant methods
  • How to measure relative error
  • How to compare root-finding methods
  • How to frame an engineering problem as a root-finding problem
  • Solve an initial value problem with missing initial conditions (the shooting
  • method)
  • Bonus: In the Problems you'll consider stability of bracketing and open methods.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published