Introduction to Numerical Methods in Fluid Mechanics with Jupyter Notebooks

Andrés M. Cimino, Gustavo J. Krause

Abstract


Introducing the governing equations of fluid dynamics and their discrete numerical counterparts to undergraduate students can be challenging due to their complexity, which sometimes makes it difficult to provide with examples or simple solutions. For this reason we developed a set of interactive notebooks which combine text, equations and figures (like in a textbook) with computer code in Python. To achieve this we used the open source libraries developed by Project Jupyter and the notebooks “12 steps to Navier Stokes” made by Dr. Lorena Barba. Jupyter notebooks run in any web browser and are compatible with most python libraries (Scipy, Numpy, sympy, Matplotlib, etc.), allowing for much flexibility as well as advanced functions. The use of these tools has many advantages, such as obtaining analytical and numerical solutions in a simple and interactive manner, or allowing to break down an entire code and explain and execute each part separately. What is more, students may become more familiar with python and its libraries, and may reuse the code to solve the assignments of the course. We developed notebooks to cover the governing equations of fluid dynamics, an introduction to ordinary and partial differential equations and their numerical and analytical solutions, the finite difference method for fluid dynamics, the finite volume method, introduction to pressure based algorithms for flow problems and gradient and interpolation computations for unstructured meshes. With these tools it was possible to introduce these complex subjects and allow the students to gain insight performing sensitivity analysis, modifying code or obtaining new solutions based on the existing ones.

Full Text:

PDF



Asociación Argentina de Mecánica Computacional
Güemes 3450
S3000GLN Santa Fe, Argentina
Phone: 54-342-4511594 / 4511595 Int. 1006
Fax: 54-342-4511169
E-mail: amca(at)santafe-conicet.gov.ar
ISSN 2591-3522