Can't use insert/rate/region

Submitted by laudari on Thu, 10/28/2021 - 12:42

Hello guys, apologies if the question is repeated here.
I have been trying to simulate two types of particles through inclined surface. I don't want to use `.stl` file to define surface for particles insertion points.

I want to use cylindrical region and insert particles from that region.

When I use the `insert.stl` then it works but when I remove insertion cad and use region with

`fix ins nve_group insert/rate/region seed 32452867 distributiontemplate pdd1 &`

It gives error.

I checked previous discussion and tried to define variable ` step+1 . Furthermore added `start ${setp+1}` in fix comand.
But no luck.

You can see my script below:

Any help or suggestion would be appreciated.

And one more thing,

Is it possible to save particles 1 simulation in one folder and particles 2 in another folder?
How can I save like this?

```
#Simple inclined flow test

atom_style granular
atom_modify map array
boundary f f f
newton off

communicate single vel yes
units si
region reg block -0.5 0.1 -0.2 0.2 -0.4 0.15 units box
create_box 2 reg

neighbor 0.002 bin
neigh_modify delay 0

#Material properties required for new pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 2 0.7 0.7 0.7 0.7
fix m4 all property/global coefficientFriction peratomtypepair 2 0.5 0.5 0.5 0.5
fix m5 all property/global k_finnie peratomtypepair 2 0.5 0.5 0.5 0.5

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

timestep 0.00001

fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
###################################################################################
#Import mesh
fix cad all mesh/surface/stress file meshes/inclined.stl type 1 wear finnie
#fix inface all mesh/surface file meshes/insertion_face.stl type 1
fix granwalls all wall/gran model hertz tangential history mesh n_meshes 1 meshes cad

###########primitive wall#######################################################

fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane -0.5
fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 0.1
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane -0.2
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.2
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane -0.4
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.15
#fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.05 0. 0.

#distributions for insertion
fix pts1 all particletemplate/sphere 15485863 atom_type 1 density constant 2500 radius constant 0.0015
fix pts2 all particletemplate/sphere 15485867 atom_type 2 density constant 2500 radius constant 0.0015
fix pdd1 all particledistribution/discrete 32452843 2 pts1 0.5 pts2 0.5

#fix pdd1 all particledistribution/discrete 32452843 1 pts1 1.0

#region and insertion
group nve_group region reg
region bc cylinder z 0.0 0.0 0.015 0.05 0.12 units box
#region bc cylinder z 0.0 0.0 0.012 0.01 0.05 units box

##########################################################################################################
#apply nve integration to all particles that are inserted as single particles

fix integr nve_group nve/sphere

#output settings, include total thermal energy
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo 10004
thermo_modify lost ignore norm no

#variable step equal step
#variable startStep equal ${step}+1
################################################################################
#particle insertion

fix ins nve_group insert/stream seed 32452867 distributiontemplate pdd1 &
nparticles 6000 massrate 0.1 insert_every 1000 overlapcheck yes all_in no vel constant 0.0 0.0 -1.0 &
insertion_face inface

#fix ins nve_group insert/rate/region seed 32452867 distributiontemplate pdd1 &
nparticles 6000 massrate 0.1 insert_every 1000 start ${startStep} overlapcheck yes all_in no #vel constant 0.0 0.0 -1.0 &
insertion_face region bc ntry_mc 10000

########################################################################################

#insert the first particles so that dump is not empty
run 1
dump dmp all custom/vtk 200 post/chute_*.vtk id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
dump dumpstress all mesh/gran/VTK 200 post/mesh_*.vtk stress wear cad

#insert particles
run 100000 upto
unfix ins

```

jachueire | Thu, 11/25/2021 - 16:28

Hi try removing "insertion_face" from the insert/rate/region command.

laudari | Tue, 12/07/2021 - 08:31

It soesn't work, I also tried to add region bc n insert command.
Any idea?