Skip to content

Code Flow Overview

This page provides an overview of the general program structure and execution flow in DINO. The code follows a structured workflow divided into initialization, Main Loop, and Termination phases. it is summarized in the following diagram:.

Flow Chart

Flowchart of the DINO code, showing the main computational steps from intialization to data output.


1. Initialization Phase

  • 1.1 Start Simulation
    • Marks the beginning of the DNS computation. System resources are initialized, and simulation metadata is loaded.
  • 1.2 Initialization
    • Reads input files and sets simulation parameters.
    • Initializes mesh, fields, physical properties, and any auxiliary variables required by solvers.
  • 1.3 Time Step Control
    • Determines the intitial time step based on stability criteria (CFL, Fourier).
    • Prepares adaptive time stepping logic for the main loop.

2. Main Loop Phase

This phase executes repeatedly until the simulation reaches the end time.

  • 2.1 Incompressible Flow?
    • It is decided wether the incompressible or compressible solver is used.

Note

For incompressible flow, the momentum solver is applied directly.

  • 2.2 Thermodynamics computation
    • Thermodynamic coefficients such as denstiy \(\rho\), mixture fraction \(\xi\), and specific heats \(c_p\) are computed.
  • 2.3 Transport computation
    • Computes transport relevant qunatities like molar fractions \(X_i\), diffusion coefficients and velocities \(D_M\) and \(V_I\) and Lewis numbers \(Le_i\).

Info

Depending on the users choice, different diffusion models are accounted for (e.g. Multicomponent, Curtis-Hirschfelder or Fick's law). It is also possible to account for thermal diffusion (Soret effect).

  • 2.4 Reaction rate computation
    • Reaction rates are computed with cantera based on the selected reaction mechanisms.

Warning

Cantera 1.8 or 2.4 is supported for now.

  • 2.5 Right-hand-side computation

    • Adds the right hand side components of the governing equations to the momentum and Species and temperature transport equations.

    Note

    For incompressible flow simulations, this is done without a new computation of thermodynamic, transport and reaction rate quantities!

  • 2.6 Boundary Condition Application

    • Boundary conditions are defined and applied to the governing equations.
  • 2.7 Immersed Boundary Conditions Enforcement

    • Specific treatments for IBM are called.
  • 2.8 Second phase equation computation

    • If the simulation is set to study multiphase flow, the second phase equation is computed (Particles are advanced to their new location in lagrangian manner).
  • 2.9 Time integration

    • A time integration scheme is used to advance the simulation by one iteration.

3. Termination Block

  • 3.1 Time Step Control

    • Determines the intitial time step based on stability criteria (CFL, Fourier).
    • Prepares adaptive time stepping logic for the main loop.
  • 3.2 Write Output

    • Specified output files are written.
  • 3.3 End

    • If the specified end time or end iteration is reached, the simulation is stopped.