Atoms of the plates has crossed the boundary

  1. Sir i had made a structure in which have two plates and a tool. when i minimize the energy, the atoms crossed the boundary when i took the periodic boundary condition. Cant understand how to stop this.

---------- Initialize Simulation ---------------------

units metal
atom_style atomic

---------- Create Atoms ---------------------

dimension 3
boundary p p p
lattice fcc 4.02
region allbox block -30 30 -25 60 0 20
create_box 4 allbox

#fix 1 tool rigid single
mass 1 26.981539
mass 2 55.845
mass 3 183.84
mass 4 183.84

---------- Define Interatomic Potential ---------------------

pair_style eam/alloy
pair_coeff * * FeNiCrCoAl-heaweight.setfl.txt Al Fe Fe Fe
pair_coeff * * FeW.eam.alloy.txt Fe Fe W W

#--------------------------------- Equilibration/Minimization ---------------------------------#
velocity all create 298.0 12345 rot no dist gaussian units box
fix 2 all nve temp 298.0 298.0 0.01 iso 0.0 0.0 0.5
thermo_modify lost ignore flush yes

thermo 100
thermo_style custom step time pe ke etotal temp lx ly lz press atoms
dump 1 all cfg 1000 AlFe1.*.cfg mass type xs ys zs
dump_modify 1 element Al Fe W W
log log.equilibr_1
timestep 0.001
run 5000
restart 15000 eqfile.restart
unfix 2
undump 1

  1. But when i use the boundary condition “shrink”. The structure extends.
    Sir please anyone suggests, how can i deal with this situation.
    i also use with shrink, fix wall

fix walls all wall/reflect zlo EDGE ylo 0 units box

Is it this difficult to Please Read This First: Guidelines and Suggestions for posting LAMMPS questions?
Besides, it doesn’t take much to realise that your code is not formatted correctly. Here is how it should look, had you look the rules before posting.

# --- Initialize Simulation 
units metal
atom_style atomic

# --- Create Atoms
dimension 3
boundary p p p
lattice fcc 4.02
region allbox block -30 30 -25 60 0 20
create_box 4 allbox

# --- Plate left side
lattice fcc 4.02
region liner block -30 0 0 60 0 10
group lineg region liner
region leftr block -30 -10 0 60 0 10
group leftg region leftr
create_atoms 1 region liner

# --- Plate rigth side
lattice bcc 2.856
region rightr block 0.5 42 0 85 0 14
group rightg region rightr
create_atoms 2 region rightr

# --- toolpin
lattice bcc 3.615
region pin cylinder z 0 -6.5 5.6 2 11
group ping region pin
create_atoms 3 region pin

# --- toolshoulder
lattice bcc 3.615 #W
region shoulder cylinder z 0 -6.5 16.7 11.3 18
group shoulderg region shoulder
create_atoms 4 region shoulder

# --- completetool
region centg union 2 pin shoulder
group tool region centg
mass 1 26.981539
mass 2 55.845
mass 3 183.84
mass 4 183.84

# --- Define Interatomic Potential 
pair_style eam/alloy
pair_coeff * * FeNiCrCoAl-heaweight.setfl.txt Al Fe Fe Fe
pair_coeff * * FeW.eam.alloy.txt Fe Fe W W

# --- Equilibration/Minimization 
velocity all create 298.0 12345 rot no dist gaussian units box
fix 2 all nve temp 298.0 298.0 0.01 iso 0.0 0.0 0.5
thermo_modify lost ignore flush yes
thermo 100
thermo_style custom step time pe ke etotal temp lx ly lz press atoms
dump 1 all cfg 1000 AlFe1.*.cfg mass type xs ys zs
dump_modify 1 element Al Fe W W
log log.equilibr_1
timestep 0.001
run 5000
restart 15000 eqfile.restart
unfix 2
undump 1

Also, it would be useful to post the EAM potential files that you want to use in your simulation. I am no expert in the EAM potential, but the manual states:

