Creating slope domain in LIGGGHTS

Submitted by JeppeMathDTUStudent on Tue, 05/24/2022 - 10:40

Hi,
I am about to make a simulation where the first part of the domain is nonsloping, but the second part of the of the domain should be sloping. It is a beach where the first part is at constant depth and then the sloped part, where the depth is decreasing until reaching the surface. Is it possible to make such a domain in LIGGGHTS?
I have attached a picture of the domain I want to create.

I have also tried to make a stl part of the surface, but somehow my particles does not "feel" the surface, so they just drop out of my domain. I have a liggghts_init and liggghts_resume file:

liggghts_init:
-------------------------------------------------------------------------
echo both
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt

atom_style granular
atom_modify map array
communicate single vel yes

boundary f f f
newton off

units si

#region reg block -3.5 4.8 -0.22 0.54 0.0 0.1 units box # (M4)
region reg block -3.8 5.0 -0.3 0.8 -0.2 0.2 units box # (M4)

create_box 1 reg

neighbor 0.6 bin
neigh_modify delay 0 binsize 0.6

# 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 -1.0 0.0

# walls
#fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane -3.5
#fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 4.8
#fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane -0.22
#fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.5
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 cad all mesh/surface file /work3/s165039/Forsberg/DEM/Ground2.stl type 1

#fix cad1 all wall/gran model hertz tangential history mesh n_meshes 1 meshes cad

#-------- NEW ---------
#Insertion place
create_atoms 1 single 0.0 -0.1 0.01 units box
create_atoms 1 single 0.0 -0.1 0.02 units box
create_atoms 1 single 0.0 -0.1 0.03 units box
create_atoms 1 single 0.0 -0.1 0.04 units box
create_atoms 1 single 0.0 -0.1 0.05 units box
create_atoms 1 single 0.0 -0.1 0.06 units box
create_atoms 1 single 1.0 -0.1 0.07 units box
create_atoms 1 single 2.0 -0.1 0.08 units box

#Particle properties

set atom 1 diameter 0.003 density 500 vx 0 vy 0 vz 0
set atom 2 diameter 0.003 density 920 vx 0 vy 0 vz 0
set atom 3 diameter 0.003 density 950 vx 0 vy 0 vz 0
set atom 4 diameter 0.003 density 1000 vx 0 vy 0 vz 0
set atom 5 diameter 0.003 density 1150 vx 0 vy 0 vz 0
set atom 6 diameter 0.003 density 1150 vx 0 vy 0 vz 0
set atom 7 diameter 0.003 density 1380 vx 0 vy 0 vz 0
set atom 8 diameter 0.003 density 1380 vx 0 vy 0 vz 0
#-------- NEW ---------

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

# screen output
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 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
dump dmpCAD all mesh/stl 5000 post/Ground*.stl cad
dump dmpParticle all custom 5000 post/dump*.liggghts_init id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius

run 0 upto

write_restart post/restart/liggghts.restart

------------------------------------------------------------

liggghts_resume:
-----------------------------------------------------------
echo both
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt

atom_style granular
atom_modify map array
communicate single vel yes

boundary f f f
newton off

units si
processors 8 1 1

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

neighbor 0.6 bin
neigh_modify delay 0 binsize 0.6

#Material properties required for new 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 -1.0 0.0

# walls
#fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane -3.5
#fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 4.8
#fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane -0.22
#fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 2.0
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 cad all mesh/surface file /work3/s165039/Forsberg/DEM/Ground2.stl type 1

#cfd coupling
fix cfd all couple/cfd couple_every 1 mpi
fix cfd2 all couple/cfd/force/implicit

#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 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol c_centerOfMass[3] c_dragtotal[1] c_dragtotal[2] c_dragtotal[3]
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes

#insert the first particles so that dump is not empty
#dump myDump all stl 5000 post/dump_*.stl
dump dmpCAD all mesh/stl 5000 post/Ground*.stl cad
#run 1
dump dmpParticle all custom 5000 ../DEM/post/dump*.liggghts_resume id type type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius

run 1

Thanks in advance!

Cheers,
Jeppe

AttachmentSize
Image icon udklip.png2.71 KB

JeppeMathDTUStudent | Wed, 05/25/2022 - 12:40

Hi,
Thanks a lot for the reply!
I tried to include a stl file of the surface, which I then tried to load in for my LIGGGHTS script as mentioned above. However, maybe I am doing it wrong, because it seems like my particles does not feel the surface, so they simply just drop out of my domain instead of capturing the sloped surface. Is it wrong to include the geometry as done above?

fix cad all mesh/surface file /work3/s165039/Forsberg/DEM/Ground2.stl type 1

Cheers,
Jeppe

Nico | Wed, 05/25/2022 - 13:39

Hello Jeppe,

The .stl file insertion is fine. But from the code above, it looks like you're not defining the .stl mesh as a wall. You need to insert another line to do this. Something like:

fix wall all wall/gran model hertz tangential history primitive mesh n_meshes 1 meshes cad

Maybe I typed some ID wrong. To understand the code, follow the instructions on the online documentation.

https://www.cfdem.com/media/DEM/docu/fix_wall_gran.html

Cheers

JeppeMathDTUStudent | Wed, 05/25/2022 - 19:19

Hi Nico,
Thanks a lot for the explanation! I thought LIGGGHTS would treat my .stl file as a wall, but you were right, I had to add an extra line to specify my imported .stl file as a wall.

Thanks for the help.

Cheers!