PythonFOAM: In-situ data analyses with OpenFOAM and Python

03/17/2021
by   Romit Maulik, et al.
0

In this article, we outline the development of a general-purpose Python-based data analysis tool for OpenFOAM 8. Our implementation relies on the construction of OpenFOAM applications that have bindings to data analysis libraries in Python. Double precision data in OpenFOAM is cast to a NumPy array using the NumPy C-API and Python modules may then be used for arbitrary data analysis and manipulation on flow-field information. This document highlights how the proposed framework may be used for an in-situ online singular value decomposition (SVD) implemented in Python and accessed from the OpenFOAM solver PimpleFOAM. Here, `in-situ' refers to a programming paradigm that allows for a concurrent computation of the data analysis on the same computational resources utilized for the partial differential equation solver. In addition, to demonstrate data-parallel analyses, we deploy a distributed SVD, which collects snapshot data across the ranks of a distributed simulation to compute the global left singular vectors. Crucially, both OpenFOAM and Python share the same message passing interface (MPI) communicator for this deployment which allows Python objects and functions to exchange NumPy arrays across ranks. Our experiments also demonstrate how customized data science libraries such as TensorFlow may be leveraged through these bindings. Subsequently, we provide scaling assessments of our framework and the selected algorithms on multiple nodes of Intel Broadwell and KNL architectures for canonical test cases such as the large eddy simulations of a backward facing step and a channel flow at friction Reynolds number of 395.

READ FULL TEXT

page 12

page 13

page 17

page 18

page 21

page 22

page 23

page 24

research
05/30/2018

Accelerating Large-Scale Data Analysis by Offloading to High-Performance Computing Libraries using Alchemist

Apache Spark is a popular system aimed at the analysis of large data set...
research
03/30/2022

A general approach for running Python codes in OpenFOAM using an embedded pybind11 Python interpreter

As the overlap between traditional computational mechanics and machine l...
research
10/01/2018

Multiscale finite element calculations in Python using SfePy

SfePy (Simple finite elements in Python) is a software for solving vario...
research
11/01/2022

Excel Spreadsheet Analyzer

Spreadsheets are widely used in various fields to do large numerical ana...
research
08/19/2021

PyParSVD: A streaming, distributed and randomized singular-value-decomposition library

We introduce PyParSVD[https://github.com/Romit-Maulik/PyParSVD], a Pytho...
research
12/16/2017

An MPI-Based Python Framework for Distributed Training with Keras

We present a lightweight Python framework for distributed training of ne...
research
03/22/2019

Active-Code Replacement in the OODIDA Data Analytics Platform

OODIDA (On-board/Off-board Distributed Data Analytics) is a platform for...

Please sign up or login with your details

Forgot password? Click here to reset