Samurai

NSH2

Loïc Gouarin and Pierre Matalon

29 February 2024

This work is licensed under a Creative Commons Attribution 4.0 International License

Work achieved during 2023

  • New implementation of boundary conditions
  • Flux based schemes
  • Fine tuning in MRA
  • Multiple adapted grids
  • Parallelism
  • Release mechanism

New implementation of boundary conditions

What kind ?

  • A constant
  • A function in space and time
  • A function depending on other fields

New implementation of boundary conditions

New implementation of boundary conditions

New implementation of boundary conditions

New implementation of boundary conditions

  • Classical boundary conditions are available (Dirichlet, Neumann).
  • A user can easily define its own using a stencil formalism.
  • We provide interpolation mechanism for prediction ghosts.

Flux based schemes

Loop on the faces, paying attention to the level jump.

Flux based schemes

Define the stencil.

Flux based schemes

A user can easily define

  • a linear, homogeneous operator
  • a linear, heterogeneous operator
  • a non-linear operator

The flux can be conservative or non-conservative.

These operators can then be used for explicit or implicit time schemes.

Fine tuning in MRA

  • Select the fields used for the multiresolution.
  • Should work for SOA and AOS storage or a combination of both.
  • Adapt the other fields on this new mesh.

Multiple adapted grids

Compression rates

Compression rates

Level Num. of cells p4est samurai (leaves) samurai (all) ratio
9 $66379$ $2.57$ Mb $33.68$ Kb $121$ Kb $21.24$
10 $263767$ $10.25$ Mb $66.64$ Kb $236.8$ Kb $43.28$
11 $1051747$ $40.96$ Mb $132.36$ Kb $467.24$ Kb $87.66$
12 $4200559$ $163.75$ Mb $263.6$ Kb $927$ Kb $176.64$
13 $16789627$ $654.86$ Mb $525.9$ Kb $1.85$ Mb $353.98$
14 $67133575$ $2.61$ Gb $1.05$ Mb $3.68$ Mb $709.24$

Parallelism

  • A subdomain has the information of all its neighbors.
  • MPI is used.
  • The ghosts between subdomains are updated using the algebra of sets.

Release mechanism

  • Use of conventional commits
  • Increment version automatically
  • Create changelog automatically
  • Make a release automatically
  • Create the conda package on conda-forge

Make the changes available as soon as possible

Roadmap

Roadmap for 2024: numerical methods

  • Various finite volume methods
  • NSCBC
  • Complex time schemes with operator splitting

Roadmap for 2024: code

  • Optimization
  • Load balancing
  • GPU support
  • IO optimization and compression

Scientific collaborations

  • Lattice Boltzmann methods and multiresolution - Thomas Bellotti (IRMA/Université Strasbourg) and Benjamin Graille (LMO/Université Paris-Saclay)
  • Plasma discharges and electric propulsion - Alejandro Alvarez (LPP/Ecole polytechnique) and Louis Reboul (ONERA)
  • Direct numerical simulation of lithium-ion batteries based on high-resolution 3D images of porous electrode microstructures - Ali Asad (TotalEnergies) and Laurent François (ONERA)
  • Sharp interface method for low Mach two-phase flows - Nicolas Grenier (LISN/Université Paris-Saclay) and Christian Tenaud (EM2C/Université Paris-Saclay)
  • Low-Mach reactive flows - Christian Tenaud (EM2C/Université Paris-Saclay)
  • Interfacial flow simulation - Giuseppe Orlando (CMAP/Ecole polytechnique) and Marica Pelanti (ENSTA/IP Paris)
  • Mathematical modeling and simulation of non-equilibrium plasmas for the prediction of electric propulsion - Zoubaïr Tazakkati (CMAP/Ecole polytechnique)
  • Simulation analysis on the Hydrogen risk - Luc Lecointre, Pierre-Alexandre Masset, Etienne Studer (CEA) and Christian Tenaud (EM2C/Université Paris-Saclay)