2.2. Simulation parameters

2.2.1. System size and parallel decomposition

The system size is specified via the key size, e.g.:

size         64_64_64

If a two-dimensional system is required, the \(z\)-direction extent should be set to 1.

In parallel, the domain decomposition is closely related to the system size, and is specified as follows:

grid         4_2_1

The grid key specifies the number of MPI tasks required in each coordinate direction. In the above example, the decomposition is into 4 in the \(x\)-direction, into 2 in the \(y\)-direction, while the \(z\)-direction is not decomposed. In this example, the local domain size per MPI task would then be \(16\times32\times64\). The total number of MPI tasks available must match the total implied by grid (8 in the example).

If the requested decomposition is not valid, or grid is omitted, the code will try to supply a decomposition based on the number of MPI tasks available and MPI_Dims_create(); this may be implementation dependent.

2.2.2. Simulation time steps

Basic parameters controlling the number of time steps are:

N_start      0                              # Default: 0
N_cycles     100                            # Default: 0

A typical simulation will start from time zero (key N_start) and run for a certain number of time steps (key N_cycles).

If a restart from a previous run is required, the choice of parameters may be as follows:

N_start      100
N_cycles     400

This will restart from data previously saved at time step 100, and run a further 400 cycles, i.e., to time step 500.

2.2.3. Fuild parameters

Control parameters for a Newtonian fluid include:

fluid_rho0                 1.0
viscosity                  0.166666666666666
viscosity_bulk             0.166666666666666
isothermal_fluctuations    off
temperature                0.0

The mean fluid density is \(\rho_0\) (key fluid_rho0) which defaults to unity in lattice units; it is not usually necessary to change this. The shear viscosity is viscosity and as default value 1/6 to correspond to unit relaxation time in the lattice Boltzmann picture. Reasonable values of the shear viscosity are \(0.2 > \eta > 0.0001\) in lattice units. Higher values move further into the over-relaxation region, and can result in poor behaviour. Lower values increase the Reynolds number and tend to cause problems with stability. The bulk viscosity has a default value which is equal to whatever shear viscosity has been selected. Higher values of the bulk viscosity may be set independently and can help to suppress large deviations from incompressibility and maintain numerical stability in certain situations.

If fluctuating hydrodynamics is wanted, set the value of the switch isothermal_fluctuations to on. The associated temperature is in lattice units: reasonable values (at \(\rho_0 = 1\)) are \(0 < kT < 0.0001\). If the temperature is too high, local velocities will rapidly exceed the Mach number constraint and the simulation will be unstable.