deleting atoms

Submitted by andybond13 on Thu, 08/06/2015 - 19:52

Hello,

I'm creating a simulation with CFDEMcoupling, but I think this is more of a LIGGGHTS question. My goal is to have a tube (cross-section in XY, length in Z) with a vertical fluid flow in the Z direction. I'm inserting particles in the tube, which may drift to the top. I would like to delete the particles when they get "stuck" to the top wall. I've put in two delete_atom commands, but neither seems to be working the way I expect them to (or at all). Here's the code:

in.liggghts_init

# Pour granular particles into chute container, then induce flow
echo both
atom_style granular
atom_modify map array
communicate single vel yes
boundary m m m
newton off
units si

region reg block -0.015 0.015 -0.015 0.015 -0.001 0.151 units box
create_box 1 reg
neighbor 0.001 bin
neigh_modify delay 0

# Material properties required for granular pair styles

fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5

# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *

# timestep, gravity
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0

# walls
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553 #0.1500
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.01385 0. 0.

# particle distributions and insertion
region bc cylinder z 0.0 0.0 0.012 0. 0.055 units box
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2000 radius constant 0.0005
fix pdd1 all particledistribution/discrete 1 1 pts1 1.0

fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. 0. insert_every once overlapcheck yes all_in yes particles_in_region 1000 region bc

# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere

# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes

# insert the first particles so that dump is not empty
run 1
dump dmp all custom 5000 post/dump.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]
#cell id : f_couple_cfd[7]

run 10000 upto
write_restart post/restart/liggghts.restart

_________________________________________________________________
in.liggghts_run:

# Pour granular particles into chute container, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt

atom_style granular
atom_modify map array
communicate single vel yes

boundary m m m
newton off

units si
processors 2 2 1

# read the restart file
read_restart ../DEM/post/restart/liggghts.restart

neighbor 0.0005 bin
neigh_modify delay 0

# Material properties required for granular pair styles

fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5

# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *

# timestep, gravity
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0

# walls
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
#fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.1
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.01385 0. 0.

# change the particles density
set group all density 2000

#delete atoms that collect at top
region outlet cylinder z 0. 0. 0.01385 0.01 0.0553 units box
#region outlet cylinder z 0. 0. radius low high
delete_atoms region outlet compress yes

# cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force/implicit
#fix cfd2 all couple/cfd/force/accumulator RongDrag 10 1.5e-3
#fix cfd2 all couple/cfd/force/implicit/accumulated #CrankNicolson 0.5

# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere

# center of mass
compute centerOfMass all com

# compute total dragforce
compute dragtotal all reduce sum f_dragforce[1] f_dragforce[2] f_dragforce[3]

# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol c_centerOfMass[3] c_dragtotal[1] c_dragtotal[2] c_dragtotal[3]
thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes

dump dmp all custom 5000 ../DEM/post/dump*.liggghts_run id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius

run 1

region outlet2 cylinder z 0. 0. 0.01385 0.01 0.0553 units box
#region outlet cylinder z 0. 0. radius low high
delete_atoms region outlet2 compress yes

Thanks for any insight you can provide!

andybond13 | Thu, 08/06/2015 - 19:55

Note that I've defined the outlets (where to try to delete) as : "region outlet2 cylinder z 0. 0. 0.01385 0.01 0.0553 units box"

I think something from z = 0.05 to 0.0553 would be more reasonable for my goal, so I tested z = 0.01 to 0.0553 and still got no deletion.

richti83's picture

richti83 | Mon, 08/10/2015 - 10:58

the problem is, that delete_atom is a command, this means it is only invoced once the parser read the line.
You can use run every 1 "delete_atom .." in normal, uncoupled operation, I don't know exactly how to use it when OF controls the simulation flow.

$caseDir/CFD/constant/liggghtsCommands (allows to execute a LIGGGHTS command during a coupled simulation).

http://www.cfdem.com/media/CFDEM/docu/CFDEMcoupling_Manual.html#1_3

Another possebility is to use fix massflow mesh .. delete atoms yes which will delete atoms which flow through a defined stl plane. this should work in coupled operation too.
http://www.cfdem.com/media/DEM/docu/fix_massflow_mesh.html

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

ZhaochenJiang | Thu, 02/18/2016 - 10:19

I also have a problem in CFDEM coupling. I want to delete the atoms after contact happens.

Now I want to use
delete_atoms overlap ...
But meet some problems in liggghtsCommands.

Is there some fix commands suitable for my case? Do you have some ideas for this problem?

Thank you!

Best regards,

Zhaochen

Zheng Hu | Sat, 11/11/2017 - 08:36

Dear Daniel,

I am also focusing on deleting atoms in my CFDEM coupling. I used the liggghtsCommandModel_execute command with the " fix massflow mesh" but I found in the coupling process, the atoms cannot be deleted at every step of LIGGGHTS. Therefore there are still some particles flowing around the calculation areas. Could you please show me how to delete atoms that get across a mesh wall at every step but not at every coupling time? Many thanks.

Zheung

andybond13 | Tue, 08/11/2015 - 15:11

The suggestion to use "fix massflow mesh" worked for me!

I have not yet had the chance to use the liggghtsCommandModel_execute command to make it happen, and I might not since I have it working acceptably. Thanks all!