update_particle command
Warning
GPU support for this command has not been tested and may not work as expected.Syntax
update_particle keyword/value pairs
The following keyword/value pairs are obligatory:
id command-ID = user-assigned name for the command call (used for referencing this command in the variable command) property value = property-ID p-ID = valid ID of the fix property/atom that should be added to mode value = one of the following: add = add the value to the particle property set = set the value to the particle property value values = val val = value to use (constant or equal-style variable)
Zero or more of the following keyword/value pairs may be appended:
update_every_time = dt dt = once or time interval between two consecutive updates [default: every time step] start_time = t0 t0 = time to start executing the update command [default: start of first simulate command] stop_time = t1 t1 = time to stop executing the update command scale value = one of the following: constant = do not scale value [default] area = multiply value with particle (frontal) area volume = multiply value with particle volume inverse_mass = divide value by particle mass inverse_volume = divide value by particle volume use_as_rate value = 'yes' or 'no' [default: 'no'] yes = Use the value as a rate; divide it among the number of selected particles no = Use the value for each selected particle particle_group value = group-ID group-ID = ID of the group of particles to apply this command to [default: all] region value = region-ID region-ID = ID of region particles must be in to have their property updated [default: whole domain] surface = surface-ID surface-ID = ID of a detect_surface command criteria = per-atom-variable-ID per-atom-variable-ID = ID of a atom-style variable
Examples
update_particle id setHeat mode set property Temp value 320.
update_particle id addSLC mode add property surfaceLiquidContent value 0.01 surface surf region wetReg use_as_rate yes scale inverse_volume
update_particle id setHeat mode set property Temp value 320. update_every_time 0.01
update_particle id setHeat mode add property Temp value 1. update_every_time once
Description
Depending on the chosen mode, this command allows to set or add the specified value for a particle property (fix property/atom), such as temperature or heat source in conjunction with a command that solves for heat transfer, such as fix heat/gran/conduction. The keyword property expects a valid ID of the fix property/atom that should be updated, and the value defined by the value keyword is set or added each update. The value can either be a constant expression or refer to an equal-style variable. The update frequency, which by default is every time step, can be set by the update_every_time keyword. Valid options are once or a positive time interval (in time units). By setting start_time and stop_time the execution of the update command will happen only within the defined time range.
The keyword scale can be used to define if the value should be added to the property as given (default), or scaled with a specific quantity. Scaling can be performed by multiplication with the (frontal) area of the particle (value * area), the volume of the particle (value * volume), the inverse particle mass (inverse_mass) or the inverse particle volume (inverse_volume). It should be noted that while the volume of a particle is uniquely defined for any particle shape, the (frontal) area is not. Therefore, an equivalent radius is computed from the volume (as if the particle would be spherical), which is then used to determine the area as: equivalent_radius * equivalent_radius * PI. Finally, the use_as_rate keyword can be used to distribute the given value evenly over all particles selected by this command (see below), or just use the value directly for each selected particle (default).
Important
For properties that have a time unit, for example heat source (W/s), the value applied by use_as_rate is multiplied by the timestep. Therefore the value you set will be applied over one time unit.
The keywords particle_group, region, surface and criteria can be used to refine the selection of particles on which the update is applied. If the particle_group keyword is used, the particle must be in the specified group. If the region keyword is used, the particle must be in the specified geometric region. If the surface keyword is used, the particle must be on the surface of the particle bed, as defined by a detect_surface command. Finally, the criteria keyword allows to use any atom-style variable to define the selected particles. As soon as the variable is unequal 0 the particle is selected (except other criteria fail).
Restart, fix_modify, output, run start/stop
This command writes no data to binary restart files. None of the fix_modify options are relevant to this fix. No global scalar or vector or per-atom quantities are stored by this fix for access by various output commands. No parameter of this fix can be used with the start/stop keywords of the run command.
Restrictions
None
Default
scale = constant, use_as_rate = no, update_every_time = time step size start_time = with first simulate command, stop_time = unset (updating until disabled)