The next command will do a loop but its not a loop
within a run with timestepping. Thus it makes no
sense to define a fix N/2 times on odd steps and
another fix N/2 times on even steps. Fixes are
defined before a run takes place.
variable t loop ${nts}
label loop
print "t"
variable f equal 0.05+{alpha}sin(${con}$t)
print “$f” # line 1
fix 4 flow addforce f 0.0 0.0 # line 2
run 1
unfix 4
next t
jump equil.in loop
print “out of the loop now”
Using the definition of ‘f’ in line 1 or line 2 produces an error “Group ID in variable formula does not exist”. Where am I going wrong?
Run your script with -echo screen and figure out what
line is producing the error. That line is an incorrect
variable. Also there is a difference between
using ${con} in a variable vs v_con. Read the doc
page on variables to learn about it.