ERROR: Please increase the number of atom types in the 'create_box' command to match the number of atom types you use in the sim

Submitted by limone on Wed, 08/30/2017 - 12:00

Dear All,

I am trying to perform a simulation similar to the ErgunTestMPI test, but with a different geometry than the cylinder showed in the tutorial. My geometry comes from three STL files. created with a CAD. From the STL files (inlet.stl, outlet.stl, wall.stl) I generated a volumetric mesh, employing the "snappyHexMesh", and I run successfully the CFD part. The inlet gas is also moving the DEM particles, which means that the CFDEM coupling is working. During the simulations I have noticed that I forgot to delete the walls in the DEM, I mean the cylinder's walls from the tutorial (I modified the ErgunTestMPI tutorial scripts). Therefore I added the three stl files, as here showed:

--------------------------------------------------------------------------
fix zwalls1 all mesh/surface file ../DEM/meshes/inlet.stl type 2 scale 0.001
fix zwalls2 all mesh/surface file ../DEM/meshes/outlet.stl type 2 scale 0.001
fix cylwalls all mesh/surface file ../DEM/meshes/wall.stl type 2 scale 0.001
--------------------------------------------------------------------------

Once I added the new STL walls inside the scripts "in.liggghts_run" and "in.liggghts_run" in the "DEM" folder, I got the following error message during the simulation run "./Allrun.sh":

--------------------------------------------------------------------------
Resetting global state of Fix contacthistory Style contacthistory from restart file info
Resetting per-atom state of Fix contacthistory Style contacthistory from restart file info
ERROR: Please increase the number of atom types in the 'create_box' command to match the number of atom types you use in the simulation (../properties.cpp:122)
Primary job terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:
Process name: [[189,1],1]
Exit code: 1
simulation finished? ...press enter to proceed
--------------------------------------------------------------------------

Any suggestion ??

I just remind that the CFD-DEM coupling (and therefore the command "./Allrun.sh") works correctly if I keep the walls of the tutorial, which are not STL files. For further information here following I reported all the "./Allrun.sh" output (the error message is at the end).

Thank you All for your help.
Best,
Limone

[user@limone ErgunTestMPI2c]$ ./Allrun.sh
mesh was built before - using old mesh
LIGGGHTS init was run before - using existing restart file
************************************
using userdefined CFDEM_SRC_DIR = /home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/src
using userdefined CFDEM_SOLVER_DIR = /home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/applications/solvers
using userdefined CFDEM_DOC_DIR = /home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/doc
using userdefined CFDEM_UT_DIR = /home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/applications/utilities
using userdefined CFDEM_TUT_DIR = /home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials
using userdefined CFDEM_LAMMPS_LIB_DIR = /home/cfdemuser/LIGGGHTS/LIGGGHTS-PUBLIC/src/../lib
using userdefined CFDEM_LIGGGHTS_LIB_PATH = /home/cfdemuser/LIGGGHTS/LIGGGHTS-PUBLIC/src
using userdefined CFDEM_ADD_LIBS_DIR = /home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/src/lagrangian/cfdemParticle/etc/addLibs_universal
using userdefined CFDEM_ADD_LIBS_NAME = additionalLibs_3.0.x
using userdefined CFDEM_LIB_DIR = /home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/platforms/linux64GccDPInt32Opt/lib
using userdefined CFDEM_USER_LIB_DIR = /home/cfdemuser/CFDEM/cfdemuser-PUBLIC-3.0.x/platforms/linux64GccDPInt32Opt/lib
using userdefined CFDEM_APP_DIR = /home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/platforms/linux64GccDPInt32Opt/bin
using userdefined CFDEM_USER_APP_DIR = /home/cfdemuser/CFDEM/cfdemuser-PUBLIC-3.0.x/platforms/linux64GccDPInt32Opt/bin
************************************
Decomposing case.
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 3.0.x-ac3f6c67e02f
Exec : decomposePar -force
Date : Aug 30 2017
Time : 11:35:15
Host :
PID :
Case : /home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials_LO/cfdemSolverPiso/ErgunTestMPI2c/CFD
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Decomposing mesh region0

Removing 4 existing processor directories
Create mesh

Calculating distribution of cells
Selecting decompositionMethod simple

Finished decomposition in 4.56 s

Calculating original mesh data

Distributing cells to processors

Distributing faces to processors

Distributing points to processors

Constructing processor meshes

