Syllabus

Staff Information

Professor Doug Harper, Instructor

Course Description

In introductory physics courses we are accustomed to making approximations and simplifications in order to be able to solve problems. We often ignore air resistance, assume small amplitude oscillations, pretend there are are only two particles in a system, etc. These kinds of simplifications are necessary and appropriate when trying to understand and apply the basic laws of physics, but the real world is far more complex, as well as more interesting. Fortunately, with a computational approach, we can create a much more realistic models and solve problems that take into consideration real-world complexities.

This course will provide students with an introduction to the solution of physics problems using computers. No previous computer programming experience is assumed. Students will develop their own computer software to solve problems in mechanics, quantum physics, solid state physics, electromagnetism, nonlinear dynamics, and other areas.

WKU Catalog Description

Use of computers to solve physics problems, model physical systems, and analyze data. Topics include simulating realistic motion, data analysis, Fourier transform, solutions to Laplace’s equation, and Monte Carlo methods.

Learning Outcomes

After completion of this course students will be able to:

  1. Find approximate solutions of typical nonlinear equations using various numerical techniques.
  2. Evaluate derivatives to an expected accuracy using finite difference methods.
  3. Perform numerical integration using various algorithms.
  4. Formulate numerical algorithms for the solution of single and multiple variable ordinary linear and non-linear differential equations in physics, such as simple harmonic motion, large angular motion of a pendulum, Van de Pol oscillator etc.
  5. Use modern computer languages, version control, and collaborative tools to solve problems in physics.
  6. Write computer programs to implement the formulated numerical algorithms and output the calculated values of selected physical quantities to suitable data files.
  7. Propose analytic and computational solutions to a physical problem.
  8. Explain a problem and its solution to peers through written and oral communication.
  9. Read, assess, and critique a solution to a computational problem.

Prerequisites

Physics 321 – Introductory Modern Physics II

Textbook and Reference Material

Computational Physics
Mark Newman, Computational Physicsby Mark Newman. Copyright 2012, 978-1-480-14551-1.

Our primary textbook focuses on the basics of the Python programming language and the numerical techniques needed in computational physics to solve problems. A few sample chapters and appendices as well as some example programs to this textbook are available on Newman’s website. This book is available in the WKU Bookstore and online at Createspace.

From the Publisher…

Newman’s textbook on Computational Physics provides a complete introduction to the field, with examples and exercises in the Python programming language. This book explains the fundamentals of computational physics and describes in simple terms the techniques that every physicist should know, such as finite difference methods, numerical quadrature, and the fast Fourier transform. The book offers a complete introduction to the topic at the undergraduate level, and is also suitable for the advanced student or researcher who wants to learn the foundational elements of this important field.

A Whirlwind Tour of Python
Jake VanderPlas, A Whirlwind Tour of Pythonby Jake VanderPlas. Copyright 2016 O’Reilly Media, Inc., 978-1-491-96465-1.

This short 100 page manuscript provides a brief yet comprehensive introduction to Python for engineers, researchers, and data scientists who are already familiar with another programming language. This will serve as a good reference while we are learning the basics of Python. It is particularly well suited for someone who has programming experience in a different language and wishes to have a quick introduction to Python.

Python Data Science Handbook
Jake VanderPlas, Python Data Science Handbookby Jake VanderPlas. Copyright 2016 O’Reilly Media, Inc., 978-1-491-91205-8.

This is a in depth reference to scientific computing in Python. This is recommended whenever you need to take a deeper dive into a particular Python topic than is possible with the previous two texts.

Grading Policies

Your grade for the course will be based on your performance on the programming assignments, examinations, quizzes and final project according to the usual distribution shown in Table 1 below.  The weights (in percent) that will be applied to the different components are shown in Table 2.

Table 1
Average Score Grade
90 – 100 A
80 – 89 B
70 – 79 C
60 – 69 D
< 60 F
Table 2
Component Percent
Programming Assignments 40 %
Exam 1 15 %
Exam 2 15 %
Final Project 30 %
100 %

Programming Assignments

There will be a number of programming assignments that emphasize important numerical methods in computational physics. Collaboration is allowed (in fact encouraged) when solving these assignments, but you must write your own programs and turn in your own work. Direct copying from other students, or other sources such as books or the Internet, is not allowed and can result in a grade of zero for that assignment.

These assignments will be submitted by committing your work to an SVN code repository set up for this course.  See below for additional details on this resource.

Exams

We will have two take-home examinations during the semester that will consist of programming challenges similar to those on the homework assignments. Unlike the assignments, collaboration is not allowed on the exams. All exam problems must be solved without consulting others or copying from any source.

There will be no final exam for this course.  Instead, you will make a presentation of your final project.

Participation

You are responsible in this course not only for learning the material yourself but for actively participating in class discussion and code reviews to contribute to the education of the group as a whole. Regular and punctual attendance is expected of everyone, everyday.

Final Project

Each student will complete a major project that will constitute 30% of the grade for the course.  Specific deadlines will be imposed throughout the semester for completion of various milestones of the project.

Source Code Control

We will use a SVN (Subversion) source code control repository for hosting the code that we write for assignments and projects. Our SVN repository will be located at

svn://physics.wku.edu/phys316/

You will either need to install a SVN client such as TortortiseSVN or SmartSVN to interact with the code repository, or use SVN via the command line interface.

For now, there are two directories in this repository that are of interest:

  • notes – This directory contains python programs and Juypter notebooks that we will use as examples for discussion in class. You should check out this directory to your computer. You can make any changes that you wish to your local working copy of this material but you cannot write (commit) these changes back to the repository on the server since you do not have write privileges to this directory. To see new material that the instructor has posted to this area perform an SVN Update command.
  • dropbox/lastname.firstname/ – This directory will serve as an area for you to turn in assignments that you write for the course. You have read and write access to this area but should only be able to see your directory in the dropbox and not those of other students. To see new assignments or graded results that the instructor has put in this area use an SVN Update command. When you wish to upload your graded material perform an SVN Add (if you have any new files) followed by an SVN Commit.