Section outline

  • Modelling and Simulation in Physics, M1, 2025-2026

  • Welcome to the First Part of the Programming Course

    This first part of the course is an intensive two-week program made up of 7 sessions, each lasting 3 hours. The goal is to help you (re)discover Python and its most useful scientific libraries for physicists: NumPy, Matplotlib, and SciPy.

    Structure of the Sessions

    The program is built around 5 practical sessions, each of them contained in a separate Jupyter Notebook. These notebooks are designed to guide you progressively from basic concepts to applied exercises, and each one follows the same structure.

    Concepts and Syntax
    • The notebooks begin with explanations of Python objects, syntax, and functions relevant to the session.

    • These explanations are written in plain text.

    Illustrative Coding Examples

    • Throughout the notebook, you’ll find small programs or pieces of code marked with a symbol.

    • These are meant to illustrate how certain functions or objects behave.

    • Don’t just run the code modify it, add print statements, change parameters, and see what happens.

    • Sometimes, you’ll be prompted with # COMMENT REQUIRED: this is your cue to add your own explanation of what the code is doing. It’s a great way to make sure you’ve really understood it.

    From Examples to Insight

    • After running and analyzing the examples, you’ll encounter moments for reflection and synthesis. These are marked with the symbol.

    • You’ll be asked to summarize, compare, or deduce general principles based on what you’ve observed. These parts are key to consolidating your understanding.

    Exercises

    • At the end of each notebook, you’ll find a series of exercises to apply what you’ve learned. They range from simple to more challenging problems.

    Collective Thinking and Peer Discussion

    • During the sessions, we’ll also have short brainstorming moments to share ideas and insights as a group.

    • These moments will also serve as a form of collective correction and feedback on the reflection and synthesis questions marked by in the notebook.

    • The goal is to build a shared understanding of the tools and concepts you’re learning.

    • Don’t hesitate to talk with your peers: whether you’re trying to deduce a concept, struggling to understand a code example, or unsure about how something works — talking it through with someone else is often the best way to understand.

    How to Use the Notebooks

    1. Download the folder containing all the notebooks.

    2. Open a terminal and navigate to the folder using the cd command.

    3. Then launch Jupyter with the command: jupyter notebook

    4. A browser window will open where you can select and run the notebooks.

    Additional Resources

    Alongside the notebooks, a complete PDF file of detailed lecture notes is available. (I thank Hervé Wozniak for sharing his notes.)

    This document contains all the explanations covered in the course, as well as many additional details and examples. 

    It is regularly referenced in the notebooks, so it’s highly recommended to consult it while working through the practicals.

    It can also serve as a valuable reference guide during and after the course.

    Final Advice

    These sessions are designed to be active and exploratory. The more you test, comment, and experiment, the more you’ll learn. Programming is not about memorizing — it’s about understanding how things work by trying them out.

    Let’s get started—and enjoy the process!

  • Welcome to the Second Part of the Programming Course

    This second part of the course shifts to a new format, focused on simulations and their role in Physics. The objective is to learn how to translate physical models into code and to explore their behavior through computation.

    Curriculum

    Over the next sessions, we will cover several major simulation techniques used in Physics:

    • Integration of Ordinary Differential Equations (ODEs),

    • Integration of Partial Differential Equations (PDEs),

    • Monte Carlo methods,

    • … and possibly an additional advanced topic to be announced later.

    These methods form the backbone of many computational approaches in modern Physics.

    Structure of the Sessions

    Each session will follow a clear sequence, designed to make the most of your preparation and class time:

    Preparation before Class

    • Before each session, you are expected to read the corresponding sections of the lecture notes.

    • The notes contain the basic concepts, illustrative examples, and skeletons of code that will help you get started.

    • While reading, take notes of anything that is unclear or raises questions.

    Q&A and Clarification
    • Each session begins with a short discussion and clarification period.

    • We will address your questions and the points you found challenging during your preparation.

    Practical work

    • After the Q&A, you will move on to the practical exercises.

    • These exercises are designed to make you apply what you’ve learned, step by step.

    • You will work independently and actively at your computer: running, modifying, and testing code to solve the problem at hand.

    Guidance and Support

    • During the practicals, your instructor will be there to guide you, answer questions, and give feedback.

    • The goal is not to provide ready-made solutions, but to help you find your own way to tackle the problems.

    How to get the most of the sessions

    • Preparation is essential: read the lecture notes carefully before coming to class.

    • Stay active: coding is a skill you build by doing, not by passively reading.

    • Ask questions: during both the Q&A and the practicals.

    • Discuss with your peers: explaining your reasoning or asking for someone else’s perspective often helps to clarify difficult points.

    Final Advice

    This part of the course is designed to make you autonomous in using simulations as a physicist’s tool. The lecture notes give you the foundation, but the real learning happens when you experiment, make mistakes, correct them, and try again.

    Let’s get started with simulations!