====== Simulations in the Natural Sciences I ====== {{:spin:combined.jpg?800x100|}} **ESC201:**Fall 2020: Monday Lecture: 13:00-14:00 Exercises: 14:00-17:00 in **online only** **TAs**: Stefan Schafroth, Sebastian Schulz (**sebastian.schulz@uzh.ch**), Peter Espenshade (**peter.espenshade@uzh.ch**) ===== Corona Virus Measures ===== ** Dear Students, I will provide a video lectures from the second class onwards, the 21. September 2020. Exercises will in future take place via Microsoft Teams :[[https://teams.microsoft.com/l/channel/19%3a8823c3b7fb424ddca64bb9c5b0a4637b%40thread.tacv2/General?groupId=b928c639-c816-46a5-98b7-16bfd43c9df4&tenantId=c7e438db-e462-4c22-a90a-c358b16980b3|ESC 201]] ** Joachim Stadel ---- ===== Video Lectures ===== Videos for the lectures can be found here (they are too large for my Wiki): [[http://www.ics.uzh.ch/~stadel/krone/public_downloads/esc201|ESC201 Video downloads]] ====== Lectures ====== 14. Sep. 2020: {{ :spin:sins1-01.pdf |First Lecture}} 21. Sep. 2020: {{ :spin:week2.pdf |Bisection Method, Newton's Method, Kepler's Equation}} 28. Sep. 2020: {{ :spin:week3.pdf |Population growth, Chaos and Fractals}} 5. Oct. 2020: {{ :spin:week4.pdf |Fractals from complex numbers, Start of ODEs}} 12. Oct. 2020: {{ :spin:week5.pdf |Ordinary differential equations, Lotka-Voltera System}} 19. Oct. 2020: {{ :spin:week6.pdf |Symplectic Integrators: Leap-frog}} 26. Oct. 2020: {{ :spin:week7.pdf |Gravitation for Many Bodies: a Digital Orrery}} 2. Nov. 2020: {{ :spin:week8.pdf |Laplace Equation, Jacobi and SOR Methods}} 9. Nov. 2020: {{ :spin:week9.pdf |Bi-linear(cubic) Interpolation and Electron Beams}} 16. Nov. 2020: {{ :spin:week10.pdf |Diffusion Equation and Numerical Stability}} 23. Nov. 2020: {{ :spin:week11.pdf |Hyperbolic PDEs}} 30. Nov. 2020: {{ :spin:week12.pdf |Finite Volume Method in 1-D and 2-D}} 7. Dec. 2020: {{ :spin:week13.pdf |Hydrodynamics in 1-D}} 14. Dec. 2020: {{ :spin:week14.pdf |Course Evaluation, Oral Exam Discussion and ESC202 info}} ====== Assignments ====== Should be handed in every **Sunday night by 21:00** following the Monday lecture. Assignments should be **individual** and should be in python and **provide a correct virtual environment!** For help getting started with virtual environments, please read carefully [[https://towardsdatascience.com/all-you-need-to-know-about-python-virtual-environments-9b4aae690f97|Python Virtual Environments for Pip]] and [[https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/20/conda/|Python Virtual Environments for Conda]]. You should email 3 things to Peter (**peter.espenshade@uzh.ch**): - The working **python source code** - The **requirements.txt** file for your virtual environment - A **.pdf** or **.png** image or animation of the output of your program Template: {{template.zip}} ** Instructions: ** Please add the names of the people you work together (if you do) to the comment section of your python scripts. Create a virtual environment using Pip - run **virtualenv yourenv_name** to create a virtual environment - run **source yourenv_name/bin/activate** to activate yourenv_name - install necessary libraries that you want using **pip install package_name** - work in that directory, get your outputs (*.pdf, *.png, *jpeg, *.mp4, etc...) - run **pip freeze > requirements.txt** to get your list of libraries Conda - run **conda create -n yourenvname python=x.x anaconda** to create a virtual environment - run **source activate yourenvname** to activate yourenv_name - install necessary libraries that you want using **conda install -n yourenv_name package_name** - work in that directory, get your outputs (*.pdf, *.png, *jpeg, *.mp4, etc...) - run **conda list --export > requirements.txt** to get your list of libraries ====== List of assignments ====== - Kepler's equation: Draw/Animate a plot showing the elliptical orbit about the sun/star by repeatedly solving Kepler's equation using Newton's Method (**due 27 September, 2020**). - Logistic equation and chaos: Draw a Feigenbaum diagram that results from solving the logistic equation (**due 4 October, 2020**). (Optional: Draw the iterations of the logistic equation in a x_(n+1) vs x_n plot.) - Fractals using complex numbers: Draw the Mandelbrot set as presented in the lecture (**due 11 October, 2020**). (Optional: Draw some Julia sets with various c.) - Ordinary Differential Equations: Solve the Lotka-Volterra equation using the Euler method and the midpoint Runge-Kutta method (optional: 4th order Runge Kutta method) and compare the results. Make two plots: the time dependence of both populations (mice and foxes), and the phase diagram using different initial conditions (**due 18 October, 2020**). - Symplectic Integrators: Use the Leap-Frog method to make a phase plot (p vs q) of the harmonic oscillator for different total energies. Make the same plot for a simple pendulum (**due 25 October, 2020**). - Solar System Orrery {{ :spin:solsystdata.dat.zip | Initial Conditions }}, {{ :spin:read_planets.zip | Loading Script }} (**due 1 November, 2020**) - Elliptical partial differential equations: Solve the Poisson equation for the electromagnetic potential using the SOR method described in the lecture, with boundary conditions given by a 1000 Volt stick in the center of a 0 Volt box (as depicted in the lecture notes). Plot the contours of the resulting potential (**due 8 November, 2020**). - Interpolation, Part 1: Trace the movement of electrons in an electromagnetic potential (e.g. the one from the last week's exercise) with Leapfrog or Runge-Kutta. Use bilinear or bicubic interpolation for the potential. (**not graded, due 15 November, 2020**) - Interpolation, Part 2 (**WIN A PRIZE**): Design an optimal electron detector (specifics in lecture materials) (**due 22 November, 2020**) - Hyperbolic PDEs: Solve the linear advection equation by evolving an initial waveform in a periodic grid. See how the waveform behaves after passing through the grid multiple times and compare the results you get when using various methods introduced in the lecture (e.g. the LAX method, upwind scheme, LAX-Wendroff method...) (you can get 0.5 bonus points if you implement all three variants provided in Stefan's Hyperbolic Hints.txt) (**due 29 November, 2020**). - 2D advection: Solve the 2D advection problem using two methods introduced in the lecture (CIR and CTU) and compare if and how your solution diffuses numerically (**due 6 December, 2020 **). - 1D Hydrodynamics: Solve the "shock tube" problem and the Sedov-Taylor blast wave using the three methods provided in the lecture (detailed assignment can be found in the lecture notes) (**due 13 December, 2020 **). - Fill out the evaluation form: [[https://idevasys03.uzh.ch/evasys_02/public/online/index/input?p=ZG3DG]]