Masato Koizumi "Reporting LAMMPS bug in fix deform command"

Dear Dr. Axel Kohlmeyer,

Hello Dr. Kohlmeyer. I would like to report a LAMMPS bug.

I used a “fix deform” command to change my simulation box such that the length of the box follows a triangular sinusoidal path using the following “variable” command. (L0 is the initial box length. Tp is the time period.)

- variable displace equal "v_L0 + (0.5*v_L0)*(1 + (2/PI)*asin(sin((2*PI*(1/v_Tp)*step*dt) - (PI/2))))" - variable rate equal "(2*v_L0*(1/v_Tp))*(-1)^floor(2*(1/v_Tp)*step*dt)"
  • fix 4 all deform 1 x variable v_displace v_rate remap v

However, I obtained an error statement: ERROR: Power by 0 in variable formula (…/variable.cpp:1718)

Since I do not have any variable statemtn that is being powered by zero, I was curious if there is any way to resolve this bug. Thank you, and I also attached my LAMMPS input script.


Masato Koizumi (1.63 KB)

What about your reset_timestep 0 just before starting the deformation? Are you sure your power floor(2*(1/v_Tp)stepdt) that contains step is NEVER equal to zero?