
Using code to better understand the physics behind equations – Credit Alain Herzog for the portrait â
Guillaume Anciaux, a research and teaching associate in civil engineering at EPFL, uses Jupyter Notebooks to help students learn about computer simulations. For him, code is a way to better understand equations and the phenomena they represent.
Civil engineers must build solid, stable structures. That means they canât blindly trust the results of computer simulations without thinking about the code thatâs behind them. According to Guillaume Anciaux, a research and teaching associate at EPFLâs Computational Solid Mechanics Laboratory, itâs important to make a distinction between âa structure thatâs predicted to fail because of a digital artifact resulting from a poorly formulated problem, and a structure that really is unstable.â Heâs therefore set on teaching future engineers best practices in computer simulation â but itâs not as easy as crossing a bridge.
Anciaux began using Jupyter Notebooks in the civil engineering course he teaches in the spring 2021 semester. He already had experience with these interactive, online notebooks after using them as digital notepads during his research work. Students can access Jupyter Notebooks on noto, the EPFL centralized JupyterLab platform for education, which doesnât require them to install any special software.
Connecting code to equations
Anciaux and his teaching assistant have developed around a dozen Jupyter Notebooks to better explain the more difficult concepts of his course and help students make the connection between the equations they learn in class and real-world phenomena. âSince the notebooks are interactive, students can change the values of variables in an equation and immediately see what happens. That gives them a better sense of the physical reality underlying the equations,â he says. âI wouldâve loved to have something like that when I was a student, to see the exact link between an equation in a simulation and the code behind it.â For instance, Anciauxâs students use the notebooks to explore beam deformation and natural frequencies. âMy grandmother told me never to march across a bridge military-style, or else itâll collapse. I try to explain why to my students,â he says.
Learn how to design exercise worksheets in Jupyter notebooks
The notebooks are also used for exercises where students are asked to complete sections of code with missing elements. âWe want them to learn to challenge code and spot potential problems, because you canât take any shortcuts when it comes to programming equations,â he says. âMy class is for third-year students, and the hard part is getting the level of difficulty just right. It takes a lot of fine-tuning because the students come from very different backgrounds,â he says. They arenât all equally familiar with the Python programming language, for example. âSome of them told me they were having trouble because theyâd never written code in Python before. So we set up online forums and try to help them as best we can.â
After trying out the notebooks this semester, Anciaux still needs to make adjustments, but heâs convinced of their value for helping students better understand the computer simulations they run by illustrating the link between mathematics and the practice of civil engineering. Of course, that includes code analysis, so students donât get tricked by digital artifacts.
Author: Laureline Duvillard
Videos:
Notebooks:
Share on
Other stories
Automatically graded image processing assignments
Pol del Aguila Pla uses automated grading in image processing labs based on Jupyter Notebooks.
Virtual demonstrations in physics
Virtual demonstrations help students visualize the different variables involved in experiments in CĂ©cile HĂ©bertâs Jupyter Notebooks.
Interactive signal processing textbook
Music is a central element in the interactive textbook designed by Paolo Prandoni to teach signal processing with Jupyter Notebooks.