fix ave/euler command

Syntax

fix ID group-ID ave/euler nevery N cell_size_{relative,absolute} c parallel par keywords values
  • ID, group-ID are documented in fix command

  • ave/euler = style name of this fix command

  • nevery = obligatory keyword

  • n = calculate average values every this many timesteps

  • cell_size_relative or cell_size_absolute = obligatory keyword

  • c = cell size in multiples of max cutoff or distance units

  • parallel = obligatory keyword

  • par = “yes” or “no”

  • zero or more keyword/value pairs may be appended

  • keyword = basevolume_region, use_voronoi_volume

    • basevolume_region values = reg-ID

      • reg-ID = correct grid cell volume based on this region

  • use_voronoi_volume values = yes or no

    • use Voronoi cells to correct grid cell volumes

Examples

fix 1 all ave/euler nevery 100 cell_size_relative 4.5
fix euler all ave/euler nevery 100 cell_size_absolute 0.03

Description

Calculate cell-based averages of velocity, radius, volume fraction, and pressure (-1/3 * trace of the stress tensor) every few timesteps, as specified by the nevery keyword. There are two ways to define the cell size: cell_size_relative computes the cell size as a multiple of the maximum force cutoff, with a minimum of cell_size_relative 1. With cell_size_absolute, the user can define the cell size directly in distance units. Note that also using cell_size_absolute, the cell size cannot be made smaller than the maximum force cutoff.

Note that velocity is favre (mass) averaged, whereas radius is arithmetically averaged. To calculate the stress, this command internally uses a compute stress/atom . It includes the convective term correctly for granular particles with non-zero average velocity (which is not included in compute stress/atom). However, it does not include bond, angle, dihedral or kspace contributions.

Note

Forces computed via the cohesion bond model are technically part of the pair style, and hence contribute to the stress tensor.

The contribution of particle i to the stress tensor then reads

S_{ab}^i =
- \left[
m \left( v_a^i - \bar{v}_a \right)  \left( v_b^i - \bar{v}_b \right)
+ \frac{1}{2} \sum_{j=1}^{N_p} \left( r_a^i F_b^i  + r_a^j F_b^j \right)
\right]

where \bar{v} is the (cell-based) average velocity. The first term is a kinetic energy contribution for atom i. The second term is a pairwise energy contribution where j loops over the Np neighbors of atom i, r_i and r_j are the positions of the two atoms in the pairwise interaction, and F_i and F_j are the forces on the two atoms resulting from their pairwise interaction. The resulting, cell-based stress tensor is the sum of the above values divided by the cell volume.

The parallel option determines if every process allocates its own local grid for postprocessing (for parallel = yes), or each proc contributes to one single global grid (for parallel = no). This will be slower since it requires parallel communication, but will ensure that the grid cells do not move over time (e.g. in case of a moving boundary)

The basevolume_region option allows to specify a region that represents the volume which can theoretically be filled with particles. This will then be used to correct the basis of the averaging volume for each cell in the grid. For example, if you use a cylindrical wall, it makes sense to use an identical cylindrical region for the basevolume_region option, and the command will correctly calculate the volume fraction in the near-wall cells. the calculation of overlap between grid cells and the region is done using a Monte-Carlo approach.

The use_voronoi_cells option can be used to correct the grid cell volume. A fix voronoi/atom needs to exist in the simulation, and needs to have use_meshes = yes set. Then, for each grid cell the sum of all Voronoi volumes is computed. If the sum is smaller than the grid cell volume, it will be used instead of the cell volume.


Restart, fix_modify, output, run start/stop

No information about this fix is written to binary restart files. None of the fix_modify options are relevant to this fix.

This fix computes the above-mentioned quantities for output via a dump euler/vtk command. The values can only be accessed on timesteps that are multiples of nevery since that is when calculations are performed.

No parameter of this fix can be used with the start/stop keywords of the run command.

Restrictions

Volume fractions and stresses are calculated based on the assumption of a structured (equidistant regular) grid, so volume fractions and stresses near walls that are not aligned with the grid will be incorrect.

Coarse-graining information:

Using coarsegraining in combination with this command might lead to different dynamics or system state and thus to inconsistencies. However, the influence of this model on the global dynamics or system state might be small so in some cases the results may be valid. This has to be reviewed by a specialist on a case-by-case basis.