[lammps-users] May be a bug in Variable command

Dear steve

as I asked you last time for how to define variables. I tried the following two options

  1. with loop and equal command

label trial
variable x loop 10
variable t equal add(mult($x,10),300)
fix 3 mobile temp/rescale 10 $t $t 1.0 1.0
fix_modify 3 temp new3d

thermo 100
thermo_modify temp new3d

timestep 0.001
run 1000

unfix 3
next x
jump …/vijay/trial_error/in.10x2x2_cooling trial

  1. with index command

label trial
variable t index 300 310 320 330 340 350 360 370 380 390 400
fix 3 mobile temp/rescale 10 $t $t 1.0 1.0
fix_modify 3 temp new3d

thermo 100
thermo_modify temp new3d

timestep 0.001
run 1000

unfix 3
next x
jump …/vijay/trial_error/in.10x2x2_cooling trial

2nd one is running well, even first one also runnnig but for the next increament as it will become 310+10=320 in my case, which is not coming, it is not taking the incremental value and running continuously for 310 in loop.
If I am doing something wrong kindly let me know.I am using lammps-22Jun07 version…

warm regards

Vijay Kumar Sutrakar

You'll have to try this with the most current, fully patched
version. Variable syntax has changed.

Steve