I want to exert force increasing with time. And a loop as showed

for loop

label forloop
variable i loop 200
fix 3 upper setforce 0.0 0.0 (i-1)*(-0.4994)
thermo_style custom step etotal pe ke temp
run 10000
next i
jump in.cntzc forloop

is used. But the result is not correct. What’s wrong with it. How to correct the code. Thank you.


fix 3 upper setforce 0.0 0.0 (i-1)*(-0.4994)

Why would you think this command would work?
Nothing on the fix setforce page indicates that it would.

You can define an equal-style variable with your formula in it,
and use the variable name in the fix setforce command.
The variable and fix setforce doc page explain how
to do this.