Dear LAMMPS users,
I wonder whether the if command is executed every step of the simulation.
I use as following commands to define the variable avelo which is a function of step.
variable astep equal step
if “${astep}<=10” then &
“variable avelo equal 1” &
else &
“variable avelo equal 2”
and I output the variable avelo using the thermal_style command.
I expected that the value of the variable avelo should be 1 for step 0-10 and be 2 for steps larger than 1. But in my log file, it shows the value of the variable avelo equals to 1 at each step. It seems to me that the if statement is only executed at the first step. I wonder how the if command works. Thanks.
Han Hu
Complex Fluids and Multiphase Transport Lab
Mechanical Engineering and Mechanics Department
Drexel University
Hess Engineering Research Laboratories
hh398@…1685…, edenkira@…92…