PHYS 340
Computational Physics Lab
Feb 15, 2008
High Level Data and Presentation
As a last step before getting into some of the numerical nuances of computational problems, you
need to be able to manipulate and display numeric information or results in a
PHYS 340
Computational Physics Lab
Feb 01, 2008
Operating Systems, Files, and Data
The Bare-Bones Operating System (Windows) and Files
Find your way to the Command Line Interface, a program that allows you to run windows
programs from a keyboard interface
PHYS 340
Computational Physics Lab
Feb 22, 2008
Functions
Functions in programming, also known as subroutines, are the building blocks of all complex
programs. Any program is best expressed and coded as a collection of a few simple steps, each
of which ar
PHYS 340
Computational Physics Lab
March 01, 2008
Linear Algebra
If you wish, this week 's exercise can be done and submitted before break on your own time,
instead of coming to the last-of-the-week lab period.
Write and test the functions below which con
PHYS 340
Computational Physics Lab
Feb 08, 2008
Program Bookkeeping: User and File Access
The most difficult part of low level programming is getting used to interacting with the operating
system. When a program runs, it needs to communicate with the user
PHYS 340
Computational Physics Lab
Feb 29, 2008
Roots of Functions
For this week's exercise, we will focus our attention on the function who's roots give the
eigenvalues for the 1D quantum square well:
u
f (v, u ) = tan( 1 v u )
2
vu
In this relation v a
PHYS 340
Computational Physics Lab
May 02, 2008
Monte Carlo Simulation
We have previously studied a many particle system by direct integration of the equations of
motion. This week, we will implement a "Monte Carlo" simulation, which generates a solution
PHYS 340
Computational Physics Lab
April 11, 2008
Molecular Dynamics
Our first physical computation will give you a flavor of a "Molecular Dynamics" (MD for short)
simulation. MD simulations study systems of many particles by computationally solving the
e
PHYS 340
Computational Physics Lab
April 04, 2008
Integration
Solving differential equations numerically is generically called integrating. In the simplest case,
x
the solution to y' = f(x) is the definite integral y ( x) = f ( x' )dx' . In more common ca
PHYS 340
Computational Physics Lab
April 18, 2008
Molecular Dynamics - Continued
Finish the Molecular Dynamics simulation exercise of April 11, then, if you have time.
Understanding the Scaling
Staring with Newton's law including all of the physical param
PHYS 340
Computational Physics Lab
April 25, 2008
Eigenvalues
Create a program to find the bound states in the 1D Gaussian well Schrodinger equation, which
in scaled form is
1
x2
= + ve 2 y
y
The scaled energy is , and the depth of the potential well i
PHYS 340
Computational Physics Lab
March 28, 2008
Derivatives
In the first part, you will test the accuracy of numerically derived derivatives of first and second
order. In the second part, you will write an n-dimensional gradient function. Note that in b