Department of Environmental Engineering
University of Genoa

- FLUBIO -

Marie Curie Early Stage Training Site at the University of Genova, Italy


Scientific computing using Python


Post-processing of data obtained using OpenFOAM and a little bit of scientific computing using Python.

These are the Python libraries that you will need to install to follow these tutorials:

•    scipy 0.14.0 or newer.
•    numpy 1.9.0 or newer.
•    pandas 0.15.0 or newer.
•    matplotlib 1.4.0 or newer.
•    ipython.



Tutorial 1.
This tutorial consist in comparing the analytical solution
of the laminar flow in a pipe against its numerical solution.
The numerical solution is obtained using OpenFOAM 2.3.x.
You can download the ipython notebook and the OpenFOAM dictionaries from this link:
https://github.com/joelguerrero/first-tutorial/tree/master/c1

Alternatively, you can open the notebook using nbviewer, just go to this link
http://nbviewer.ipython.org/github/joelguerrero/first-tutorial/blob/master/c1/laminar_pipe_notebook.ipynb



Tutorial 2.
This tutorial consist in computing the PSD of an input signal.  The input signal is obtained from the 2D cylinder case using OpenFOAM 2.3.x (Re = 200).
You can download the ipython notebook and the OpenFOAM dictionaries from this link:
https://github.com/joelguerrero/first-tutorial/tree/master/c2

Alternatively, you can open the notebook using nbviewer, just go to this link
http://nbviewer.ipython.org/github/joelguerrero/first-tutorial/blob/master/c2/coe_psd.ipynb



Tutorial 3.
In this tutorial we implement the 1D diffusion equation using an ipython notebook .
You can compare the output of the python script with the output obtained from OpenFOAM.  Specifically, you can compare how the matrices are assembled.
Later on I will upload the OpenFOAM solver with the capability to save the matrices.
You can download the ipython notebook and the OpenFOAM dictionaries from this link:
https://github.com/joelguerrero/first-tutorial/tree/master/c3

Alternatively, you can open the notebook using nbviewer, just go to this link
http://nbviewer.ipython.org/github/joelguerrero/first-tutorial/blob/master/c3/lecture_diffusion1D.ipynb



Tutorial 4.

In this tutorial we implement the 1D convection-diffusion equation using an ipython notebook .
You can compare the output of the python script with the output obtained from OpenFOAM.  Specifically, you can compare how the matrices are assembled.
Later on I will upload the OpenFOAM solver with the capability to save the matrices.
You can download the ipython notebook and the OpenFOAM dictionaries from this link:
https://github.com/joelguerrero/first-tutorial/tree/master/c4

Alternatively, you can open the notebook using nbviewer, just go to this link
http://nbviewer.ipython.org/github/joelguerrero/first-tutorial/blob/master/c4/lecture_convectiondiffusion1D.ipynb







Joel GUERRERO
joel.guerrero@unige.it
Personal Web Page

DICAT, University of Genova
1, Via Montallegro
16145 Genova, Italy

Last update: 28/JUL/2017