CFDFlow

Computational fluid dynamics News

t8code – the open-source library for extremely efficient simulations with adaptive grids

tn8
tn8

t8code is a software library for efficient management of dynamic adaptive grids and data on them.Any simulation software that uses grids can benefit from t8code as a plugin, because it supports and enhances various simulation applications. t8code is very general-purpose because it supports just about any grid needed by numerical simulation software.
t8code is a C/C++ library to manage parallel adaptive meshes with various element types. t8code uses a collection (a forest) of multiple connected adaptive space-trees in parallel and scales to at least one million MPI ranks and over 1 Trillion mesh elements.

t8code is an open source plugin for any simulation software 

t8code (written in lower case and pronounced “tetcode”) is a software library for efficient management of dynamic adaptive grids and data on them. Any simulation software that uses grids can benefit from t8code as a plugin, because it supports and enhances various simulation applications. t8code is very general-purpose because it supports just about any grid needed by numerical simulation software.

t8code is being developed by the department of High-Performance Computing at the Institute for Software Technology, with the participation of the University of Bonn. At the German Aerospace Center (DLR), t8code is already successfully used in several projects. The current areas of application range from earth system modeling and the simulation of atmospheric chemistry to the improvement of 3D printing processes.

Aircraft cross section modelled with scalable adaptive meshesThe animation shows the cross section of an aircraft modelled using the t8code software library. The software library supports the efficient management of dynamically adaptive grids and the data on them. t8code enhances various simulation applications as a plug-in and can be used for any simulation software that uses grids.Credit: DLR (CC BY-NC-ND 3.0)Download

Adaptive grids as a basis for flow simulations 

Computer simulations of weather forecasts, climate models, or flows often use grids as the basis for calculations. The computational domain is first divided into a grid of different geometric shapes such as triangles, quadrilaterals, hexahedra, or tetrahedra. The finer the resolution of this grid, the more accurate the results of the simulation.

Adaptive grids in a simulation of flows in the Earth’s atmosphereBy refining and coarsening the calculation cells, computing time and memory requirements can be significantly reduced.Credit: Johannes Holke, 2021Download

However, finer resolution also increases computation time and memory requirements. A grid can be called adaptive when they selectively refine only in places where fine resolution is needed, and remain coarser in other places. Grid refinement is useful in the example of a weather simulation along a cold front. If the grid resolution changes during the simulation – the cold front moves – this is called dynamic adaptive grids. The subdivision into fine and coarse computational domains allows to deal extremely efficiently with the available computational capacity.

t8code extends successful technologies

2D tank sloshing simulation in a moving circular tank
2D tank sloshing simulation in a moving circular tankThe simulation was performed with the CFD code Trixi.jl. The framework was extended with the so-called three-equation model. The model includes a simplified two-phase flow of the Baer-Nunziato equations for compressible multiphase fluids. The simulation shown is the result of a joint research project between DLR and the University of Cologne. The aim is to develop and implement computer models for sloshing dynamics in liquid hydrogen tanks on moving platforms such as cars, ships and aircraft. Particular emphasis is placed on the most detailed resolution possible of the boundary layer between the gas and liquid phases. This is achieved using an adaptive grid from t8code that dynamically adapts to the changing boundary layer.Credit: DLR (CC BY-NC-ND 3.0)

t8code is extremely efficient and works even with the extremely large processor counts of current supercomputers. In practical applications with up to one million parallel processes and grids with more than one trillion (10 to the power of 12) elements, t8code has demonstrated its efficiency. t8code achieves this efficiency by using a tree-based approach with the help of space-filling curves. These data structures are both highly computationally and memory efficient and geometrically very flexible. t8code extends this successful technology, which was previously only available for quadrilateral and hexahedral lattices, to general element shapes. Thus, t8code in 3D supports the particularly frequently used shapes tetrahedron, hexahedron, prisms and pyramids and also allows the combination of different shapes within one grid.

Potential for the industry

t8code is ideally suited as a scalable alternative to the unstructured grids commonly used in industry. t8code promises shorter runtimes – and thus lower costs – better resolutions, and universally applicable code for simulation software.

t8code (spoken as “tetcode”) is a C/C++ library to manage parallel adaptive meshes with various element types. t8code uses a collection (a forest) of multiple connected adaptive space-trees in parallel and scales to at least one million MPI ranks and over 1 Trillion mesh elements.

t8code is intended to be used as a thirdparty library for numerical simulation codes or any other applications that require meshes.

Here, you can find a description of the interface, functionality and features of t8code version 1.0.

Key-features

Among other features, t8code offers the following functionalities:

  • Managing distributed adaptive meshes over complex domain geometries
  • Adapting meshes according to user given refinement/coarsening criteria
  • Establishing a 2:1 balance condition
  • (Re-)partitioning/load-balancing a mesh (and associated data) among MPI ranks
  • Managing ghost (halo) elements and data
  • Searching the mesh efficiently
  • Supporting curved meshes

Getting started

Get started using t8code now. We have a collection of Tutorials that help you understand the data structures and algorithms of t8code and how to best connect it to your application. Additionally our large collection of examples demonstrates the features of t8code.

Updated: 20 February 2026 — 09:39

Leave a Reply

Your email address will not be published. Required fields are marked *

CFDFlow © 2015 Frontier Theme