Only a single pair_coeff command is used with the eam/alloy style which specifies a DYNAMO setfl file, which contains information for M elements. These are mapped to LAMMPS atom types by specifying N additional arguments after the filename in the pair_coeff command, where N is the number of LAMMPS atom types:
• filename
• N element names = mapping of setfl elements to atom types

Therefore, I would expect that the second pair_coeff command overrides the first one, and you effectively are simulating a system where atom types 1-2 are Fe and 3-4 are W.

Besides, your sample looks cool!

Thank you very much sir, for your prompt reply. Sorry for the inconvenience. Next time before posting the question I will read and then post my question.

sir as per your suggestion i am using single potential file know, but the same problem exist.
my atoms crossing the boundary. If i use shrink command the structures shrinks.

---------- Define Interatomic Potential ---------------------

pair_style eam/alloy

pair_coeff * * FeNiCrCoCu-heamix.eam.alloy.txt Cu Cu Fe Fe
FeNiCrCoCu-heamix.eam.alloy.txt (1.7 MB)
Sir please, if u can tell me. What mistake I am doing in this.

I haven’t run your simulation, but I guess if this command doesn’t trigger any error, then you are simply dissipating the potential energy in the initial configuration and what you observe is melting of your system.
You could also make the effort to format your scripts, there is a handy </> button for you to use.

These two lines contradict each other (the second will wipe out the effect of the first) and also both are inconsistent with the “mass” commands further above. Fortunately for you, the EAM potential files have the atom mass embedded and thus will overwrite the values from your mass commands.

This line is complete nonsense. Everything after “nve” is ignored. If you do what a thermostat and the “temp” keyword, then you should use fix nvt, and then, there is not pressure coupling (which doesn’t make sense in your system anyway), so “iso” has to go, too.

Why this? For your system, there is no good reason to ignore lost atoms. Those are usually a sign for a simulation with bad simulation settings.

First of all, this is a topic for discussion with your adviser/supervisor/mentor/tutor/etc. It is not really a LAMMPS issue whether you have periodic boundaries or not, but rather that is a choice that you have to make according to the properties and requirements of your project. We don’t know what those are. We can only help with technical aspects.

In general, the atoms in the system will go where the forces tell them to go. For testing, it is usually a good idea to output thermo data more frequently and observe what happens. In your case, the temperature “explodes” almost instatly by a factor of 10.

Per MPI rank memory allocation (min/avg/max) = 149.3 | 149.3 | 149.3 Mbytes
   Step          Time          PotEng         KinEng         TotEng          Temp            Lx             Ly             Lz           Press         Atoms   
         0   0             -689536.81      7475.4453     -682061.36      298            241.2          341.7          80.4          -12980.762         194070 
       100   0.1           -775571.82      84942.157     -690629.67      3386.121       241.2          341.7          80.4          -15377.099         194070 
       200   0.2           -777078.94      86456.218     -690622.72      3446.4774      241.2          341.7          80.4          -4580.488          194070 
       300   0.3           -780292.95      89671.921     -690621.03      3574.6676      241.2          341.7          80.4           3829.9253         194070 
       400   0.4           -779689.26      89066.387     -690622.87      3550.5287      241.2          341.7          80.4           13231.693         194070 

That means that your geometry and your force field do not match. Atoms are not in a geometry where they are comfortable. Instead they are squeezed together and thus react instantly after being set free with the MD run.

So first and foremost, you need to construct and initial geometry that is commensurate with the elements you are simulating. That is just common sense and - even though you flagged this as a beginner question - I feel a bit silly pointing such an obvious thing out.

As some more general advice, you need to be more careful and make your choices for a reason and check them carefully. Perhaps you have not spent enough time studying how to do MD and understanding tutorials and text books. I suggest you do a bit more of that and also practice with simpler systems.

As I mentioned, your geometry does not match the kind of atoms. The high potential energy of your system can be removed to a large degree, by first relaxing the system with a minimization.

The wrapping around of atoms is to be expected, since you put your system right next to a boundary. Thus those wrapped around atoms are from the next periodic copy and the system itself remains intact.

To understand what is going on it helps to visualize the system with some of the periodic copies shown. See the attached image.

thanks sir