Physics A 2016
  • Home
  • Categories
  • Tags
  • Archives
  • Appointment

Programming

TODO

  • use tags to connect to other pages on the same topic
  • Write outline/overview of topic
  • link to relevant standards

Programming and simulation have been important components of real physics for over half a century, with entire subfields of physics devoted to the study of how computation and algorithms give insight into physical processes. My own research employed supercomputer simulations of the physical interactions between protein chains to understand the "clumping" of proteins in the brain that leads to Alheimer's and Parkinson's diseases. Our goal in the programming topic is to learn to use programs to simulate the movement of particles. Doing so will help us better understand how things move, collisions, conservation of momentum, and energy.

When

  • Week 5, Week 6, and more to come

Starting Point

  • Install jupyter, an interactive python programming environment
  • Install vpython, a library of graphics modules for python that are designed for physics
  • Download the starter code
  • Run the starter code.

Assignment 1

  • Make changes to the starter code to change the colors of the cars
  • Figure out how to change the speed of each of the cars
  • Construct a flowchart describing the operation of the program
  • Spell out the correspondence between the position update formula in the program with the kinematic equations

Assignment 2

  • Make changes to the starter code to add constant acceleration to the cars
  • Make the cars move toward each other
  • Make the cars stop when their positions overlap (when they collide)

Assignment 3

  • Make the cars slide together as they would in a perfectly inelastic collision
  • Make the cars bounce off each other as they would in a perfectly elastic collision

Assignment 4

  • Make graphs of the energy, momentum, and velocities of the cars as they collide with each other

Is something unclear? Leave a comment below:

Comments
comments powered by Disqus

  • « HW: Week 2
  • Week 3 »

Published

Sep 17, 2016

Category

topics

Tags

  • coding 1
  • programming 2
  • python 1
  • simulation 1
  • Powered by Pelican. Theme: Elegant by Talha Mansoor