Massively parallel implementation in Python of a pseudo-spectral DNS code for turbulent flows

07/01/2016
by   Mikael Mortensen, et al.
0

Direct Numerical Simulations (DNS) of the Navier Stokes equations is a valuable research tool in fluid dynamics, but there are very few publicly available codes and, due to heavy number crunching, codes are usually written in low-level languages. In this work a 100 line standard scientific Python DNS code is described that nearly matches the performance of pure C for thousands of processors and billions of unknowns. With optimization of a few routines in Cython, it is found to match the performance of a more or less identical solver implemented from scratch in C++. Keys to the efficiency of the solver are the mesh decomposition and three dimensional FFT routines, implemented directly in Python using MPI, wrapped through MPI for Python, and a serial FFT module (both numpy.fft or pyFFTW may be used). Two popular decomposition strategies, slab and pencil, have been implemented and tested.

READ FULL TEXT
research
02/11/2016

High performance Python for direct numerical simulations of turbulent flows

Direct Numerical Simulations (DNS) of the Navier Stokes equations is an ...
research
02/11/2016

Oasis: a high-level/high-performance open source Navier-Stokes solver

Oasis is a high-level/high-performance finite element Navier-Stokes solv...
research
08/08/2018

pySDC - Prototyping spectral deferred corrections

In this paper we present the Python framework pySDC for solving collocat...
research
10/02/2019

Modernizing Titan2D, a Parallel AMR Geophysical Flow Code to Support Multiple Rheologies and Extendability

In this work, we report on strategies and results of our initial approac...
research
03/22/2022

sympy2c: from symbolic expressions to fast C/C++ functions and ODE solvers in Python

Computer algebra systems play an important role in science as they facil...
research
07/03/2018

FluidSim: modular, object-oriented Python package for high-performance CFD simulations

The Python package fluidsim is introduced in this article as an extensib...
research
08/30/2023

The Janus System: Multi-paradigm Programming in Prolog and Python

Python and Prolog express different programming paradigms, with differen...

Please sign up or login with your details

Forgot password? Click here to reset