ECOGEN: An open-source tool for multiphase, compressible, multiphysics flows,☆☆

https://doi.org/10.1016/j.cpc.2019.107093Get rights and content

Abstract

ECOGEN, a new open-source computational fluid dynamics code is presented. It is a multi-model tool devoted to the simulation of compressible flows. A large range of problems can be solved, from single-phase gas dynamics to multiphase, multiphysics flows including interface problems between pure fluids. This code is suited for strongly unsteady flows. The numerical solver of ECOGEN is implemented in a flexible structure making the code able to compute such complex flows on different kinds of discretization grids. The implemented hyperbolic solver is able to deal with Cartesian geometries as well as unstructured grids. A recent adaptive mesh refinement method is also implemented. Its numerical implementation is presented in detail to help the enthusiastic developer to contribute to this open-source project. Representative test cases are presented to show the tool abilities and to open the gate for future developments.

Program summary

Program title: ECOGEN

Program files doi: http://dx.doi.org/10.17632/5bvx4g39dw.1

Licensing provisions: GNU General Public License 3

Programming language: C++ and XML

Supplementary material: MPI Library required

Nature of problem: The code solves sets of partial differential equations of compressible, multiphase flows in the framework of diffuse-interface methods. It is dedicated to unsteady flows involving acoustic waves, shock waves and material interfaces between liquids and gases. Phase change problems (heating or cavitating flows) can be treated with respect to physical conservation principles and thermodynamics consistency.

Solution method: The numerical method is based on finite volume discretization involving approximate Riemann solvers on different multi-dimensional grids: Cartesian (with or without AMR algorithms) or unstructured. Time and space integration scheme is based on first and second-order methods using the MUSCL approach. The time integration is explicit, the time step obeys a CFL condition. The algorithm is using Message Passing Interface library for the treatment of communications in parallel simulations. Geometrical domain decomposition is automatically generated for Cartesian grids.

Additional comments:

Official web site: https://code-mphi.github.io/ECOGEN/

Official documentation: https://code-mphi.github.io/ECOGEN/docs/sphinx_docs/index.html

Introduction

Multiphase, compressible, multiphysics flows are present in numerous industrial and medical applications involving physical phenomena such as:

  • Bubble dynamics and cavitation for the treatment of kidney stones in the context of shock-wave and burst-wave lithotripsy [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], for the improvement of the artificial heart valves and pumps [11], for the understanding of injury mechanisms during blast trauma [12], [13], [14] or of syringe failure by an autoinjector device during drug delivery [15], [16], for liquid flows around hyper-velocity projectiles and submarine airfoils, or inside nozzles such as fuel injector systems [17], [18], [19], [20], [21], [22].

  • Breakup of liquid droplets induced by high-speed flows or shock waves for combustion systems where a liquid jet is atomized [23], [24], [25], [26], [27], [28], for the erosion of aircraft surface during supersonic flights [29], [30], [31], [32] or for nuclear security issue involving shock-wave attenuation [33], [34].

  • Formation and fragmentation of liquid jets [35], [36] as for example for needle-free injections into skin with highly focused microjets [37], [38].

  • Impact of solids at high velocity for fracture and fragmentation in ductile materials undergoing impact loading, for hypervelocity impact on satellites or for blast effects on structure [39], [40], [41], [42], [43], [44].

  • Boiling flows [45], [46], [47].

  • Deflagration-to-detonation transition in granular energetic materials [48] or detonation waves in condensed energetic materials [49].

Among the previous references, many have participated to the improvement of diffuse-interface models and schemes with the objective to understand, to precisely describe and to reliably predict the behavior of these complicated flows. One can also note additional contributions to the associated numerical methods from authors such as Toro [50], Dumbser et al. [51] and Shyue and Xiao [52] to name a few.

However, only home-made computational research tools have been developed in parallel by researchers in different teams. It appears that these home-made tools are developed for similar applications and involve similar methods. Their specificities often rely on the use of a given discretized grid or a given mathematical model. This is the reason why ECOGEN has been developed: It utilizes the modular aspect of the C++ language to treat different kinds of problems with different appropriate physics in a unique code by sharing common features issued from academic works (grids, equations of state, numerical solver). This sharing of complex features makes developers of the code able to implement quite simply a new flow model without paying any attention to what is already existing in the tool. Moreover, a peculiar attention is paid to conserve this virtue that makes it able to deal with different problems without compromising the performance.

If ECOGEN is one of the first open-source package for compressible, multiphase flow solutions in the framework of diffuse-interface methods, a little alternative exists with comparable features. OpenFOAM [53] can integrate interface-capturing methods but through external projects (not natively). Caltech develops an open-source package named MFC1  [54] based on a WENO scheme for multiphase flow with similar approaches. In Schmidmayer et al. [55], one can find comparisons between ECOGEN’s MUSCL and MFC’s WENO schemes for treating spherical-bubble-dynamics problems. A trend is observed where the higher-order-accurate WENO scheme shows slightly better results than the lower-order-accurate MUSCL scheme for relatively slow interface dynamics while the opposite is observed for relatively fast interface dynamics. Note that the latter correspond to our previously cited, problem interests. Few of the main results of this comparison and single-node performance comparison of both codes are given herein. Furthermore, ECOGEN offers an Adaptive Mesh Refinement (AMR) technique [26] specifically made to treat fast dynamics problems in a very efficient manner and an unstructured mesh option.