Processor 0
Number of cells = 1621277
Number of faces shared with processor 1 = 17733
Number of faces shared with processor 2 = 18089
Number of processor patches = 2
Number of processor faces = 35822
Number of boundary faces = 52304

Processor 1
Number of cells = 1618763
Number of faces shared with processor 0 = 17733
Number of faces shared with processor 3 = 18058
Number of processor patches = 2
Number of processor faces = 35791
Number of boundary faces = 52053

Processor 2
Number of cells = 1618763
Number of faces shared with processor 0 = 18089
Number of faces shared with processor 3 = 17782
Number of processor patches = 2
Number of processor faces = 35871
Number of boundary faces = 52189

Processor 3
Number of cells = 1621277
Number of faces shared with processor 1 = 18058
Number of faces shared with processor 2 = 17782
Number of processor patches = 2
Number of processor faces = 35840
Number of boundary faces = 52182

Number of processor faces = 71662
Max number of cells = 1621277 (0.0775916% above average 1.62002e+06)
Max number of processor patches = 2 (0% above average 2)
Max number of faces between processors = 35871 (0.111635% above average 35831)

Time = 0

Processor 0: field transfer
Processor 1: field transfer
Processor 2: field transfer
Processor 3: field transfer

End

do nothing.

// run_parallel_cfdemSolverPiso_ErgunTestMPI_CFDDEM //

/home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials_LO/cfdemSolverPiso/ErgunTestMPI2c/CFD

