LEAP is a Computational Fluid Dynamics (CFD) code developed by Prof. Mohamed Houssem Kasbaoui at Arizona State University. LEAP is designed to deliver robust and efficient algorithms for CFD applications involving laminar and turbulent single-phase/multiphase flows. -- https://kasbaoui.bitbucket.io

Find us on…

Bitbucket The Web

LEAP

Introduction

LEAP is a state-of-the-art, highly scalable, Computational Fluid Dynamics (CFD) code developed by Prof. Mohamed Houssem Kasbaoui at Arizona State University. LEAP is designed to deliver robust and efficient algorithms for CFD applications involving laminar and turbulent single-phase/multiphase flows. The code is built bottom-up to leverage MPI parallelization and modern FORTRAN features (Object Oriented Programing, data polymorphism and code-reusability).

LEAP is a modern CFD package that offers the following advantages:

  • Flexible, Reusable, and Extendable Data Structures: Data structures are implemented with reusability and scalability in mind thanks to polymorphism and object oriented capabilities of Fortran 2018 and later standards. LEAP offers many data structures that make it easy to build solvers and postprocessing tools. Among the main data structures:

    • The Solver data structure (solver_obj) allows users to easily define a new solver, implement any PDE using the provided finite-volume/difference schemes (up to 6th order), advance the solution in time, and perform IO in single or double precision. There is no limit on how many different solvers can be implemented or any requirement on the equations to be solved.
    • The Eulerian data structure (eulerian_obj) may be used to represent field quantities such as velocity field, pressure field, etc. The module leapEulerian defines a suite of derived types and procedures that allow one to very easily define and work with new fields. Cumbersome operations like allocation and parallel communications (for ghostcells and others) happen under the hood.
    • The Lagrangian data structure (lagrangian_obj) may be used to represent lagrangian quantities such as tracers, inertial particles, immersed boundary markers. Abstract derived types are defined in the module leapLagrangian and can be easily extended to represent whatever Lagrangian quantity one desires. Here too, users may not need to code cumbersome operations like parallel communications, interpolations, and I/O. Users can focus on implementing their physics instead.

    There is a multitude of other data structures available in LEAP. For an exhaustive list refer to the source code or the documentation.

  • High-Performance and Portable I/O: By default, LEAP reads/writes files in the HDF5 file format, the gold standard for open-source, high-performance, and portable file format in scientific computing. HDF5 files can be explored using tools such as h5dump provided with HDF5 distributions. LEAP uses the H5HUT library to write The HDF5 files. These files can also be ingested by popular scientific visualization software such as VisIt or ParaView. In addition, LEAP can output files in the SILO file format. This is the preferred I/O driver for files intended for visualization using VisIt/ParaView. Additional I/O drivers can be implemented upon request.

Solvers currently implemented in LEAP:

  • CDIFS: Constant-Density-Incompressible-Flow-Solver. This solver integrates the Navier-Stokes equations in 1D, 2D, or 3D on a Cartesian grid with staggered variable arrangement and second-order Finite-Volumes schemes. Time advancement is 2nd order using an iterative Crank-Nicolson scheme and delta-formulation for velocity and pressure. The solver supports Inlet/Outlet/Wall boundary conditions. Complex geometries can be specified using Immersed Boundaries. The solver also supports fully Resolved Particles, for Particle-Resolved Direct Numerical simulations (PR-DNS). For fully-periodic configurations, the solver can be optionally run with fourth and sixth order Finite Difference schemes, however, non-periodic boundary conditions are not supported with these schemes. To get started, users can follow the examples provided in the leap/cases directory:
    • Laminar and turbulent channel flow
    • Sphere rebound on a wall
    • Settling sphere in an unbounded domain
    • Flow Past a Cylinder
    • Lamb-Oseen vortex tubes
    • Taylor Green vortex
    • Vortex dipole
    • Vortex-wall Impingement
    • Lid-driven cavity flow
  • GRANS: GRANular flow Solver. This solver is an implementation of dry collisional dynamics of granular material. Immersed Boundaries allow the representation of any complex geometry. Both point-particles and resolved-particles can be included at the same time. Examples cases provided under the leap/cases directory:
    • Homogeneous cooling
    • Dry collisions between spheres and sphere-walls
    • Granular channel flow

In addition to providing the solvers above, LEAP can be called as an external library to provide the following features:

  • Massive Parallelism: parallelized data structures using MPI make it to build parallel programs (e.g. for postprocessing or new solvers).
  • Finite Volume and Finite Difference Schemes: Fully conservative higher order finite difference schemes for incompressible flow.
  • Immersed Boundaries: LEAP provides routines to implement Immersed Boundaries (IB) in a CFD code. The IB method in LEAP is based on the volume-filtering method. LEAP is able to read STL files and compute the forcing force that imposes the no-slip Boundary conditions
  • Resolved Particles: A suite of procedures allow the definition, tracking and updating of resolved particles. LEAP manages all the communications, creation of ghost particles, and collisions. The Resolved Particles are NOT restricted to spheres only. LEAP offers hooks to define custom particle-particle collision models that allow implementations of arbitrarily shaped particle.
  • Point (Lagrangian) Particles: LEAP provides data types and methods to defines clouds of point particles and the manage parallel communication using MPI.
  • I/O capabilities: read/write files in HDF5, H5HUT and SILO formats.

Refer to the User Guide for additional information.

LEAP is currently under development. More features will be made available over time.

Citing LEAP

LEAP users are kindly asked to cite the following publications in their academic work:

  • Dave, H., Herrmann, M. & Kasbaoui, M. H. The volume-filtering immersed boundary method. Journal of Computational Physics 487, 112136 (2023). PDF
  • Kasbaoui, M. H. & Herrmann, M. A high-fidelity methodology for particle-resolved direct numerical simulations. International Journal of Multiphase Flow 187, 105175 (2025). PDF

Compiling LEAP

LEAP requires a compiler compatible with Fortran 2018, such as Gfortran 13x and higher.

The following libraries are required to run LEAP:

  • An MPI distribution (recommended OpenMPI): This library handles the distributed memory aspects and allows the code to run in parallel on large computing systems.
  • HDF5: This library provides a file format (hdf5) that is widely used for scientific data. It is designed to be scalable, and optimizes IO on distributed systems. There is a nice little tool called HDF View that provides a GUI to look into the meta data in the file.
  • H5HUT: this is a wrapper around HDF5 that provides a high level API to make using HDF5 easier with block and Lagrangian data.
  • SZIP: A compression library from the HDF group used by HDF5.
  • ZLIB: Another compression library used by HDF5.
  • SILO: A file format for point, structured, and unstructured meshes developed by the Lawrence Livermore National Laboratory.
  • HYPRE: Scalable linear solvers and multigrid methods developed by the Lawrence Livermore National Laboratory.

Refer to the User Guide for further help.

Documentation and User Guide

Documentation and instructions on how to use LEAP are available online here: https://kasbaoui.bitbucket.io/leap.

Documentation is generated by the automatic documentation generator FORD. To generate a local copy, navigate to the doc folder and create the documentation as following:

cd /PATH/TO/LEAP/doc
ford leap-doc.md

You will find the documentation under /PATH/TO/LEAP/doc/html/index.html.

Support

If you need support with compiling, running, developing applications based on LEAP, or if you need to report bugs contact Prof. Kasbaoui (houssem.kasbaoui@asu.edu).

License

LEAP is distributed open-source under GPLv3 license. See LICENSE.md.


Developer Info

Mohamed Houssem Kasbaoui

School for Engineering of Matter Transport and Energy -- Arizona State University