ECOGEN means:

  • 1.

    Evolutive: Because of its modular aspect, it is quite obvious that the tool is dedicated to evolve according to the new models resulting from the last research works on multiphase flows.

  • 2.

    Compressible: The tool is devoted to compressible applications. The numerical solver is based on a hyperbolic solver using Godunov method and Riemann problems for intercell flux calculations [56].

  • 3.

    Open-source: It is free and distributed under the GNU General Public License (http://www.gnu.org/licenses/gpl.txt).

  • 4.

    Genuine: The aim is to provide a truthful tool able to help the community for a better understanding on multiphase, compressible, multiphysics flows.

  • 5.

    Easy: The code structure is designed for easier implementations of new models.

  • 6.

    N-phase: If numerical tools already exist for solving single-phase flow problems, ECOGEN is more specifically designed for multiphase flow problems.

This paper presents in detail the version 1.0 of ECOGEN. Section 2 is an overview of the code, describing downloaded package, installation instructions, main CFD features and a brief description of Input/Output (I/O) files. Section 3 describes the code structure and the base ideas making ECOGEN modular. In Section 4, grid structures embedded in the code are detailed. Section 5 is devoted to the implemented mathematical models showing how the code is able to treat a variety of equations of state, flow models and their physical extensions. The numerical solver is also presented in this section. Section 6 presents validations against analytic solutions as well as experimental ones. A comparison of results obtained with MFC [54] is also presented. In Section 7, typical results obtained using ECOGEN in different flow situations illustrate the code possibilities. Finally, Section 8 provides elements in regard to ECOGEN’s computational performance: Parallel scaling and single-node performance.

Section snippets

Package

The ECOGEN_V1.0 package is freely available at the following url: https://code-mphi.github.io/ECOGEN/. This package includes several folders and files organized and described below:

Folders:

  • ECOGEN/src/folder including C++ source files.

  • ECOGEN/libMeshes/folder including examples of unstructured meshes in *.geo format (gmsh2 files [57]).

  • ECOGEN/libEOS/folder including

ECOGEN C++ structure

ECOGEN is developed in a way to make use of the modular aspect of the C++ language and especially inheritance and polymorphism through classes, their attributes and methods. Thanks to that, ECOGEN clearly distinguishes the input, the geometry, the flow model and the thermodynamics of fluids. In other words, this is a very interesting feature for the developers because it means, for example, that everything that belongs to the geometry (dimensions, meshes, etc.) can be modified without any care

Data structure

Three kinds of grids are available: Unstructured grids, Cartesian grids and AMR Cartesian grids. Whatever the kind of grid is, the objects of classes Element, Face, Cell and CellInterface are all stored in 1D arrays but with different arrangements depending on the grid type.

Numerical solver

The present section explains the numerical methods and algorithms implemented to solve compressible flows in ECOGEN. The solver implemented in ECOGEN is explicit and solves hyperbolic systems of equations (conservative or not). The solver is particularly adapted to simulate unsteady flows. In this section is successively presented:

  • The finite volume scheme and algorithm for conservation laws in the general case of unstructured meshes at first order;

  • the treatment of non-conservative terms;

  • the

Simulation validation

Several test cases that validate and verify ECOGEN’s capabilities are presented in this section. These include one-, two-, and three-dimensional test cases that span a wide variety of flow problems.

Illustrative examples

To complement the simulation validation presented in the previous section, three illustrative examples to show typical abilities of ECOGEN are presented:

  • 1.

    2D droplet impact on a wall to show its ability to manage surface tension and gravity.

  • 2.

    2D-axisymmetric, shock-induced bubble collapse near a wall to show its ability to reproduce complex physics while using AMR method and mesh stretching.

  • 3.

    3D pump rotor to show its ability to deal with complex geometries using an unstructured mesh and rotating

Code performance

ECOGEN’s performance is tested regarding parallel scaling for AMR and non-AMR methods and single-node, time-to-solution compared to another recent open-source code, here MFC [54].

Conclusion

The new open-source, computational-fluid-dynamics codeECOGEN has been presented. It is a multi-model tool devoted to the simulation of multiphase, compressible, multiphysics flows and the code is suited for strongly unsteady flows. The numerical solver of ECOGEN is implemented in a flexible structure making the code able to compute such complex flows on different kinds of discretization grids (AMR, stretched and unstructured). Its numerical implementation has been presented in detail to help

Metadata

The essential metadata of ECOGEN are summarized in Table 3.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

The authors would like to thank Prof. Tim Colonius for fruitful discussions. This work has been partially supported by the French spatial agency CNES (Centre National d’Etudes Spatiales) under Grant Number MNS-CT-1459000 and by the Office of Naval Research under Grant Number N0014-18-1-2625. Computations associated to parallel performance have partially utilized the Extreme Science and Engineering Discovery Environment, which is supported by the National Science Foundation grant number

References (84)

  • JohnsenE. et al.

    J. Comput. Phys.

    (2006)
  • TiwariA. et al.

    J. Comput. Phys.

    (2013)
  • CoralicV. et al.

    Eur. J. Mech. B

    (2013)
  • CoralicV. et al.

    J. Comput. Phys.

    (2014)
  • EstradaJ.B. et al.

    J. Mech. Phys. Solids

    (2018)
  • PetitpasF. et al.

    Int. J. Multiph. Flow.

    (2009)
  • PetitpasF. et al.

    Int. J. Nav. Arch. Ocean Eng.

    (2011)
  • PelantiM. et al.

    J. Comput. Phys.

    (2014)
  • SchmidmayerK. et al.

    J. Comput. Phys.

    (2019)
  • SchmidmayerK. et al.

    J. Comput. Phys.

    (2017)
  • JosephD. et al.

    Int. J. Multiph. Flow.

    (1999)
  • GavrilyukS. et al.

    J. Comput. Phys.

    (2008)
  • FavrieN. et al.

    J. Comput. Phys.

    (2009)
  • NdanouS. et al.

    J. Comput. Phys.

    (2015)
  • HankS. et al.

    J. Comput. Phys.

    (2017)
  • HankS. et al.

    Int. J. Impact Eng.

    (2017)
  • Le MartelotS. et al.

    J. Comput. Phys.

    (2013)
  • Le MartelotS. et al.

    Int. J. Multiph. Flow.

    (2014)
  • DumbserM. et al.

    Comput. Methods Appl. Mech. Engrg.

    (2014)
  • ShyueK. et al.

    J. Comput. Phys.

    (2014)
  • PérigaudG. et al.

    J. Comput. Phys.

    (2005)
  • PetitpasF. et al.

    J. Comput. Phys.

    (2007)
  • HarlowF.H. et al.

    J. Comput. Phys.

    (1968)
  • Le MétayerO. et al.

    Int. J. Therm. Sci.

    (2004)
  • KhokhlovA.

    J. Comput. Phys.

    (1998)
  • Van LeerB.

    J. Comput. Phys.

    (1974)
  • SunZ. et al.

    J. Comput. Phys.

    (2016)
  • GavrilyukS. et al.

    J. Comput. Phys.

    (2018)
  • HanE. et al.

    J. Comput. Phys.

    (2017)
  • ZeinA. et al.

    J. Comput. Phys.

    (2010)
  • MurroneA. et al.

    J. Comput. Phys.

    (2005)
  • MatulaT.J. et al.

    Phys. Fluids

    (2002)
  • KreiderW. et al.

    J. Acoust. Soc. Am.

    (2011)
  • JohnsenE. et al.

    J. Fluid Mech.

    (2009)
  • MaedaK.

    Simulation, Experiments, and Modeling of Cloud Cavitation with Application to Burst Wave Lithotripsy

    (2018)
  • BeigS.A. et al.

    J. Comput. Phys.

    (2015)
  • PishchalnikovY.A. et al.

    J. Acoust. Soc. Am.

    (2019)
  • BrennenC.E.

    Interface Focus

    (2015)
  • LaksariK. et al.

    Biomech. Model. Mechanobiol.

    (2015)
  • ProudW. et al.

    Metall. Mater. Trans. A

    (2015)
  • VeilleuxJ.-C. et al.

    Int. Symp. Cav.

    (2018)
  • VeilleuxJ.-C.

    Pressure and Stress Transients in Autoinjector Devices

    (2019)
  • Cited by (37)

    • Numerical simulation and analysis of the underwater implosion of spherical hollow ceramic pressure hulls in 11000 m depth

      2023, Journal of Ocean Engineering and Science
      Citation Excerpt :

      Finally, the grid and detailed setting of numerical simulation method are introduced. The numerical simulation of this research uses the open source code ECOGEN [12] based on C++ that was developed to solve the compressible multiphase flow problem. The code integrates a variety of mathematical models, and its feasibility and accuracy have been verified for a variety of physical problems, such as bubble collapses, shock tubes, shock impact helium bubbles, water droplet atomization, and surface tension [13–16].

    • A seven-equation diffused interface method for resolved multiphase flows

      2023, Journal of Computational Physics
      Citation Excerpt :

      As a result, the interface naturally diffuses across multiple grid cells due to numerical diffusion [6]. Besides their conservation properties, DIMs also allow for the creation or destruction of interfaces, common during supercavitation and flashing [24–27]. The first numerical method for a single-component inviscid seven-equation model was developed by Saurel and Abgrall [28].

    View all citing articles on Scopus

    This paper and its associated computer program are available via the Computer Physics Communication homepage on ScienceDirect (http://www.sciencedirect.com/science/journal/00104655)

    ☆☆

    The review of this paper was arranged by Prof. Hazel Andrew.

    View full text