PHYS/ENGP - 317/617
Computational Physics and Engineering
Spring 2009
Professor:
Lev Kaplan
Lectures:
Tu & Th 9:30 – 10:45 in Boggs 105
Course website: tulane.blackboard.com [for assignment
schedule, course documents, solutions, grades, web links …]
Textbook:
Landau, Páez, and Bordeianu, A Survey of Computational Physics (website)
Sample codes in C/C++, Java, and Fortran are found on CD included with text
Online References:
Press, Teukolsky, Vetterling, and Flannery, Numerical Recipes in C (or
Fortran): http://www.nrbook.com/a/
Godunov : http://www.physics.odu.edu/~godunov/teaching/notes/index.html
Recommended reference
books:
1) Gould, Tobochnik, and Christian, Introduction to Computer Simulation Methods:
Applications to Physical Systems
2)
Giordano and Nakanishi, Computational Physics
3) Klein and Godunov, Introductory
Computational Physics
4) Garcia, Numerical Methods for
Physics
Office:
5046 Percival Stern Hall
Office
hours: To be arranged during first week of class, or by appointment
Please stop by and say hello – I am
always happy to see you
Email:
lkaplan@tulane.edu [A great way to ask a question or arrange an appointment]
Telephone:
504-862-3176 (x3176) [Leave a message if I’m not there or better yet try email]
Welcome to
Computational Physics and Engineering at Tulane University!
General
Course Objectives and Requirements:
This course will
provide you with experience in using the computer a virtual
physics/engineering laboratory. We will explore many ways in which computer
simulations and data analysis may be used as powerful modern tools that
complement almost all areas of experimental and theoretical research. You will
be introduced to a variety of commonly used methods in scientific computation,
and will practice reading, writing, editing, compiling, debugging, running,
extending, and optimizing computer code, as well as interpreting and presenting
the output through data visualization techniques. The techniques we will study
are of wide applicability in many fields of science and engineering.
This is not a course
on theoretical physics (or mathematics), and thus the theoretical
background will be discussed only in enough detail to motivate each problem
that we will use the computer to solve. Similarly, we will briefly review
mathematical topics such as ordinary or partial differential equations as they
arise in our discussion. Modern Physics I (Phys 235 or equivalent), along with
either Math 221 or Math 224 or equivalent, are prerequisites for this class.
Prior intermediate-level undergraduate coursework in general theoretical
methods, classical mechanics, quantum mechanics, electrostatics, or
thermodynamics (e.g., Phys 301, 363, 374, 423, or 447) will be helpful in
aiding your understanding of the broader picture, but is not a prerequisite for
undergraduates enrolled in the course. For graduate students, a standard
background in undergraduate math and physics will of course be assumed.
Just as this is not a
theoretical physics course, it is also not a comprehensive course on the
theory of computation, algorithms, programming, or software design. We will
discuss the basics of programming (in the C language) and visualization
techniques (using the freely available gnuplot software) in the first few weeks
of the course, but the emphasis will be on science/engineering applications.
Prior acquaintance with programming (in any language) will be very helpful, but
is not strictly required.
Guidelines for Success:
You
should expect to spend at least 6 hours per week outside of class in order to
be successful in this course. This is consistent with general university
guidelines, which recommend at least two hours of outside preparation time for
every hour of lecture. Students with little or no prior programming experience
(or those who love the subject and wish to excel in it) may want to put in more
hours. If you are having difficulties and may need extra help, please let me
know early, and do not fall behind!
Attend class regularly
and arrive on time. If you must miss a class, it is your responsibility to get
good notes from a colleague. Class participation is strongly encouraged.
If you have a question, please do not be afraid to ask it. Students who are
actively engaged in class learn much better than those who listen passively to
the instructor’s explanations.
Start your assignments
early
so that if you get stuck, you can seek help from the instructor or from a
colleague. This is a good idea in any course, but is especially true for a
course in which computer programming is a major component. In the instructor’s
experience, computer code has almost never been known to work correctly the
first time you try to run it. In addition, leave yourselves plenty of time to
analyze the output and produce a well-written report.
Topics Covered:
General computational
topics to be covered may include: basics of programming, running code, and data
visualization; structured programming and program design; high performance
computing and optimization; approximation errors and roundoff errors in
numerical computation; use of scientific libraries, and object-orienting
programming. Techniques may include data fitting and nonlinear least squares;
numerical integration and differentiation; random number generation and Monte
Carlo methods; zero-finding for nonlinear equations; discrete Fourier
transforms; ordinary and partial differential equations; linear algebra; and
multi-dimensional minimization. Sample physics/engineering applications will
range from fitting an experimental nuclear spectrum to radioactive decay, from
bound quantum eigenstates to anharmonic oscillations, and from nonlinear
systems to phase transitions in ferromagnets.
Guest
Lectures:
Occasionally,
guest lecturers, including members of the Tulane faculty, may be invited to
share with our class their particular expertise in some area of computation
that is not adequately covered in the main syllabus. Topics may include, for
example, grid computing or data acquisition. These special lectures will
broaden your understanding of computational physics and engineering and expose
you to new areas of the field from the viewpoint of an active practitioner.
Material covered in the special guest lectures may be included on the final
exam.
317/617
enrollment:
This course is
cross-listed as an undergraduate-level and graduate-level class, with common
lectures. Students taking the course at the 617 level will be required to
complete longer and more challenging homework projects. In addition, I will
have higher expectations for the final presentations/projects submitted by 617
level students (see below).
Grading:
Homework
Projects: 60%
Final
Project and Presentation (last two weeks of class): 20%
Comprehensive
final exam: 20% (Wednesday, May 6,
1-5pm)
Homework
Projects:
60% of your course grade will be based on 7 – 9 regular homework assignments,
to be completed by teams of two students each (individually done
assignments or assignments done by a team of three will be accepted with prior
permission of the instructor). Each assignment will be announced in class and
on the course website at least a week before its due date, and will be related
to in-class lectures. The assignments will be based on sample codes available
on your CD and/or online. Typically, you and your partner will be asked to
modify the sample code using techniques discussed in class, ascertain that your
new code is working correctly, present the output in the form of tables or
graphs, as appropriate, and discuss your conclusions. Rotation of partners
after two or three assignments is required, so that you get the benefit of
collaboration with colleagues who have different working styles and prior
experience. PHYS 617 students are required to complete additional problems
not required of 317 students; any team consisting of at least one PHYS 617
student is required to complete these additional assignments.
The
product of each such assignment will be a report, similar to a lab report. This
report must be written at a level accessible to other students in the class. At
a minimum, the report must include (a) title and basic statement of the
science/engineering problem(s); (b) key equations to be solved and a brief
discussion of the numerical method used to solve the problem; (c) a listing of
your computer code; (d) the input and any important parameters (if applicable
explain why you chose these parameters); (e) the results in graphical or table
format, with appropriate captions and axis or column labels; and (f) a
discussion of your results and conclusions, with error analysis when
applicable. Of course, the detailed structure of the report may vary depending
on the nature of the assignment.
Each report will be
emailed to me by the due date and time (late assignments being accepted only under
extraordinary circumstances, and with likely loss of credit). Each assignment
will be graded for completeness, correctness, and clarity of presentation. The
preferred format is a single word processor (e.g., Microsoft Word) file, HTML
(web) file, Postscript file, or pdf file, with all figures and tables embedded
in the document. However, an email with several attachments is acceptable if
for some reason you prefer to submit the figures as separate Postscript files.
Near the beginning of the semester, I will offer you some hints about the tools
you might use to prepare the reports, and I will try to answer questions if you
run into difficulties.
Final
Project/Presentation:
20% of your
course grade will be based on an individual project of your choice that you
will complete and present to the class during the last two weeks of the
semester. This is your chance to apply and extend what you have learned, and to
educate others as well. You will have a lot of freedom in choosing a project
that interests you, but at a minimum it must (a) address a science or
engineering problem using computational techniques; (b) not be a simple
extension of any homework assignment; (c) include sample code or equivalent
written by you; (d) include sufficient background, with references, to enable
the instructor and your fellow students to understand the significance of the
science or engineering problem and the technique you are using; and (e) include
sample output, with discussion and interpretation. Imagination and creativity
will be rewarded. For ideas, you may consult the reference books listed near
the top of the syllabus, or journal articles (see for example the American
Journal of Physics at scitation.aip.org/ajp/).
If you are involved in a research group, you are encouraged to address a
real-life problem you or your colleagues have encountered in your research. As
in any research project, it is reasonable and expected that your project will
build on previous work done by others (properly referenced), but be sure that
you do not forget your own contribution.
An abstract
of your proposed project (no longer than one page) will be due by the end of
February, indicating the problem, the proposed technique, and what you
personally intend to do. I will return this to you with comments and
suggestions. A 15-20 minute presentation (including time for questions) will be
scheduled during the last two weeks of the semester. You will likely wish to
use presentation software (such as PowerPoint) for this purpose. Finally, an
electronic copy of your project will be due by email on the last day of class.
This electronic report may be similar in structure to your regular homework
project reports, but it must reflect the higher level of independent
accomplishment and the greater depth and substance, that are expected of this
capstone project.
Final
Exam:
The remaining
20% of your total grade will be based on an in-class comprehensive final exam,
to be administered on Wednesday, May 6, 1-5 pm. If you miss the exam without prior
permission (based on serious illness, family emergency, or similar
circumstances), you will receive a grade of zero for the exam. [Make-up
exams given in extraordinary circumstances may not follow the format or the
difficulty level of the original exam. Make-up final exams will be given only
with the approval of the dean.] The exam will emphasize broad conceptual
understanding, and may include material from lectures, homework assignments,
guest lectures, and student presentations. Part of the exam may consist of
short essay questions. You will be allowed to bring one double-sided sheet of
notes to the exam.
Languages
and Graphing:
C is the ‘official’
language for this course, i.e., in-class examples, sample codes on which
homework assignments will be based, and homework solutions will largely be in
C. If you and your partner strongly prefer to use another language, e.g.,
C++, Java, Fortran, or Matlab, you may do so, but you accept greater
responsibility for figuring out where you went wrong when your code does not
work. For your individual project, use whatever language/environment is most
appropriate (e.g., use Fortran if the project is based on Fortran legacy code).
Similarly, the free
multi-platform gnuplot program is the officially supported scientific
graphing software, but you are welcome to use other graphing software (e.g.,
Grace) that you are comfortable with.
Team Study:
Team
study is strongly encouraged, and is a habit that will benefit you in all your
other courses as well. You are especially encouraged to consult with your
colleagues in the class when you get stuck or encounter difficulties with the
coursework, as peer-to-peer learning will enhance your understanding of the
material and make study more enjoyable (in those instances where you are the
one offering assistance and also in those instances where you are seeking out
assistance). Please note that the peer-to-peer learning I recommend is in
addition to, and not a substitute for, the assistance that I personally will be
more than happy to provide whenever you have questions (during class, after
class, during office hours, or by appointment).
Professional
Conduct:
As Tulane students, you
are expected at all times to uphold high ethical and professional standards, as
described in the “Code of Academic
Conduct”. Cheating on the exam or plagiarism on your assignments will not
be tolerated, and may be punished by failure in the exam or assignment, failure
in the course, academic probation, and/or expulsion. You are also expected always
to treat your classmates with respect, and you have the right to be treated
with fairness, respect, and consideration by me. Disruptive and unprofessional behavior, such as talking in class
or packing up your books before class has ended, disrespects everyone else who
is trying to learn, and such behavior will not be accepted.
Tentative
Course Outline:
We will not have time
to cover all interesting topics in computational physics. Some topics may be
added and others omitted or rearranged, at the instructor’s discretion and
depending on student interest and time constraints. Changes to this outline,
along with assignment due dates, will be announced in class and on the course
website.
0.
General Discussion/Getting Started (LPB chapters 1, 2, 3) – we may come back to
these topics throughout the semester
Basics of Numerical Algorithms,
Languages, Procedural and Object-Oriented Programming
Basics of C Programming: C Language, Data Types,
Input/Output, Control Statements,
Functions, Structured Programming, Recursion, Programming
Style
Basics of Editing, Compiling,
Linking, and Running Code
Visualization using Gnuplot and
Other Software
Producing a Lab Report using LaTeX
or Other Tools
Approximation Errors and Roundoff
Errors
Empirical Error Analysis and Error
Reduction
Effective Use of Scientific
Libraries
Code Optimization
Hardware, High-Performance
Computing, Clusters, and Parallel Computing
1.
Numerical Integration and Differentiation (LPB chapters 6, 7)
Integration by Quadrature: Simpson’s
Rule, Gaussian Quadrature
Reducing Error by Romberg Extrapolation
Differentiation: Central Difference,
Extrapolation, Second Derivatives
Example: Newton’s Laws
2.
Data Fitting (LPB chapter 8)
Interpolation: Lagrange Interpolation
and Splines
Example: Resonant Spectrum
Maximum Likelihood and Least Squares
Methods
Example: Heat Flow
Nonlinear Least Squares
3.
Random Variables and Monte Carlo Methods (LPB chapters 5, 6)
Uniform and Nonuniform Randomness
Example: Random Walks
Example: Monte Carlo Integration
Multi-Dimensional Integration
4.
Ordinary Differential Equations (LPB chapters 9, 12)
Euler’s Method, Runge-Kutta
Examples: Driven Nonlinear
Oscillator, Realistic Pendulum, Chaos
5.
Finding Zeros for Nonlinear Equations (LPB chapters 7, 9)
Bisection, Newton-Raphson
Example: Bound Spectrum of Quantum
Well
6.
Fourier Analysis (LPB chapter 10)
Discrete Fourier Transform, Fast Fourier
Transform
Example: Processing Noisy Signals
7.
Partial Differential Equations (LPB chapters 17, 18)
Finite Difference Methods, Polynomial
Expansions, Time Stepping
Example: Electrostatic Potentials
Example: Heat Flow in Metal Bar
8.
Multi-Dimensional Minimization (LPB chapter 15)
Metropolis Algorithm
Example: Thermodynamic Properties of
Ising Chain
About
me:
My present research interests involve waves in complicated
geometries (from ocean waves to electron waves). This field is known as quantum
chaos, and if you want to know more about it, just ask, or take a look at http://www.tulane.edu/~lkaplan.
I was born in Latvia (former USSR), grew up in New Jersey, did my undergraduate
studies at the University of Pennsylvania, and my graduate work at Harvard
University (on particle theory). Prior to coming here, I worked on nuclear
theory at the University of Washington in Seattle. I strongly encourage you to
stop by my office to talk about physics, Tulane, questions, concerns,
suggestions, or anything else that may be on your mind.