2D Couette flow

Submitted by en9apr on Thu, 05/18/2017 - 19:42

Hello,

I am new to LIGGGHTS, so I tried to modify a tutorial example for a granular flow to create a 2D Couette flow. This is the example I am modifying:

https://www.cfdem.com/media/DEM/docu/Section_input_script.html#an-exampl...

I have got so far with the modifications, but I hit a problem. When I try and convert the dimension to 2D using this line:

dimension 2

The error message appears:

ERROR: Fix particletemplate/sphere (id pts1): this fix is for 3D simulations only (../fix_template_sphere.cpp:75)

I have tried several alternatives, such as lattice, create_atoms, but these result in segmentation faults.

My question is: what is the 2D equivalent of these three lines?:

fix pts1 all particletemplate/sphere 12345787 atom_type 1 density constant 2500 radius constant 0.25
fix pdd1 all particledistribution/discrete 17903 1 pts1 1.0
fix ins all insert/pack seed 123457 distributiontemplate pdd1 vel constant 0.0 0.0 0.0 &
insert_every once overlapcheck yes all_in yes particles_in_region 1800 region reg

Kind regards,

Andrew

-----

#Contact model example
dimension 2
atom_style granular

atom_modify map array
boundary p m p
newton off
communicate single vel yes
units si
region reg block 0.0 50.0 0.0 40.0 0.0 1.0 units box
create_box 1 reg
neighbor 0.2 bin
neigh_modify delay 0

#Material properties required for pair style
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.95
fix m4 all property/global coefficientFriction peratomtypepair 1 0.05
pair_style gran model hertz tangential history
pair_coeff * *
timestep 0.001
fix wall1 all wall/gran model hertz tangential history primitive type 1 yplane 0.0
fix wall2 all wall/gran model hertz tangential history primitive type 1 yplane 40.0

fix pts1 all particletemplate/sphere 12345787 atom_type 1 density constant 2500 radius constant 0.25
fix pdd1 all particledistribution/discrete 17903 1 pts1 1.0
fix ins all insert/pack seed 123457 distributiontemplate pdd1 vel constant 0.0 0.0 0.0 &
insert_every once overlapcheck yes all_in yes particles_in_region 1800 region reg

#apply nve integration to all particles
fix integr all nve/sphere

#output settings, include total thermal energy
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
dump dmp all custom 800 post/dump*.results id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius

#insert particles and run
run 5000

msandli | Thu, 05/18/2017 - 21:51

This is just a guess, but I would bet that LIGGGHTS doesn't even officially support 2D simulations any more. This command is probably just a holdover from the LAMMPS code. There are still a few snippets of code leftover from LAMMPS, but they are slowly whittling them away.

That being said, the official documentation shows that there is a "fix enforce2d" command. This fix supposedly maintains the z-position of all the particles in a group. IF this command is still active, you might be able to use it to run a pseudo-2D simulation: you would still be using spherical particles, but your simulation could be only 1 layer thick. Obviously, this only works if all of your particles are the same size (and the fix enforce2D command is still supported as well, which I doubt is true).

The code you listed has a z-direction that is only twice the diameter of the particles, making this problem almost 2D already. I would just change the dimension to 3 and run it. You will hopefully learn a lot more by seeing a code run successfully than by chasing error messages.

Also, I may be missing something, but I don't see any forces or gravity in your code. If that's the case, once inserted, your particles will just sit there, or bounce off each other due to overlapping on insertion, but there won't be a Couette flow. You need to make one of your walls move to model this type of flow.