fix ave/spatial/diffuse#

Syntax#

fix ID group-ID ave/spatial/diffuse Nevery Nrepeat Nfreq dim origin delta [other ave/spatial keywords...] Ds [value]
  • ID, group-ID are documented in fix command

  • ave/spatial/diffuse = style name of this fix command

  • Nevery, Nrepeat, Nfreq = use input values every this many timesteps to calculate spatial averages

  • dim = x or y or z

  • origin = lower or center or upper or coordinate value (distance units)

  • delta = thickness of spatial bins in dim (distance units)

  • Ds = obligatory keyword

  • value = diffusion coefficient for the solver

Examples#

fix cg all ave/spatial/diffuse 1 1 25000 x lower 0.1 y lower 0.1 z lower 0.1 units box file post/diffuse_cg_ Ds 0.05

Description#

This command is an extension of the standard fix ave/spatial command. It computes 1D, 2D, or 3D spatial averages of particle properties. Additionally, it applies a diffusion equation to the resulting fields by solving a Conjugate Gradient system over the generated bins. This effectively provides a smoothed, coarse-grained grid representation of properties such as volume fraction and velocity fields.

The math engine operates on the global grid after all spatial binning is reduced across processors, so it is fully compatible with dynamic load balancing (e.g., fix balance).

All syntax, rules, and optional keywords are identical to the standard fix ave/spatial command, with one strict requirement: the Ds keyword and its value must always be the very last two arguments in the command.

Restart, fix_modify, output, run start/stop, minimise info#

Same as the standard fix ave/spatial command.

Restrictions#

The number of bins in each dimension must be greater than or equal to the number of MPI processors mapped to that dimension. If this condition is not met, an error is generated.