Difference between revisions of "584 Computational Methods"

From gradcomputer
Jump to: navigation, search
(Alford: added new material)
Line 1: Line 1:
 
'''Tentative Syllabus'''
 
'''Tentative Syllabus'''
  
 
+
== Mark Alford (Jan 25, Feb 1, Feb 8) ==
 
+
== Wim Dickhoff (Jan 30, Feb 6) ==
+
 
+
* Project: diagonalization of quantum mechanical potentials.
+
 
+
The Schroedinger equation of Quantum Mechanics can in some cases be solved analytically for discrete eigenvalues and corresponding wave functions. This is true for potentials with spherical symmetry like the Coulomb or 3-D Harmonic Oscillator. We will extend the solution for discrete eigenvalues for bound states of potentials that do not allow an analytical solution.
+
 
+
 
+
 
+
== Francesc Ferrer (Feb 13, 20) ==
+
 
+
''' Python/Matplotlib '''
+
 
+
*<strong> Requirements:</strong>
+
** Make sure that you bring to class your computer with a working Python environment (including Numpy, Scipy and Matplotlib). Consider for example the [https://docs.continuum.io/anaconda Anaconda] distribution, which is available for free and provides a one-click Python installation for Windows, Linux and Mac.
+
** Our first goal will be to write a script that produces the [http://http://en.wikipedia.org/wiki/File:TentMap_BifurcationDiagram.png bifurcation diagram for the tent-map]. To develop the script, and to get used to the language itself, it will be very useful to run Python interactively. It is highly recommended that you use [http://ipython.org/ Ipython] for this purpose. You can think of Ipython as an equivalent to the Mathematica FrontEnd containing an integrated graphics environment, easily accessible help, and many other useful features. You can launch the shell from the command line ('ipython --pylab' loads the graphics environment automatically), which is faster, or use its web-based notebook environment ('jupyter-notebook').
+
 
+
*<strong> Background: </strong>
+
** Some good resources to get acquainted with the basics of the language are listed in the official [https://www.python.org/ Python] site: [https://wiki.python.org/moin/BeginnersGuide/Programmers Tutorials]. An accessible, yet fairly complete, one can be found [http://www.tutorialspoint.com/python/index.htm here]; if you have a little bit of programming experience, you might want to browse [https://developers.google.com/edu/python/?csw=1 Google's Python class].
+
** [http://matplotlib.org/ Matplotlib] will allow you to plot functions and it provides the source code for an extensive list of [http://matplotlib.org/ examples].
+
 
+
*<strong> Example notebook</strong>
+
 
+
[[File:elephant.ipynb]]
+
 
+
*<strong> Winking elephant notebook</strong>
+
 
+
[[File:winkingelephant.ipynb]]
+
 
+
<!--*<strong> Solution to bifurcation diagram</strong>
+
 
+
[[File:bifurcation.ipynb]]-->
+
 
+
== Mike Ogilvie (Feb 27, Mar 6) ==
+
 
+
'''Monte Carlo, Metropolis and the Ising Model'''
+
 
+
* <strong>Project</strong>
+
Our goal is to learn to use Monte Carlo simulation to understand the behavior of complex systems with many  degrees of freedom. We will study the two-dimensional Ising model, perhaps the most celebrated model in all theoretical physics.
+
 
+
* <strong>Background</strong>
+
Introductory material on the Ising model can be found in most graduate-level statistical mechanics texts, as well as [http://en.wikipedia.org/wiki/Ising_model here: Ising model].
+
 
+
* <strong>Requirements</strong>
+
We will continue with Python. You may use the the iPython environment if you like. Notes and a basic Ising simulation in Python will be sent to you. As written, the Ising simulation requires the use of numpy and matplotlib. If you do not want to use matplotlib for plotting, you can comment out the relevant code. The notes contain a number of problems. You will be expected to do at least three of these, and everyone must do the first project.
+
 
+
== Mark Alford (Mar 20, 27) ==
+
  
 
'''Mathematica for Statistical Mechanics of Fermions'''
 
'''Mathematica for Statistical Mechanics of Fermions'''
Line 69: Line 22:
 
** [http://physics.wustl.edu/alford/pub/nuclear_matter.pdf Slides describing a simple model of nuclear matter]  
 
** [http://physics.wustl.edu/alford/pub/nuclear_matter.pdf Slides describing a simple model of nuclear matter]  
  
== Erik Henriksen (Apr 3, 10) ==
+
== Ryan Ogliore (Feb 15, Feb 22, March 1) ==
  
<i> Note: This section will meet in Crow 302. </i>
+
'''MATLAB''' stands for '''mat'''rix '''lab'''oratory. It is a proprietary, commercial programming language developed by MathWorks. MATLAB is primarily for numerical calculations but can also perform symbolic manipulations. The capabilities of MATLAB can be greatly expanded via toolboxes and packages so that one can build, e.g. graphical-user interfaces in MATLAB. MATLAB is a high-level interpreted language (not compiled), but it can call functions written in C or Fortran. MATLAB is used broadly in science and engineering. MATLAB’s power comes from its ease of use, pre-built set of toolboxes, interactive development environment, and visualization. A feature particular to MATLAB is that arithmetic operations are assumed to be matrix operations unless specified otherwise.
  
<strong>LabVIEW</strong> (Laboratory Virtual Instrument Engineering Workbench) is a graphical programming language that uses drawings instead of lines of text to create applications called virtual instruments (VIs). In contrast to text-based programming languages LabVIEW uses <i>dataflow programming</i>, where the flow of data along wires through nodes in a block diagram determines the execution order of functions, or even multiple hierarchies of sub-VIs. VI front-ends generally imitate physical instruments, but with unlimited options for the front panel knobs, switches, dials, indicator lights, &c.
+
Please install MATLAB on your laptop if you have one, or have easy access to it if you don’t. It works on Linux/Mac/Windows. Please contact Sai Iyer (sai@physics.wustl.edu) about obtaining and installing MATLAB.
  
In LabVIEW, after you build the front panel, you add icons of functions or other VIs to a block diagram using graphical coding known as <i>G code</i> or <i>block diagram code</i>. This block diagram somewhat resembles a flowchart, and together with the front panel comprises a VI.  
+
MATLAB offers a nice introduction to the language in the MATLAB Academy: https://matlabacademy.mathworks.com/
  
VIs are usually interfaced with real-world measurement apparatus to acquire, display, analyze, and save data. VIs connect to real instruments via USB, serial, or GPIB ports and can remotely control a wide range of standard laboratory equipment.  
+
You’ll have to create a login for MathWorks (apologies). But you do not need MATLAB installed on your computer to use the MATLAB Academy.
 +
Please familiarize yourself with MATLAB, before class on April 18, by completing the MATLAB Onramp in the MATLAB Academy. This should take less than two hours to complete.
  
 +
'''Assignments:'''
  
<strong>Assignment:</strong>
+
1. Complete MATLAB Onramp before class on April 18.
  
<strong>Please complete the following two assignments BEFORE class on April 3.</strong>
+
2. We will discuss chaotic dynamics in class on April 18. A project based on what was discussed in class will be due on April 25.  Be prepared to discuss the assignment on April 25, and we will discuss related problems in class and the types of algorithms used to solve them, focusing on MATLAB implementation.
  
<strong>1.</strong> Familiarize yourself with Labview: after launching the program, open "Help/Find Examples," then open "Fundamentals/Waveforms/Waveforms - XY pairs.vi." Run the program and play with it to learn its behavior. Then click "Window/Show Block Diagram" to find the underlying block diagram, e.g. the code, in graphical form. Now: figure out how this code causes the VI to operate.  
+
[[File:Ogliore_Lecture_1.pdf]]
  
Furthermore, please look through "Fundamentals/Loops," "Structures/Feedback Node - Building An Array.vi,"  and "/Loop Tunnel Modes.vi." You may wish to open more examples on your own: there is a wide range of simple VIs illustrating many basic concepts in Labview programming.  
+
[[File:Ogliore_Lecture_2.pdf]]
  
Note that right-clicking in a block diagram allows you to add prewritten functions, structures, basic math, &c.
 
  
  
<strong>2.</strong> Use your new knowledge of Labview to construct a VI that, when run, graphically displays a plot of the sum of a series of sines and/or cosines whose frequencies and amplitudes can be programmed using your choice of front panel controls. Recall from Fourier theory that any periodic function can be built of a sum of (perhaps many) sines and cosines with certain amplitudes and frequencies; your VI should be able to display such a composite square wave or triangle wave built of an arbitrary number of terms added together (you may use a finite number of terms, so that we could see a rough square wave approximation with only, say, 5 sines added together; or a very good approx using 100 terms).
+
== Bhupal Dev (March 8, March 22, March 29) ==
  
<strong>The first class on April 3 will consist of each of you demonstrating your VI to everyone else. Please come with a working VI!</strong>
+
''' Python/Matplotlib '''
  
 +
*<strong> Requirements:</strong>
 +
** Make sure that you bring to class your computer with a working Python environment (including Numpy, Scipy and Matplotlib). Consider for example the [https://docs.continuum.io/anaconda Anaconda] distribution, which is available for free and provides a one-click Python installation for Windows, Linux and Mac.
 +
** Our first goal will be to write a script that produces the [http://http://en.wikipedia.org/wiki/File:TentMap_BifurcationDiagram.png bifurcation diagram for the tent-map]. To develop the script, and to get used to the language itself, it will be very useful to run Python interactively. It is highly recommended that you use [http://ipython.org/ Ipython] for this purpose. You can think of Ipython as an equivalent to the Mathematica FrontEnd containing an integrated graphics environment, easily accessible help, and many other useful features. You can launch the shell from the command line ('ipython --pylab' loads the graphics environment automatically), which is faster, or use its web-based notebook environment ('jupyter-notebook').
  
<strong>3.</strong> The next assignment is to control real-world instruments in a mock "data acquisition" excercise, to be described in class on April 3. You will demonstrate this capability in class April 10.
+
*<strong> Background: </strong>
 +
** Some good resources to get acquainted with the basics of the language are listed in the official [https://www.python.org/ Python] site: [https://wiki.python.org/moin/BeginnersGuide/Programmers Tutorials]. An accessible, yet fairly complete, one can be found [http://www.tutorialspoint.com/python/index.htm here]; if you have a little bit of programming experience, you might want to browse [https://developers.google.com/edu/python/?csw=1 Google's Python class].
 +
** [http://matplotlib.org/ Matplotlib] will allow you to plot functions and it provides the source code for an extensive list of [http://matplotlib.org/ examples].
  
== Ryan Ogliore (Apr 17, 24) ==
+
*<strong> Example notebook</strong>
  
'''MATLAB''' stands for '''mat'''rix '''lab'''oratory. It is a proprietary, commercial programming language developed by MathWorks. MATLAB is primarily for numerical calculations but can also perform symbolic manipulations. The capabilities of MATLAB can be greatly expanded via toolboxes and packages so that one can build, e.g. graphical-user interfaces in MATLAB. MATLAB is a high-level interpreted language (not compiled), but it can call functions written in C or Fortran. MATLAB is used broadly in science and engineering. MATLAB’s power comes from its ease of use, pre-built set of toolboxes, interactive development environment, and visualization. A feature particular to MATLAB is that arithmetic operations are assumed to be matrix operations unless specified otherwise.
+
[[File:elephant.ipynb]]
  
Please install MATLAB on your laptop if you have one, or have easy access to it if you don’t. It works on Linux/Mac/Windows. Please contact Sai Iyer (sai@physics.wustl.edu) about obtaining and installing MATLAB.
+
*<strong> Winking elephant notebook</strong>
  
MATLAB offers a nice introduction to the language in the MATLAB Academy: https://matlabacademy.mathworks.com/
+
[[File:winkingelephant.ipynb]]
  
You’ll have to create a login for MathWorks (apologies). But you do not need MATLAB installed on your computer to use the MATLAB Academy.
+
<!--*<strong> Solution to bifurcation diagram</strong>
Please familiarize yourself with MATLAB, before class on April 18, by completing the MATLAB Onramp in the MATLAB Academy. This should take less than two hours to complete.
+
  
'''Assignments:'''
+
[[File:bifurcation.ipynb]]-->
  
1. Complete MATLAB Onramp before class on April 18.
+
== Mike Ogilvie (April 5, 12, 19) ==
  
2. We will discuss chaotic dynamics in class on April 18. A project based on what was discussed in class will be due on April 25.  Be prepared to discuss the assignment on April 25, and we will discuss related problems in class and the types of algorithms used to solve them, focusing on MATLAB implementation.
+
'''Monte Carlo, Metropolis and the Ising Model'''
  
[[File:Ogliore_Lecture_1.pdf]]
+
* <strong>Project</strong>
 +
Our goal is to learn to use Monte Carlo simulation to understand the behavior of complex systems with many  degrees of freedom. We will study the two-dimensional Ising model, perhaps the most celebrated model in all theoretical physics.  
  
[[File:Ogliore_Lecture_2.pdf]]
+
* <strong>Background</strong>
 +
Introductory material on the Ising model can be found in most graduate-level statistical mechanics texts, as well as [http://en.wikipedia.org/wiki/Ising_model here: Ising model].
 +
 
 +
* <strong>Requirements</strong>
 +
We will continue with Python. You may use the the iPython environment if you like. Notes and a basic Ising simulation in Python will be sent to you. As written, the Ising simulation requires the use of numpy and matplotlib. If you do not want to use matplotlib for plotting, you can comment out the relevant code. The notes contain a number of problems. You will be expected to do at least three of these, and everyone must do the first project.

Revision as of 10:36, 2 January 2018

Tentative Syllabus

Mark Alford (Jan 25, Feb 1, Feb 8)

Mathematica for Statistical Mechanics of Fermions

Requirements: Before starting the class, students should

  • Make sure you have easy access to Mathematica. Preferably it should be installed on your own laptop.
    • Physics graduate students: for a free Mathematica license, write to Sai Iyer giving your WUSTL email address and approximate month and year of graduation.
    • Undergraduates (and non-physics grads): buy it for $25.00 from Software Licensing. Send email to WU_SoftwareLicensing@wumail.wustl.edu giving your first and last name, Washington University email address, and how payment will be made (check or credit/debit card). Once payment has been satisfied you will receive a unique activation code.
  • Reproduce all the examples in my Introduction to Mathematica
  • Study (and preferably reproduce) the examples in my Mathematica Techniques


Project: Students should bring their laptop, with Mathematica installed, to class.

Ryan Ogliore (Feb 15, Feb 22, March 1)

MATLAB stands for matrix laboratory. It is a proprietary, commercial programming language developed by MathWorks. MATLAB is primarily for numerical calculations but can also perform symbolic manipulations. The capabilities of MATLAB can be greatly expanded via toolboxes and packages so that one can build, e.g. graphical-user interfaces in MATLAB. MATLAB is a high-level interpreted language (not compiled), but it can call functions written in C or Fortran. MATLAB is used broadly in science and engineering. MATLAB’s power comes from its ease of use, pre-built set of toolboxes, interactive development environment, and visualization. A feature particular to MATLAB is that arithmetic operations are assumed to be matrix operations unless specified otherwise.

Please install MATLAB on your laptop if you have one, or have easy access to it if you don’t. It works on Linux/Mac/Windows. Please contact Sai Iyer (sai@physics.wustl.edu) about obtaining and installing MATLAB.

MATLAB offers a nice introduction to the language in the MATLAB Academy: https://matlabacademy.mathworks.com/

You’ll have to create a login for MathWorks (apologies). But you do not need MATLAB installed on your computer to use the MATLAB Academy. Please familiarize yourself with MATLAB, before class on April 18, by completing the MATLAB Onramp in the MATLAB Academy. This should take less than two hours to complete.

Assignments:

1. Complete MATLAB Onramp before class on April 18.

2. We will discuss chaotic dynamics in class on April 18. A project based on what was discussed in class will be due on April 25. Be prepared to discuss the assignment on April 25, and we will discuss related problems in class and the types of algorithms used to solve them, focusing on MATLAB implementation.

File:Ogliore Lecture 1.pdf

File:Ogliore Lecture 2.pdf


Bhupal Dev (March 8, March 22, March 29)

Python/Matplotlib

  • Requirements:
    • Make sure that you bring to class your computer with a working Python environment (including Numpy, Scipy and Matplotlib). Consider for example the Anaconda distribution, which is available for free and provides a one-click Python installation for Windows, Linux and Mac.
    • Our first goal will be to write a script that produces the bifurcation diagram for the tent-map. To develop the script, and to get used to the language itself, it will be very useful to run Python interactively. It is highly recommended that you use Ipython for this purpose. You can think of Ipython as an equivalent to the Mathematica FrontEnd containing an integrated graphics environment, easily accessible help, and many other useful features. You can launch the shell from the command line ('ipython --pylab' loads the graphics environment automatically), which is faster, or use its web-based notebook environment ('jupyter-notebook').
  • Background:
    • Some good resources to get acquainted with the basics of the language are listed in the official Python site: Tutorials. An accessible, yet fairly complete, one can be found here; if you have a little bit of programming experience, you might want to browse Google's Python class.
    • Matplotlib will allow you to plot functions and it provides the source code for an extensive list of examples.
  • Example notebook

File:Elephant.ipynb

  • Winking elephant notebook

File:Winkingelephant.ipynb


Mike Ogilvie (April 5, 12, 19)

Monte Carlo, Metropolis and the Ising Model

  • Project

Our goal is to learn to use Monte Carlo simulation to understand the behavior of complex systems with many degrees of freedom. We will study the two-dimensional Ising model, perhaps the most celebrated model in all theoretical physics.

  • Background

Introductory material on the Ising model can be found in most graduate-level statistical mechanics texts, as well as here: Ising model.

  • Requirements

We will continue with Python. You may use the the iPython environment if you like. Notes and a basic Ising simulation in Python will be sent to you. As written, the Ising simulation requires the use of numpy and matplotlib. If you do not want to use matplotlib for plotting, you can comment out the relevant code. The notes contain a number of problems. You will be expected to do at least three of these, and everyone must do the first project.