Dear lammps users：
I am doing a static tension simulation, and want to achieve unloading by using the “fix addforce” command. At every step I unload 1% of the total stress—v_groupallzz and then perform energy minimization via the “minimie” command. The manual said that the energy keyword is required and -Grad(E)=F, so I define the energy as v_energy2.
Part of my code is:
Compute dis all displace/atom
Variable atomdis equal c_dis
Variable j loop 100
Variable forcedown equal “v_groupallzz-v_groupallzz/100*v_j”
Variable energy2 equal -v_atomdis*v_forcedown
Fix relax mobile addforce 0 0 v_forcedown energy v_energy2
Minimize 1e-25 1e-25 5000 10000
LAMMPS reports the following error message:
Error: variable for fix addforce is invalid style.
I have two questions:
In every step the added force is a constant vector, and do I need to define the energy keyword? Since the manual said the energy keyword is not allowed If the added force is constant.
V_atomdis is an atom style variable, so v_energy2 is an atom style variable. Then why the variable for fix addforce is invalid style?
Any help will really be appreciated. Thank you in advance.