====== Advanced Simulation in the Natural Sciences ====== {{combined.jpg?800x100|}} **ESC202:** Spring 2022: Monday **Lecture:** 10:15-11:00 in Y27-H-35/36 with Joachim, **Exercises:** 11:15-12:00 in Y27-H-35/36 with Stefan and 14:00-15:00 on [[https://teams.microsoft.com/l/channel/19%3a9Eg6kxMba8zjNq6Yh10U3hm25XGNq70_ok3uKc_abPE1%40thread.tacv2/General?groupId=e3fbb0bc-f839-4ce5-ba30-18fe48a64fc9&tenantId=c7e438db-e462-4c22-a90a-c358b16980b3|Teams]] with Sambit! **TAs:** Stefan Schafroth and Sambit Giri ====== Lectures ====== 21. Feb. 2022: - {{ :spin:fs2022_tdse0.pdf |A quick introduction to Quantum Mechanics}} - {{ :spin:fs2022_tdse1.pdf |Time Dependent Schrödinger Equation (1-D 2nd Order derivation)}} - {{ :spin:fs2022_hansderaedt1.pdf |TDSE paper with quick introduction to the method}} - {{ :spin:fs2022_hansderaedt2.pdf |Detailed paper of the method (The Introduction is useful)!}} 28. Feb. 2022: - {{ :spin:fs2022_tdse2.pdf |TDSE Implementation Details}} 7. Mar. 2022: - {{ :spin:raytracingtutorial.pdf | Ray tracing tutorial, just the basics here.}} 14. Mar. 2022: - {{ :spin:phongshading.pdf | Phong Shading}} - {{ :spin:degreve_reflection_refraction.pdf | Reflection and Refraction Tutorial}} 21. Mar. 2022: - {{ :spin:teapot.zip | The famous UTAH Teapot triangultion (source: Stanford media lab)}} - {{ :spin:raytracingpart3.pdf | Ray Tracing - Part 3}} 28. Mar. 2022: - {{ :spin:ray_tracing_-_part_4.pdf | Ray Tracing - Barycentric Triangle Coordinates and Vertex Normals}} 4. Apr. 2022: - {{ :spin:multigridforellipticpdes_-_part_1.pdf | Multigrid for Elliptic PDEs - Part 1}} 11. Apr. 2022: - {{ :spin:multigrid_method.pdf | Multigrid Method and "subgrid" Boundary Conditions}} ====== Assignments ====== 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 Sambit (**sambit.giri@ics.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 ====== 28. Mar. 2022: - Fix the shadow bug by displacing the point +ve to the normal by a small epsilon. - Render transmission through the sphere as if it is made of glass. We have 3 sub-rays on the surface: Absorption (Phong), Reflection, and Transmission. - Render the Utah Teapot using the triangle intersection test. Choose your materials as you like (e.g., glass if you want). You could render a glass ball in front of an opaque teapot as well. - When you get the triangles rendered as factettes, then you are ready to compute the vertex normals using some sort of averaging of the face normals of the surrounding triangles. Then use the barycentric triangle coordinates to mix the 3 vertex normals to calculate an interpolated normal when calculating the absorption, reflection and transmission. This should give you a pretty smooth teapot. 11. Apr. 2022: - Get a multigrid (start with 2 grids) solver working for the simpler case of having the boundary conditions align with grid points at all levels of grid refinement. The BC should lie ontop of points in all of the grids. This requires a bit of care with the central plate that the power of 2 reductions of the grid remain on the endpoints of this plate. You can compare speed to SOR, but due to overheads, it my actually take longer with just 2 grids. With a deeper V-cycle this aspect should improve though.