rm: cannot remove ‘couplingFiles/*’: No such file or directory
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 3.0.x-ac3f6c67e02f
Exec : cfdemSolverPiso -parallel
Date : Aug 30 2017
Time : 11:35:28
Host :
PID :
Case : /home/cfdemuser/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials_LO/cfdemSolverPiso/ErgunTestMPI2c/CFD
nProcs : 4
Slaves :
3
(
)

Pstream initialized with:
floatTransfer : 0
nProcsSimpleSum : 0
commsType : nonBlocking
polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

PISO: Operating solver in PISO mode

Reading field p

Reading physical velocity field U
Note: only if voidfraction at boundary is 1, U is superficial velocity!!!

Reading momentum exchange field Ksl

Reading voidfraction field voidfraction = (Vgas/Vparticle)

Creating density field rho

Reading particle velocity field Us

Reading/calculating face flux field phi

Generating interstitial face flux field phiByVoidfraction

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
No finite volume options present

Reading g
Selecting locateModel engine
Selecting dataExchangeModel twoWayMPI
Starting up LIGGGHTS for first time execution
Executing input script '../DEM/in.liggghts_run'
LIGGGHTS (Version LIGGGHTS-PUBLIC 3.7.0, compiled 2017-08-14-11:14:06 by cfdemuser, git commit c449f30b63c5eec5c8053a67dccd892fe2c5cef2)
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
version 3 7
version 3 7
version 3 7
Reading restart file ...
WARNING: Restart file version does not match LIGGGHTS version (../read_restart.cpp:507)
--> restart file = Version LIGGGHTS-PUBLIC 3.7.0, compiled 2017-08-14-11:07:09 by cfdemuser, git commit c449f30b63c5eec5c8053a67dccd892fe2c5cef2
--> LIGGGHTS = Version LIGGGHTS-PUBLIC 3.7.0, compiled 2017-08-14-11:14:06 by cfdemuser, git commit c449f30b63c5eec5c8053a67dccd892fe2c5cef2
version 3 7
WARNING: Restart file used different 3d processor grid (../read_restart.cpp:587)
orthogonal box = (-0.015 -0.015 -0.001) to (0.015 0.015 0.0554)
2 by 2 by 1 MPI processor grid
10000 atoms

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.0553
# fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.01385 0. 0.

# Import STL file from CAD
fix zwalls1 all mesh/surface file ../DEM/meshes/inlet.stl type 2 scale 0.001

Reading STL file '../DEM/meshes/inlet.stl' (mesh processing step 1/3)
fix zwalls2 all mesh/surface file ../DEM/meshes/outlet.stl type 2 scale 0.001

Reading STL file '../DEM/meshes/outlet.stl' (mesh processing step 1/3)
fix cylwalls all mesh/surface file ../DEM/meshes/wall.stl type 2 scale 0.001

Reading STL file '../DEM/meshes/wall.stl' (mesh processing step 1/3)

# Use the imported mesh as granular wall
fix geometry all wall/gran model hertz tangential history mesh n_meshes 3 meshes zwalls1 zwalls2 cylwalls

# cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
nevery as specified in LIGGGHTS is overriden by calling external program (../cfd_datacoupling_mpi.cpp:77)
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 explicit dragforce
compute explDrag all reduce update_on_run_end yes sum f_dragforce[1] f_dragforce[2] f_dragforce[3]

# sum of explicit and implicit drag force given from CFD to DEM
variable totalDragX equal f_cfd2[1]
variable totalDragY equal f_cfd2[2]
variable totalDragZ equal f_cfd2[3]

# explicit drag force given from CFD to DEM
variable explicitDragX equal c_explDrag[1]
variable explicitDragY equal c_explDrag[2]
variable explicitDragZ equal c_explDrag[3]

variable time equal step*dt
fix extra all print 10 "${time} ${explicitDragX} ${explicitDragY} ${explicitDragZ} ${totalDragX} ${totalDragY} ${totalDragZ}" file ../DEM/post/forces.txt title "# time expDrag(X Y Z) totDrag(X Y Z)"

# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol c_centerOfMass[3] c_explDrag[1] c_explDrag[2] c_explDrag[3] f_cfd2[1] f_cfd2[2] f_cfd2[3]
thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
WARNING: Changing thermo_temp compute object. This object is deprecated and will be removed in the future. (../compute.cpp:159)

# 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
WARNING: Changing thermo_temp compute object. This object is deprecated and will be removed in the future. (../compute.cpp:159)
WARNING: Changing thermo_temp compute object. This object is deprecated and will be removed in the future. (../compute.cpp:159)
WARNING: Changing thermo_temp compute object. This object is deprecated and will be removed in the future. (../compute.cpp:159)
# #dump dmp all custom/vtk 5000 ../DEM/post/dump_liggghts_run.*.vtk id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius

# Create imaging information
dump dumpstl all stl 1000 ../DEM/post/dump*.stl
dump dmp all custom 1000 ../DEM/post/dump*.liggghts_run id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
#dump dmp all custom/vtk 1000 ../DEM/post/dump_liggghts_run.*.vtk id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
undump dumpstl

run 0
Resetting global state of Fix contacthistory Style contacthistory from restart file info
Resetting per-atom state of Fix contacthistory Style contacthistory from restart file info
ERROR: Please increase the number of atom types in the 'create_box' command to match the number of atom types you use in the simulation (../properties.cpp:122)
-------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
-------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

Process name: [[189,1],1]
Exit code: 1
--------------------------------------------------------------------------
simulation finished? ...press enter to proceed

alice's picture

alice | Wed, 08/30/2017 - 13:35

Hello limone,
as the error message in the end ( Please increase the number of atom types in the 'create_box' command to match the number of atom types you use in the simulation ) states, it seems that you use more material types than declared with the create_box command (have a look at the liggghts init file). I assume that you find a 1 next to create_box, however, you used type 2 when importing the meshes:
fix zwalls1 all mesh/surface file ../DEM/meshes/inlet.stl type 2 scale 0.001
If you want to use multiple materials, you'll have to declare this in the liggghts init script and then define the parameters as well. (An example for the usage of 2 materials can be found in LIGGGHTS/examples/LIGGGHTS/Tutorials_public/sph_2).
Cheers,
Alice

limone | Wed, 08/30/2017 - 16:51

Hello Alice!

Thank you very much for your support! Problem solved!

It was a mistake in the "create_box" and in the "fix zwalls1 all mesh/surface......".
Now I am successfully using the following setup in "in.liggghts_run" and "in.liggghts_run":

--------------------------------------------------------------------------
# Define your Region
region reg block -0.120 0.120 -0.120 0.120 -0.001 0.570 units box
create_box 1 reg

# Import STL file from CAD
fix zwalls1 all mesh/surface file ../DEM/meshes/inlet.stl type 1
fix zwalls2 all mesh/surface file ../DEM/meshes/outlet.stl type 1
fix cylwalls all mesh/surface file ../DEM/meshes/wall.stl type 1

# Use the imported mesh as granular wall
fix geometry all wall/gran model hertz tangential history mesh n_meshes 3 meshes zwalls1 zwalls2 cylwalls
--------------------------------------------------------------------------

Note: I did not use the wall feature "scale 0.001", since my STL files are already in "meters", as I need.

Best regards!
Lemon