diff --git a/doc/fix_indent.html b/doc/fix_indent.html index 89f61fe843..1481bff711 100644 --- a/doc/fix_indent.html +++ b/doc/fix_indent.html @@ -13,13 +13,13 @@
Syntax:
-fix ID group-ID indent k keyword values ... +fix ID group-ID indent K keyword values ...
sphere args = x y z R x,y,z = initial position of center of indenter (distance units) R = sphere radius of indenter (distance units) + any of x,y,z,R can be a variable (see below) cylinder args = dim c1 c2 R dim = x or y or z = axis of cylinder c1,c2 = coords of cylinder axis in other 2 dimensions (distance units) R = cylinder radius of indenter (distance units) + any of c1,c2,R can be a variable (see below) plane args = dim pos side dim = x or y or z = plane perpendicular to this dimension pos = position of plane in dimension x, y, or z (distance units) + pos can be a variable (see below) side = lo or hi - vel args = vx vy vz - vx,vy,vz = velocity of center of indenter (velocity units) - rstart value = R0 - R0 = sphere or cylinder radius at start of run (distance units) - R is value at end of run, so indenter expands/contracts over time side value = in or out in = the indenter acts on particles inside the sphere or cylinder out = the indenter acts on particles outside the sphere or cylinder @@ -52,7 +50,8 @@
Examples:
-fix 1 all indent 10.0 sphere 0.0 0.0 15.0 3.0 vel 0.0 0.0 -1.0 +fix 1 all indent 10.0 sphere 0.0 0.0 15.0 3.0 +fix 1 all indent 10.0 sphere v_x v_y 0.0 v_radius side in fix 2 flow indent 10.0 cylinder z 0.0 0.0 10.0 units boxDescription: @@ -67,21 +66,26 @@ must set one of those 3 keywords.
A spherical indenter exerts a force of magnitude
-F(r) = - k (r - R)^2 +F(r) = - K (r - R)^2-on each atom where k is the specified force constant, r is the +
on each atom where K is the specified force constant, r is the distance from the atom to the center of the indenter, and R is the radius of the indenter. The force is repulsive and F(r) = 0 for r > -R. The calculation of distance to the indenter center accounts -for periodic boundaries, which means the indenter can effectively -straddle one or more periodic boundaries. +R.
A cylindrical indenter exerts the same force, except that r is the distance from the atom to the center axis of the cylinder. The -cylinder extends infinitely along its axis. The calculation of -distance to the indenter axis accounts for periodic boundaries, which -means the indenter can effectively straddle one or more periodic -boundaries. +cylinder extends infinitely along its axis. +
+Spherical and cylindrical indenters account for periodic boundaries in +two ways. First, the center point of a spherical indenter (x,y,z) or +axis of a cylindrical indenter (c1,c2) is remapped back into the +simulation box, if the box is periodic in a particular dimension. +This occurs every timestep if the indenter geometry is specified with +a variable (see below), e.g. it is moving over time. Second, the +calculation of distance to the indenter center or axis accounts for +periodic boundaries. Both of these mean that an indenter can +effectively move through and straddle one or more periodic boundaries.
A planar indenter is really an axis-aligned infinite-extent wall exerting the same force on atoms in the system, where R is the @@ -93,24 +97,46 @@ towards the hi end of the box and atoms with a coordinate higher than the plane's current position will feel no force. Vice versa if side is specified as hi.
-If the vel keyword is specified, the center (or axis or position) of -the spherical (or cylindrical or planar) indenter will move during the -simulation, based on its initial position (x,y,z), the specified -(vx,vy,vz), and the time elapsed since the beginning of the -simulation. For periodic systems and spherical or cylindrical -indenters, the new position of the center or axis is wrapped back into -the periodic box as needed. See the note below about making the -indenter move continuously across multiple runs. +
Any of the 4 quantities defining a spherical indenter's geometry can +be specified as an equal-style variable, namely x, y, +z, or R. Similarly, for a cylindrical indenter, any of c1, +c2, or R, can be a variable. For a planar indenter, pos can be +a variable. If the value is a variable, it should be specified as +v_ID, where ID is the variable ID. In this case, the variable will be +evaluated each timestep, and its value used to define the indenter +geometry.
-If the rstart keyword is specified, then the radius of the indenter -is a time-dependent quantity. This only applies to spherical or -cylindrical indenters. R0 is the value assigned at the start of the -run; R is the value at the end. At intermediate times, the radius is -linearly interpolated between these two values. This option can be -used, for example, to grow/shrink a void within the simulation box. -See the note below about making the radius change continuously across -multiple runs. +
Note that equal-style variables can specify formulas with various +mathematical functions, and include thermo_style +command keywords for the simulation box parameters and timestep and +elapsed time. Thus it is easy to specify indenter properties that +change as a function of time or span consecutive runs in a continuous +fashion. For the latter, see the start and stop keywords of the +run command and the elaplong keyword of thermo_style +custom for details.
+For example, if a spherical indenter's x-position is specfied as v_x, +then this variable definition will keep it's center at a relative +position in the simulation box, 1/4 of the way from the left edge to +the right edge, even if the box size changes: +
+variable x equal "xlo + 0.25*lx" ++Similarly, these variable definitions will move the indenter at a +constant velocity: +
+variable x0 equal 2.5 +variable vx equal 5.0 +variable x equal "v_x0 + step*dt*v_vx" ++If a spherical indenter's radius is specified as v_r, then these +variable definitions will grow the size of the indenter at a specfied +rate. +
+variable r0 equal 0.0 +variable rate equal 1.0 +variable r equal "v_r0 + step*dt*v_rate" +If the side keyword is specified as out, which is the default, then particles outside the indenter are pushded away from its outer surface, as described above. This only applies to spherical or @@ -121,15 +147,27 @@ is now a containing wall that traps the particles inside it. If the radius shrinks over time, it will squeeze the particles.
The units keyword determines the meaning of the distance units used -to define the indenter. A box value selects standard distance units -as defined by the units command, e.g. Angstroms for units -= real or metal. A lattice value means the distance units are in -lattice spacings. The lattice command must have been -previously used to define the lattice spacing. Note that the units -choice affects not only the indenter's physical geometry, but also its -velocity and force constant since they are defined in terms of -distance as well. +to define the indenter geometry. A box value selects standard +distance units as defined by the units command, +e.g. Angstroms for units = real or metal. A lattice value means the +distance units are in lattice spacings. The lattice +command must have been previously used to define the lattice spacing. +Note that the units keyword only affects indenter geometry parameters +specified directly with numbers, not those specified as variables. In +the latter case, you should use the xlat, ylat, zlat keywords of +the thermo_style command if you want to include +lattice spacings in a variable formula.
+The force constant K is not affected by the units keyword. It is +always in force/distance^2 units where force and distance are defined +by the units command. If you wish K to be scaled by the +lattice spacing, you can define K with a variable whose formula +contains xlat, ylat, zlat keywords of the +thermo_style command, e.g. +
+variable k equal 100.0/xlat/xlat +fix 1 all indent $k sphere ... +Restart, fix_modify, output, run start/stop, minimize info:
No information about this fix is written to binary restart @@ -146,17 +184,13 @@ indenter), which can be accessed by various commands. The scalar and vector values calculated by this fix are "extensive".
-This fix can adjust the indenter position and radius over multiple -runs, using the start and stop keywords of the run -command. See the run command for details of how to do -this. If you do not do this, the indenter position and readius will -be reset to their specified initial values at the beginning of each -run. -
The forces due to this fix are imposed during an energy minimization, -invoked by the minimize command. The rstart keyword -does not change the indenter radius during an energy minimization; the -indenter always has a radius of its final value R in that case. +invoked by the minimize command. Note that if you +define the indenter geometry with a variable using a time-dependent +formula, LAMMPS uses the iteration count in the minimizer as the +timestep. But it is almost certainly a bad idea to have the indenter +change its position or size during a minimization. LAMMPS does not +check if you have done this.
IMPORTANT NOTE: If you want the atom/indenter interaction energy to be included in the total potential energy of the system (the quantity @@ -169,6 +203,6 @@ being minimized), you must enable the fix_modify
Default:
-The option defaults are vel = 0,0,0, side = out, and units = lattice. +
The option defaults are side = out and units = lattice.