# Difference between revisions of "Physics 212, 2020: Computational Modeling For Scientists And Engineers"

(→Module 4: Stochastic simulations) |
(→Module 4: Stochastic simulations) |
||

Line 120: | Line 120: | ||

:[https://emory.zoom.us/rec/share/zvBMMpf0xmdLSaPN1hHeZIkNIab4X6a8gHRI_qIMzU6raVt5mf0iJXt5h7bj03Q8 Emma's 04/10 Office Hour] | :[https://emory.zoom.us/rec/share/zvBMMpf0xmdLSaPN1hHeZIkNIab4X6a8gHRI_qIMzU6raVt5mf0iJXt5h7bj03Q8 Emma's 04/10 Office Hour] | ||

:[https://emory.zoom.us/rec/share/ztBrCpf5zn9Ifa_G7GHmc6ksEN7rT6a8gyEX_PpenxunVah-AI7SwgQopBFOORp- Emma's 04/10 Lab] | :[https://emory.zoom.us/rec/share/ztBrCpf5zn9Ifa_G7GHmc6ksEN7rT6a8gyEX_PpenxunVah-AI7SwgQopBFOORp- Emma's 04/10 Lab] | ||

+ | :[https://emory.zoom.us/rec/share/x_coMuDa23NLHbfp6nzUQpwMWaLfaaa81ygZ-fAEykggk_fuFN_maOkj71bKUuHS?startTime=1586786214000 Class 04/13] | ||

:If office hours are not posted, it means that nobody showed up, and there was no recording. | :If office hours are not posted, it means that nobody showed up, and there was no recording. | ||

## Revision as of 19:04, 14 April 2020

Back to the main Teaching page.

Back to Physics 212, 2020: Computational Modeling.

## News

- Welcome to the class!
- New sections are being added to the syllabus to account for the virtual learning we are switching to due to COVID-19.
- Class will meet virtually at the usual time at the following Zoom link https://emory.zoom.us/j/117775655
- Office hours will meet virtually at the usual time at the following Zoom link https://emory.zoom.us/j/354960837

## About the class

Computation is one of the pillars of modern science, in addition to experiment and theory. In this course, various computational modeling methods will be introduced to study specific examples derived from physical, biological, chemical, and social systems. We will study how one makes a model, implements it in computer code, and learns from it. We will focus on modeling deterministic dynamics, dynamics with randomness, on comparison of mathematical models to data, and, at the end, on high performance computing. Students will learn Python programming language and will work on computational modeling projects in groups.

There are three goals that I have for students in the class:

- To learn to translate a descriptive formulation of a scientific problem into a mathematical / computational model.
- To learn how to solve such models using computers, and specifically using the Python programming language. This includes learning how to verify that the solution you produced is a correct solution.
- To learn basic algorithms used in computational science.

In addition, a minor goal of the class is to improve the students' ability to communicate their process of thinking and their results to others. To this extent, the class will require writing project reports, which will be graded on their clarity and completeness.

## Logistics

- Class Hours: M, W 10:00-11:15; MSC N 304
- Labs: Thu or Fri 2:30-5:30; MSC N303
- Office Hours

- Professor: Ilya Nemenman -- Monday and Thursday 12:00-1:00 (subject to change), and by appointment, MSC N240 or N117A if too many people.
- TA: Qihan Liu (Thursday lab), Office hour Monday 1:00-2:00 , MSC N117E
- TA: Emma Dawson (Friday lab), Office hour Wednesday 2:30-3:30, N209

- Syllabus -- I will try to keep close to the syllabus in the course of the semester, but some deviations are possible.
- Anaconda Python distribution (install Python v 3.X)
**Main Textbook**: J Kinder and P Nelson,*Student Guide to Python for Physical Modeling, 2nd edition*, http://press.princeton.edu/titles/10644.html . This is**the only textbook you should have**; all others are optional.

- This tutorial is not a complete textbook. I will post additional lecture notes online as needed, or will direct you to additional chapters in other textbooks.
- See also Computational Modeling and Visualization of Physical Systems with Python by J Wang and Computational Physics by Giordano and Nakanishi.
- The bible of scientific computing is Numerical Recipies by Press et al.

- At the end of each class where we do coding, please
**submit your work**using a*Coding Snippet*assignment submission on Canvas.

## Lecture Notes and Detailed Schedule

- Class schedule is available in the syllabus.
- Below I will post Python notebooks for this class. I will strive to post changes to these notebooks before classes, but no promises.
- The Notebooks will also have project assignments for you to work on.

All of the notebooks we will use in the class are available from the Lecture Textbook repository. Currently the following notebooks are available:

- Chapter 1, Introduction to Computational Modeling; this is finalized, and is unlikely to change a lot.
- Chapter 2, Learning Python and solving algebraic equations; this is finalized, and is unlikely to change a lot.
- Chapter 3, Building and Solving Dynamical Models, this notebook is still being edited.
- Chapter 4, Optimization, this notebook is still being edited.
- Chapter 5, Stochastic simulations, this notebook is still being edited.
- Module 1, Progress Report 1 notebook, which covers the Introduction, and Chapters 1 and 2 of the
*Student Guide*; this notebook is now finalized. You will need to (re)-submit this notebook on Jan 27th. - Module 1, Progress Report 2 notebook, which covers Module 1 (Algebraic equations), and Chapters 3 and part of 4 of the
*Student Guide*. The notebook is now finalized, and you need to submit it on Feb 3. - Module 2, Progress Report 1. You were submitting the report without the notebook; it wasn't available at the time.
- Module 3, Progress Report 1 notebook, which covers Module 3 up to and including the nonlinear 1-d optimization lecture (02/26). Submit this notebook on March 2.
- Module 3, Progress Report 2. Submit Mar 30
- Module 4, Progress Report 1. Submit Apr 6.

### Introduction

Download or view the Chapter 1 notebook from the Lecture Textbook repository. *Make sure to keep re-downloading the notebook, as I will change it in the course of the class.*

- Labs 1, Jan 16-17
- Instal Anaconda.
- Do all exercises in the Module 1, Progress Report 1 notebook from the Lecture Textbook repository. This includes Your Turn questions from class, and exercises from Chapter 1 and Chapter 2 of the
*Student Guide*. Finalized version of this notebook would need to be submitted on Jan 27.- Reading
- Chapters 1 and 2 and Appendix B of the Python Student Guide.

### Module 1: Learning Python and solving algebraic equations

Download or view the Chapter 2 notebook from the Lecture Textbook repository. *Make sure to keep re-downloading the notebook, as I will change it in the course of the class.*

- Labs 2, Jan 23-24
- Do all exercises in the updated version of the Module 1, Progress Report 1 notebook from the Lecture Textbook repository. Submit or re-submit this updated and complete notebook on Jan 27.
- Do all exercises in the Module 1, Progress Report 2 notebook from the Lecture Textbook repository. This includes Your Turn questions from class to date, and exercises from Chapter 3 of the
*Student Guide*. Do not submit this notebook on Jan 27th, and updated version will be due Feb 3.- Reading
- Chapters 3 of the Python Student Guide.

- Labs 3, Jan 30-31
- Do all exercises in the Module 1, Progress Report 2 notebook from the Lecture Textbook repository. This includes Your Turn questions from class to date, and exercises from Chapter 3 and some of Chapter 4 of the
*Student Guide*. Submit the progress report by Feb 3.- Reading
- Sections 4.1 and 4.2 and Appendix E of the Python Student Guide.

- Labs 4, Jan Feb 6-7
- Do the project for Module 1 and submit on Monday.

### Module 2: Dynamical models: Building and solving dynamical models

Download and read Chapter 3 notebook from the Lecture Textbook repository. *Make sure to keep re-downloading the notebook, as I will change it in the course of the class.*

- Labs 5, Feb 13-14
- Do the 'Your Turn' exercises in the notebook up to (not including) RK2 and submit on Feb 17.
- Reading
- See reading assignment in the Chapter 3 notebook above.

- Labs 6, Jan Feb 20-21
- You are not required to do the new Your Turn questions (3.8 - 3.18); these won't be submitted since we have only one Progress Report for this module, not two. However, I strongly recommend that you try to do some of them in your spare time.
- Do the project for Module 2 and submit on Monday 2/24.

### Module 3: Optimization

Download and read Chapter 4 notebook from the Lecture Textbook repository. *Make sure to keep re-downloading the notebook, as I will change it in the course of the class.*

- Labs 7, Feb 27-28
- Do all exercises in the Module 3, Progress Report 1 notebook from the Lecture Textbook repository. Submit the progress report by March 2.
- Labs 8, Mar 5-6
- Do all exercises in the Module 3, Progress Report 2 notebook from the Lecture Textbook repository. Submit the progress report by Mar 23 (date changed due to transition to virtual learning).
- Class 03/23
- Finish reading the
*Optimization*notebook (including the projects), respond to the questionnaire, and start thinking about the projects. - Class 03/25
- No pre-class questionnaire. Read notebooks and prepare for midterm. Come with questions that you think will help you during the exam.]
- Labs 9, Mar 26-27, virtual
- Work on the final projects for Module 3.
- Recordings
- Office hour 03/20
- Class 03/23
- Office hour 03/23
- Class 03/25
- Emma's 3/27 office hour
- Emma's 3/27 lab
- Qihan's 3/26 lab
- Office hour 03/30

### Module 4: Stochastic simulations

- Class 03/30
- Read the 'Stochastic simulations' notebook up to and including 'Random Numbers in Python' section. Do the appropriate questionnaire.
- Class 04/01
- Read the 'Stochastic simulations' notebook up to and including 'Exponential Random Numbers' section. Do the appropriate questionnaire.
- Labs 10, Apr 2-3
- Do all exercises in the Module 4, Progress Report 1 notebook from the Lecture Textbook repository. Submit the progress report by Apr 6.
- Class 04/06
- Read the 'Stochastic simulations' notebook up to and including 'What is the error of MC methods?' section. Do the appropriate questionnaire.
- Class 04/08
- Read the 'Stochastic simulations' notebook up to and including 'Central Limit Theorem' section. Do the appropriate questionnaire.
- Labs 11, Apr 9-10
- Do all exercises in the Module 4, Progress Report 2 notebook. Submit it by Apr 13.
- Class 04/13
- Read the 'Stochastic simulations' notebook, 'Projects' section, and understand the projects. Do the appropriate questionnaire.
- Recordings
- Class 03/30
- Office hour 03/30
- Class 04/01
- Qihan's office hour
- Lab 04/02
- Lab 04/03
- Class 04/06
- Class 04/08
- Qihan's 04/09 Lab
- Emma's 04/10 Office Hour
- Emma's 04/10 Lab
- Class 04/13
- If office hours are not posted, it means that nobody showed up, and there was no recording.

### Module 5

- Class 04/15
- Start reading the 'Stochastic simulations' notebook up to (not including) 'Newton's law of cooling' -- I will add more information to the notebook shortly. Also download 'diffusion_module.py' from the repository -- I will explain in class what it is for.