Dpd thermostat error

I am using the lastest LAMMPS to simulate a 3D couette flow.

When I run the file, I get the following error.

Error: Lost Atom: Original 4800 Current 4799 (src/thermo.cpp:481)

Please help me.

# DPD 3-d flow simulation

# Initialization
dimension          3
boundary           p p f

atom_style         atomic
units              lj
comm_modify vel yes
neighbor           0.3 bin
neigh_modify       delay 5

# create geometry
lattice            fcc 0.81
region             box block 0 10 0 10 0 12
create_box         3 box
create_atoms       2 box

mass               1 1.0
mass               2 1.0
mass               3 1.0

# LJ potentials
pair_style         dpd 1.0 1.0 419084618
pair_coeff         * *  1.0  1.0 2.5

# define groups
region            1 block INF INF INF INF INF 1
group             lower region 1
region            2 block INF INF INF INF 11 INF
group             upper region 2
group             boundary union lower upper
group             flow subtract all boundary

set	              group lower type 1
set	              group upper type 3

# initial velocities
#compute	      mobile flow temp
compute           mobile flow temp/partial 1 1 1
velocity          all create 1.0 4928459 dist gaussian
fix               integrator all nve
fix               2 flow temp/rescale 100 1.0 1.0 0.02 1.0
fix_modify        2 temp mobile

# Couette flow

thermo		           100
thermo_modify	       temp mobile

velocity          lower set 0.0 0.0 0.0
velocity          upper set 0.0 0.0 0.0
fix               3 boundary setforce 0.0 0.0 0.0

#run
dump              1 all  atom  5  dump2.flow
run               5000

timestep          0.005
velocity          upper set 2.0 0.0 0.0
velocity          lower set -2.0 0.0 0.0
run               60000
fix               4 flow ave/spatial 100 10 2000 z 0.0 4.0 vx ave running file vel.profile
run               40000

This is almost impossible to guess. This error could be due to bad dynamics, bad topology, or to a bad choice of velocity. You will have to investigate.

This is not a useful description. “Latest” can mean different things to different people and it changes over time, so people that look at this post in the archives in a few months (or years?) will not know what version you are referring to. “Lastest” can also be the git develop branch or the latest feature release, or the lastest update to the stable release. So it is generally better, to look at the output of lmp -h and copy the version string it prints there.

When you cut-n-paste and input file, please always place it in triple backquotes (```) so the formatting of the forum software will not try to interpret special characters are markup.

This is a conceptual error. Unlike the LJ potential, the DPD interaction is not highly repulsive but is a “soft” potential without a discontinuity at r=0, so atoms can move “through” your wall particles and leave the box, which causes the error you see.

If you change the bondary in z from “f” to “m” and visualize the resulting trajectory, you can easily see that.

This is a very bad idea in two ways:

  • fix temp/rescale should not be used for anything serious
  • your DPD pair style already contains a thermostat, using two thermostats on the same atoms usually leads to bogus results.