Simulation box not deforming with fix deform command

Hi all,

I am trying to deform the simulation box at the same time as I apply I force. But I am not able to find out why the fix deform command in my code is not giving the desired results. Any suggestions are welcome.

Initialization

units si
boundary f f p
atom_style sphere
dimension 2
newton off off
communicate single vel yes

Atom Definition

region openbox block 0 0.01 0 0.01 0 14e-4 units box
create_box 1 openbox
create_atoms 1 random 100 3 openbox units box
set region openbox diameter 14e-4 density 1700

#variables
variable vel equal 1e2
variable dt equal 3.2e-11
variable deform equal “-(v_vel * v_dt)”
variable deformrate equal “v_deform/v_dt”

#Settings
neighbor 10e-5 bin
pair_style gran/hertz/history 146520146520 180995475113 5e-5 0 0.5 0
pair_coeff * *
timestep 3.2e-11
run_style verlet
fix 1 all wall/reflect xlo EDGE xhi EDGE ylo EDGE yhi EDGE
fix 2 all nve/limit 6e-6
fix 3 all momentum 1 angular
fix def all deform 1 y variable v_deform v_deformrate remap none units box
fix comp all wall/gran 146520146520 180995475113 5e-5 0 0.5 0 yplane 0 0.01 shear x 1e2
compute new all temp
compute 1 all pressure new
dump 1 all xyz 500 random1.xyz
thermo 500
thermo_style custom step press
run 12000

Hi all,

I am trying to deform the simulation box at the same time as I apply I
force. But I am not able to find out why the fix deform command in my code
is not giving the desired results. Any suggestions are welcome.

what are you asking here? that fix deform is not deforming the box as
you intend? or that this deformation is not producing the expected
result?

axel.

I require the fix deform to deform my simulation box which is what I expect to reflect in the results along with the fix wall/gran force acting on the atoms as well. I hope its clearer now.

Regards,
Muthukumar

I require the fix deform to deform my simulation box which is what I expect
to reflect in the results along with the fix wall/gran force acting on the
atoms as well. I hope its clearer now.

no.

hi,

it’s just a guess, but it could be a problem that you have set “remap none” in your fix deform. but i don’t know.

also, maybe you could simplify your code a little bit - what you do is defining variables that use other variables and then you use these variables in your fixes. this makes it not obvious where the problem could be. using actual numbers would for testing would perhaps simplify things quite a bit.

best,

niktia

If you have a wall, why do you need fix deform?

I am trying to achieve compression of the atoms within the simulation box. I thought fix deform along with a force would help me achieve this. Fix wall/gran alone would not let me do this if I understand correctly.

Thanks,
Muthu

I’d check the lammps repository for this; there was a thread on this exact subject in the past month. Here’s a link to one from a former coworker of mine, http://lammps.sandia.gov/threads/msg09753.html. I would clearly state what it is you want to achieve in future e-mails, and what is occuring. I am still not clear; you have shearing walls and want compression.

You can check the box bounds in a dump file
to see if the box is deforming. The remap option
on fix deform specifies how the atoms respond
to the deformation - you need to read it carefully.

Steve