Lost Atoms Error

Good Day Lammps Users

I trust you are well.
I am an engineering student investigating the behavior of duplex steel. I have performed simulations using the Fe-Cr and Fe-Cr-Ni files provided by the interatomic potential repository and they all worked fine. The duplex steel however is alloyed with nitrogen that produces significant effects when the steel is isothermally aged. I found a potential file for the Fe-Cr-Ni-N behavior developed by Ke Tong and a few other authors (see attached files) but the moment I run the script with this potential file, lots of atoms get lost

I read in the LAMMPS manual and previous mailing lists that it might be due to bad dynamics such as huge velocities and forces. I tried placing stricter tolerances on the minimize function, increased simulation box, and reduced the simulation timestep but the simulation only takes longer to give the same error result.

Could anyone advise me on what might be the problem? I am running the simulation on an intel core i3 8th gen. Thank you for your time

Please see code below and attached potential files

units metal
dimension 3
boundary p p p
atom_style atomic

region whole block 0 70 0 70 -2 2
create_box 4 whole

region upper block INF INF INF INF INF INF units box

#create Fe atoms
lattice bcc 2.935
create_atoms 1 region whole

#create Cr atoms
lattice bcc 3.224 origin 0.30 0.30 0.30
create_atoms 2 region whole

#create Ni atoms
lattice fcc 3.499 origin 0.65 0.65 0.65
create_atoms 3 region whole

#create N atoms
lattice hcp 4.039 origin 0.85 0.85 0.85
create_atoms 4 region whole

pair_style meam
pair_coeff * * library.meam Fe Cr Ni N FeNiCrN.meam Fe Cr Ni N

Equilibrium

reset_timestep 0
timestep 0.009

minimize 0.0 1.0e-3 1000 10000

velocity all create 300 23456 mom no rot no

fix 1 all npt temp 300 300 100 iso 1.01 1.01 1000
run 20000
unfix 1

fix 1 all npt temp 300 775 100 iso 1.01 1.01 1000
run 500000
unfix 1

thermo 10000
thermo_style custom step temp

print “Equilibrium reached”

#isothermal ageing
fix 1 all npt temp 775 775 1000 iso 1.01 1.01 1000

thermo 10000
thermo_style custom step temp

dump 1 all custom 5000 dump.FeNiCrN.* id xs ys zs

thermo 10000
thermo_style custom step temp

run 60000

FeNiCrN.meam (4.85 KB)

library.meam (771 Bytes)

another source of problems are bad potential parameters.
the name of your .meam parameter file suggests, that you should “extract” elements from the library.meam file in a different order.
in the second .meam file parameters are addressed with numerical indices (1-based) so the order of elements after the first .meam file matters a lot.
the mapping to LAMMPS atom types is only done after the second .meam file.

please see the documentation for pair style meam/c for details.

axel.

Thank you so much for the feedback.

I corrected the pair_coeff line to ‘pair_coeff * * library.meam Ni Fe Cr N NiFeCrN.meam Ni Fe Cr N’ and changed the name of the second .meam file. I also changed the order in which I defined the atoms so that each atom type would match the parameter file.

#create Ni atoms
lattice fcc 3.499 origin 0.65 0.65 0.65
create_atoms 1 region whole

#create Fe atoms
lattice bcc 2.935
create_atoms 2 region whole

#create Cr atoms
lattice bcc 3.224 origin 0.30 0.30 0.30
create_atoms 3 region whole

#create N atoms
lattice hcp 4.039 origin 0.85 0.85 0.85

create_atoms 4 region whole.

The simulation now runs pass the minimization step where it gave the ‘Lost atoms’ error before and proceeds to run the first npt. However, after just 30 steps the temperature goes from 300K to a temperature of a magnitude x10^8 ( see attached log file). From the npt command and to the end of the input script the code is exactly the same as when I ran the Fe-Cr-Ni file, which worked. Would the error still lie with the potential file or is there be something completely wrong with my code?

Kind Regards

log.lammps (3.99 KB)

Thank you so much for the feedback.

I corrected the pair_coeff line to ‘pair_coeff * * library.meam Ni Fe Cr N NiFeCrN.meam Ni Fe Cr N’ and changed the name of the second .meam file. I also changed the order in which I defined the atoms so that each atom type would match the parameter file.

this makes no sense. simply changing:

pair_coeff * * library.meam Fe Cr Ni N FeNiCrN.meam Fe Cr Ni N

into:

pair_coeff * * library.meam Fe Ni Cr N FeNiCrN.meam Fe Cr Ni N

should have done the trick, assuming that the FeNiCrN.meam file was named properly.

changing the name of the second meam file is a BAD idea, if you are not also changing the indices.

axel.

I see your concern.

When I copied the potential data from the internet and made a potential file I mistakenly saved it as FeNiCrN when the name should have been NiFeCrN. This name matches the indices in the parameter file. But even with this correction, the temperatures skyrockets.

Kind Regards

then the cause is most likely that your initial geometry is very bad. now that i look at it, it does - in fact - make no sense.
are overlaying different lattices, which will cause close contacts at the box boundaries and also create a far too dense system.

then running fix npt to compensate for that is a very bad idea, since nose-hoover thermostats and barostats are good for systems that are already in equilibrium bad rather bad to remove large amounts of kinetic energy or pressure quickly. furthermore, your time constants are huge, so they are not very effective to begin with.

what kind of system is it that you want to create? do you want a regular lattice structure and are the atom proportions the way you want them to be? or do you want to build an alloy?

if this is meant to construct an alloy, the typical approach would be to pick a suitable lattice constant for the whole alloy and then create just atoms of type 1 for all lattice positions and then change a suitably computed fraction of the remaining atoms of that type 1 to the next type.

axel.