Fix move for harmonic force

Dear LAMMPS developers.

I generated a cluster and want to use ultrasonic waves to break this cluster.
I found the relevant command “fix move” in the lammps documentation and added a simple harmonic force to the wall.
It cant run. Maybe I have used this command incorrectly. But I can’t find any more references to add a correct simple harmonic force. I will be grateful for any suggestion.

My code is attached below


variable        name string pour_into_box                          

atom_style      sphere                                      
units           si                                                  

variable        boxx equal 500e-6                                       
variable        boxy equal 300e-6
variable        boxz equal 500e-6
variable        rlo equal 7e-6                                      
variable        rhi equal 9e-6
variable        dlo equal 2.0*${rlo}                                      

variable        dhi equal 2.0*${rhi}

variable        dens equal 944.3038                                   
variable        skin equal 0.3*${rhi}                               

region          boxreg block  0  ${boxx}   0 ${boxy} 0 ${boxz}   

region          insreg1  block 200e-6 ${boxx} 0 ${boxy} 100e-6 300e-6
region          cyl      block 0 ${boxx} 0 ${boxy} 0 10e-6 side out 
region          wall2      cylinder z 100e-6 150e-6 10e-6 10e-6 30e-6 side out

create_box      1 boxreg                                            
change_box      all boundary f f f                                  
comm_modify     vel yes

pair_style      granular                                            
pair_coeff      1 1 jkr 2.5e8 0.26 0.25 0.005 tangential mindlin 5e6 1.0 0.6 rolling none twisting marshall 

fix             1 all nve/sphere                                    
fix             grav all gravity 10.0 vector 0 0 -1                 
fix             ins1 all pour 1000 1 546876 region insreg1  diam range ${dlo} ${dhi} dens ${dens} ${dens} 

fix             2 all wall/gran/region granular jkr 1e8 0.4 0.3 0.04 tangential mindlin NULL 1 0.7 rolling sds 
                & 5e5 2.5 0.405 twisting marshall region cyl 
fix             3 all wall/gran/region granular jkr 1e8 0.4 0.3 0.04 tangential mindlin NULL 1 0.7 rolling sds 
                & 5e5 2.5 0.405 twisting marshall region wall2 

neighbor        ${skin} bin                                         
neigh_modify    delay 0 every 1 check yes

thermo_style    custom step atoms ke
thermo_modify   lost warn

thermo          100

timestep        5.82e-8

dump            1 all custom 100 ${name}.dump id type radius mass x y z

run             200000

fix             3 wall2 move wiggle 0 0 10e-6 5e-6
run             200000

What do you mean by “it can’t run”?

Dear LAMMPS developers,

when i run it, there is an error.

“ERROR: Could not find fix group ID wall2 (src/modify.cpp:822)
Last command: fix 3 wall2 move wiggle 0 0 10e-6 5e-6 ‘’


You did not define the group wall2.

Dear Mr. Gravelle,

thanks for your reply. I defined wall2 as a wall and defined the contact parameters between it and the particles.
Also, I tried to use wiggle in fix wall/gran to let the cylinder do simple harmonic motion. The code is as follows:

fix 3 all wall/gran granular jkr 1e8 0.4 0.3 0.04 tangential mindlin NULL 1 0.7 rolling sds 5e5 2.5 0.405 twisting marshall zcylinder 20e-6 wiggle z 5e-6 5e-6

I only want to generate wiggle in a local area of the wall, but I can’t define the exact location of the wiggle by using the fix wall/gran command. And when I ran it,there is always an error with “ERROR on proc 0: Non-numeric atom coords - simulation unstable”.

When I use fix wall/gran/region, I can define a exact location of the wiggle, but wiggle cannot be used at the same time as fix wall/gran/region.

I’ll be grateful for any suggestion.


Start with a simpler model and build your system in stages.

What you are discussing is very disjointed and partially incorrect. A few examples:

  • the posted input does include a group wall2, so the error you quote cannot happen
  • when I run your input with a current(!) version of LAMMPS I get this error (ERROR: Insufficient arguments provided for sds model) because your line continuation character ‘&’ is placed wrong.
  • you seem to be misunderstanding what fix move does
  • you can “wiggle” a wall defined with fix wall/gran/region, but for that you have to “wiggle” the region with a (time or timestep dependent) variable.

So I suggest you pick one part of your system and try to model only that.
Then you know exactly due to which change you get errors like the “non-numeric coordinates” one, which is an indication of a very bad model or bad simulation settings.

Due to how you are “jumping around” in your discussion and how you provide inconsistent information, it is impossible to give meaningful advice. You basically make your this needlessly much more complicated by yourself due to how you are setting things up. If you do things in stages, it will become easier to figure out issues by yourself and it will be easier to make suggestion. Please remember to always report which version of LAMMPS you are using when you are reporting problems.

Dear Dr. Akohlmey,

thanks again for your suggestions.