This repo contains code for the paper titled "Graph Networks as Inductive Bias for Genetic Programming: Symbolic Models for Particle-Laden Flows".
In this work, we model thirty particles of a particle-laden flow and their mutual interactions as a graph. Hereby, one particle corresponds to a node, and particle-particle interactions are represented by edges between two nodes. A graph network (GN) is trained to approximate the underlying relations between particles and predict the fluid-induced force
$y = g(x) = \sum_{j \in N_i}{m_{i,j}}$ $y = f(g(x)) = f(\sum_{j \in N_i}{m_{i,j}})$
The core of this repo constitutes the following files:
- "GN_flowing.ipynb": Code to train a graph network for the problem at hand.
- "GP_flowing.py": Code to identify symbolic models using genetic programming, which replace the network blocks of the GN.
The folder structure is the following:
- "data_inhouse": Training data for 30 particles, as generated by the in-house flow solver. We provide datasets for the Stokes flow (i.e.,
$Re = 0$ ) for varying particle-volume fractions$\phi \in$ {0.064, 0.125, 0.216, 0.343}. - "GN_results": GN models and recorded edge messages for each dataset and algorithm variant.
- "GP_data": Recorded edge messages during GN training, later used as training data for GP to replace network blocks by symbolic models.
- "GP_results": Equation files for various combinations of algorithms and datasets.
I recommend to set up two virtual environments to run this code:
- pytorch_env: For the GN part, install PyG (PyTorch Geometric) and all its dependencies. For me, the conda installation on macOS for M1 worked well.
- pysr_env: For the GP part, PySR as well as its Julia (not my name, the programming language) distribution is required. I had a positive experience with the pip installation on macOS for M1.
For any inquiries related to this repo, please feel free to contact me at julia.reuter@ovgu.de.
This work was funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) within the Priority Programme "SPP 2331: Machine Learning in Chemical Engineering". The project titled "Improving simulations of large-scale dense particle-laden flows with machine learning: a genetic programming approach" is supervised by Sanaz Mostaghim and Berend van Wachem at Otto-von-Guericke-University Magdeburg, Germany.
