Hi,
I am woking on coupling lammps with a fully resolved Fictitious Domain
solver using the 9Dec version and lammps fortran interface. I am using
lammps to treat particle collision and using GRANULAR package with
gran/hooke/history.
My question is whether it is possible that for periodic boundaries at
the end of a run particle positions obtained by the library function
"lammps_gather_atoms(lmp_ptr, 'x', 3, lmp_x)" be slightly out of the
simulaiton box?
I am running lammps on a single processor and following is a snapshop of
lammps output between fluid time steps t and t+\Delta t when a particle
crosses a periodic boundary (2D domain xlo=0 xhi=2, ylo=0. yhi =6.0).
(this is obtained by command "run 21" and positions are extracted from
lammps using "lammps_gather_atoms" after the run command exits)
!===================================================================
Before lammps Linear Velcoities: 6.8615993020974698E-010
-10.910218268587260 0.0000000000000000
Before lammps Positions: 1.0000000000159333
1.9904247208472519E-003 0.0000000000000000
Before lammps Angular Velocity: 0.0000000000000000
0.0000000000000000 -3.9954605749067614E-009
Before lammps Image Flags: 0 0 0
Setting atom values ...
1 settings made for image
Setting up run ...
Memory usage per processor = 6.52013 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 0 0 0
0
21 0 0 0 0
0
Loop time of 7.89165e-05 on 1 procs for 21 steps with 1 atoms
Pair time (\) = 1\.78814e\-05 \(22\.6586\)
Neigh time \() = 0 (0)
Comm time (\) = 1\.69277e\-05 \(21\.4502\)
Outpt time \() = 5.96046e-06 (7.55287)
Other time (%) = 3.8147e-05 (48.3384)
Nlocal: 1 ave 1 max 1 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 1 ave 1 max 1 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 0
Dangerous builds = 0
After lammps Linear Velcoities: 6.8615993020974698E-010
-10.910218268587260 0.0000000000000000
After lammps Positions: 1.0000000000164462
-6.1922389805964670E-003 0.0000000000000000
After lammps Angular Velocity: 0.0000000000000000
0.0000000000000000 -3.9954605749067614E-009
After lammps Image Flags: 0 0 0
!======================================================================
There is no force acting on the particle and the position is updated as
expected by y=y_0+v_y\Delta t. \Delta is the fluid time step size
(=0.00075) and lammps time step size is ~ 0.05 \Delta t.
But the image flags are not set at the end of this run and y coordinate
is not mapped into the domain (y = -6.1922389805964670E-003 < ylo =
0.0). However for the next time step (for time t+\Delta t to t+2\Delta 2
marched with seperate "run 21" command) the correct behaviour is
observed i.e. image flags are set as
After lammps Image Flags: 0 -1 0
and the particles are mapped into the domain:
After lammps Positions: 1.0000000000169591 5.9856141301821575
0.0000000000000000
So my question is how this might happen and how I can enforce "my
expected behaviour" at the end of every run command.
Thank you
Sina