Syntax:
fix ID custom Nfreq style action args ... action args ...
Examples:
variable dvec particle (x+y)/2.0 custom particle create dvec double 0 custom surf create temp double 0 create vstream double 3
fix 1 custom 1000 particle set dvec v_dvec air NULL fix 1 custom 10000 surf file surf.temp.* 1 temp file surf.vstream.* 3 vstream[1] vstream[2] vstream[3] fix 1 custom 10000 surf file surf.flow.* 4 temp vstream[1] vstream[2] vstream[3]
See examples using many of the custom and fix custom command actions in examples/custom
Description:
Reset one or more custom attributes for particles, grid cells, or surface elements. This operation is performed once every Nfreq timesteps.
The syntax for actions and their arguments are the same as for the custom command with two differences.
First, only the set, file, and file/coarse actions are supported for this fix. The create and remove actions are not, since they do not make sense to perform multiple times during a run.
Second, the file and file/coarse actions take a filename as an argument. The filename must contain a wildcard "*" character which will be replaced by the timestep. This is to allow a sequence of files to be read during the simulation. The filename wildcard "*" cannot be used with the custom command.
All of the actions supported by this command reset the values of custom attribute(s) which must already exist. See the custom and read_surf and read_grid commands for different ways to define and initialize custom attributes.
Note that the resetting of attributes by this fix takes place at the end of timesteps determined by Nfreq. If custom attributes are output by a dump command on the same timestep, that takes place after this fix has performed the reset. This means that if this fix and a dump command both reset/output every 1000 steps, then a dump file snapshot for step 3000 could include custom attributes which were reset at the end of step 3000. But the new attribute values will not influence particles or grid cells or surface elements until the following step 3001 and beyond.
Also note that this command DOES NOT reset attribute values at the beginning of any run, even if an input script contains multiple run commands. For example, if Nfreq = 1000 and the input script performs a series of 10000-step runs, then no resetting of attributes takes place (due to this command) on timestep 0, before the first run. Likewise, between runs, this command DOES reset attribute values at the end of the last step (10000, 20000, etc) of each run, but DOES NOT reset them again before the first step of the next run.
IMPORTANT NOTE: If needed, resetting of custom values can be performed before the first run or between runs using the custom command.
IMPORTANT NOTE: If Nfreq triggers the reading of a file on the last step of the last run in the input script, then the wildcard-substituted filename (explained below) must exist. This is the case, even though the new values will have no effect in the current input script, since there are no subsequent timestep operations which will use them. Note, however that if a restart file is written on the last timestep, or following the last run, the updated custom values will be written to the restart file.
Restrictions: none
Related commands:
custom, mixture, group, region
Default: none