Manu Jayadharan

Fluid learn

FluidLearn


FluidLearn is a software package with python interface, capable of solving non-linear fluid flow problems using supervised deep learning techniques. The solution function and the PDE operator are approximated as neural networks, which will be trained using labelled data.

Conceptually, this API could be used to solve any well-posed PDE system on complex geometric structures, given enough labelled data in the form of boundary and initial conditions. The architecture could also be used for physical parameter estimation and surrogate modelling. As of now, the package is oriented towards PDE systems governing fluid flow problems with many popular flow systems inbuilt. Users have the option to train the model from external data, visualize the training curves, save the model, reload the model, continue training the saved model or make predictions from the saved models.

The package could be seen as an application of the Physics Informed Neural Networks (PINNs) which are artificial neural nets trained with PDE constraints. The idea was first introduced in this publication in 2017. For more details on the mathematical theory behind PINNs, please visit the website maintained by the authors of the aforementioned publication here.
A graphical representation of a feed forward type neural net used in the training is shown below.

flow_learn_diagram              Approximation of PDE operator using a feedforward neural network

The FluidLearn api is built on top of tensorflow with keras model subclassing. Most of the details are hidden from the end user, who will be dealing only with the fluidlearn package interface. For developers, with knowledge of keras and tensor flow APIs, who would like more control over the package or would like to add more features could do so easily by inspecting the modulular structure of the package. For all users, except developers, installation of the package from python’s official PyPi distribution or pip is recommended. The latter users could use the code directly from here after setting up dependencies.
While the users will find no problem accessing the package through a regular python script, just like with any other machine learning library, it will be visually advantageous to use a notebook setting like jupyter notebook. For this reason, all the demo examples are available in both python(.py) and jupyter notebook (.ipynb) formats.

               fluidlearn-dependency
                 FluidLearn package dependency tree

Author


Manu Jayadharan, Department of Mathematics at University of Pittsburgh, 2020.
GitHub
email: manu.jayadharan@gmail.com, manu.jayadharan@pitt.edu
researchgate
linkedin

Installation


FluidLearn depends primarily on tensorflow (>=v2.2) and numpy. Make sure you have these packages installed before installing fluidlearn, in case they are not available already, please follow the instructions below to install them. Installing all packages inside a separate environment is always recommended in order to prevent version conflicts. You could either use virtualenv package or a package manager like conda to accomplish this.

Installing numpy and tensorflow

#to make sure latest verson of pip is installed.
pip install --upgrade pip
#installing latest verson of numpy
pip install numpy
#installing latest version of tensorflow.
pip install tensorflow

Once installed make sure that you have a compatible version of tensorflow by running the following commands inside a py script or notebook.
import tensorflow as tf
import numpy as np
tf.__version__ >= '2.2.0'

Installing FluidLearn

pip install fluidlearn

Getting started with FluidLearn

Coming in future versions