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.
boundary f f p
newton off off
communicate single vel yes
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
variable vel equal 1e2
variable dt equal 3.2e-11
variable deform equal “-(v_vel * v_dt)”
variable deformrate equal “v_deform/v_dt”
neighbor 10e-5 bin
pair_style gran/hertz/history 146520146520 180995475113 5e-5 0 0.5 0
pair_coeff * *
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_style custom step press
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
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.
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.
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.
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.