about the example of 2d indenter simulation

Hi everyone,

I am studying the example of 2d indenter simulation, and there is one part that I cannot understand.

variable k equal 1000.0/xlat

variable y equal "13.0ylat - stepdt0.02ylat"

fix 4 all indent $k sphere 10 v_y 0 5.0

As the commands listed above, in the fix indent command, the parameters of the indent are defined by variables. However, why k ($k) and y (v_y) use different types of equal variables, and what are meanings of choosing those variable types?

Kind regards,

MC.

Hi everyone,

I am studying the example of 2d indenter simulation, and there is one part that I cannot understand.

variable k equal 1000.0/xlat

variable y equal “13.0ylat - stepdt0.02ylat”

fix 4 all indent $k sphere 10 v_y 0 5.0

As the commands listed above, in the fix indent command, the parameters of the indent are defined by variables. However, why k ($k) and y (v_y) use different types of equal variables, and what are meanings of choosing those variable types?

The variable type is the same, only the expansion is different. With $k the value of the variable is expanded immediately, while v_y is expanded whenever the fix is invoked. You can see the difference when running lammps with -echo screen. For more details re-read the variable command documentation.

Axel