Error in running tutorial

Submitted by nandiga1 on Sun, 02/03/2013 - 19:35

Hi,

1. I was able to install cfdem packages along with LIGGGHTS and OpenFOAM 2.1.x. I had no issues during the installation.

2. I was able to run the cfdemSolverIB tutorial. However, I had the following errors running the EurgentestMPI.

Reading momentum exchange field Ksl

Reading voidfraction field voidfraction = (Vgas/Vparticle)

Creating dummy density field rho

Reading particle velocity field Us

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model laminar

Reading g
Selecting locateModel engine
Selecting dataExchangeModel twoWayMPI
Starting up LIGGGHTS for first time execution
Executing input script '../DEM/in.liggghts_resume'
LIGGGHTS (Version LIGGGHTS-PUBLIC 2.2.4, compiled 2013-01-28-17:26:41 by cmn based on LAMMPS 20 Apr 2012)
Reading restart file ...
WARNING: Restart file version does not match LIGGGHTS version (read_restart.cpp:470)
--> restart file = Version LIGGGHTS-MASTER 2.0.3plusplus, compiled 2012-07-31-11:05:59 by cfdem based on LAMMPS 20 Apr 2012
--> LIGGGHTS = Version LIGGGHTS-PUBLIC 2.2.4, compiled 2013-01-28-17:26:41 by cmn based on LAMMPS 20 Apr 2012
WARNING: Restart file used different # of processors (read_restart.cpp:517)
WARNING: Restart file used different 3d processor grid (read_restart.cpp:530)
orthogonal box = (-0.015 -0.015 -0.001) to (0.015 0.015 0.0554)
2 by 2 by 2 MPI processor grid
ERROR: Invalid improper style (force.cpp:479)
--------------------------------------------------------------------------
mpirun noticed that the job aborted, but has no info as to the process
that caused that situation.
--------------------------------------------------------------------------
~
............................................................................................................................................................

Please let me know what the improper style error meant.

3. I had tried running the fillcylinder example and encountered the following errors.

LIGGGHTS (Version LIGGGHTS-PUBLIC 2.2.4, compiled 2013-01-28-17:47:44 by cmn based on LAMMPS 20 Apr 2012)
Created orthogonal box = (-0.015 -0.015 -0.001) to (0.015 0.015 0.0554)
1 by 1 by 1 MPI processor grid
ERROR: Illegal pair_style gran command, illegal keyword (pair_gran_hooke_history.cpp:511)
starting LIGGGHTS memory optimized parallel post processing
chunksize: 8 --> 8 files are processed per chunk. If you run out of memory reduce chunksize.
Working with 4 processes...
calculating chunks 1 - 1 of 1
aborting due to errors: [Errno 2] No such file or directory: 'dump.liggghts_init'
~

Please let me know why the pair_style command gives an error. Should I change any commands in the LIGGGHTS input file ? Also, I would like to know if there is any documentation on the tutorial and on the coupling between the two packages, viz, OpenFOAM and LIGGGHTS to understand the code structure. Kindly let me know.

Thanks for the help.

Regards,
Vishal

alice's picture

alice | Tue, 02/05/2013 - 13:23

Hello Vishal,
congrats on 1) ;)
concerning 2): the first error-message says that yuor restart file doesn't match the LIGGGHTS-version in use. In case you did not run the Allrun.sh make sure that you run the in.liggghts_init script before running the coupled case. Rerun the case with the new restart file. Just in case you made some changes yourself, be sure that you do not mix input-scripts and executables from different versions.
Now going to 3): You were setting an 1x1x1 processor grid and tried to launch a parallel mpi computation on only one processor. To my knowledge this wouldn't work. Again there seems to be a version conflict as well, please only use the tutorial that come with the software and do not reuse old ones if possible. The notation has changed significantly during the last version-updates.
Cheers,
Alice

nandiga1 | Tue, 02/05/2013 - 20:49

Hi Alice,

Thanks for your prompt reply.

1. I followed your comments for step 2, and the tutorial works fine now. Further, ErgunTestMPI_restart and settlingTestMPI, and packedBedTemp are also working well.

2. I still have issues regarding running the tutorial "cfdemPostproc". As you had pointed out I guess there is an incompatibility due to the version updates. I am using the tutorial that came with the software, and did not modify the file. However, I notice that there is an issue with the definition of the pair style (pair_style gran/hertz/history 1 0 ) and fix wall/gran/hertz/history in the "in.liggghts_init" file.
(fix zwalls all wall/gran/hertz/history 1 0 zplane 0.0 0.0553 1
fix cylwalls all wall/gran/hertz/history 1 0 zcylinder 0.01385 1) as I got the following error.

ERROR: Illegal pair_style gran command, illegal keyword (pair_gran_hooke_history.cpp:511)

I changed the pair_style to "pair_style gran/hertz/history" from "pair_style gran/hertz/history 1 0" and the pair style error is not observed but, we observe the following error.

ERROR: Fix wall/gran/hertz/history (id zwalls): Need to use define style 'mesh' or 'primitive' (fix_wall_gran.cpp:224)

It looks like the fix wall/gran/hertz/history- has to be changed ! I tried changing it to primitive or mesh but does not resolve the issue. I had looked in the LIGGGHTS documentation for fix wall/gran/hertz/history and could not find the primitive type keyword.

Please let me know what changes have to be made. The LIGGGHTS version I am using is "LIGGGHTS (Version LIGGGHTS-PUBLIC 2.2.4, compiled 2013-01-31-17:15:59 by cmn based on LAMMPS 20 Apr 2012)".

3. Finally, I would like to know how does the "runLiggghts" command in the liggghtsCommandModels work. For instance, why does this command execute the in.liggghts_resume file and not the in.liggghts_init. How does it differentiate them ?

Please let me know.

Thanks

Vishal Nandigana

cgoniva's picture

cgoniva | Thu, 02/07/2013 - 10:41

Hi,

@ 1) good to hear
@ 2) please git pull the latest version (yesterday)
@ 3) it is the settings of the dataExchangeModel in CFD/constant/couplingProperties being responsible for loading in.liggghts_resume. runLiggghts is a different story - it simply calls LIGGGHTS to do the DEM steps in between the CFD setps.

Cheers,
Chris

nandiga1 | Thu, 02/07/2013 - 17:15

Hi Chris,

Regarding cfdPostProc. I have installed the latest version using git pull. The LIGGGHTS input script is working fine now. However, I observed that the cfdPostProc solver is missing in the latest version. Hence, I got the following error !!

/home/cmn/CFDEM/CFDEMcoupling-PUBLIC-2.1.x/src/lagrangian/cfdemParticle/etc/functions.sh: line 290: cfdemPostproc: command not found

Can you please update the latest version with this solver.
Thanks
Regards
Vishal

Vishal Nandigana

cgoniva's picture

cgoniva | Thu, 02/07/2013 - 17:32

Hi,

the utility is in the repo (see applications/utilities).

did you compile it? it should be compiled when using cfdemCompCFDEM command???

(did git pull really work? You might need a git stash before?)

Cheers,
Chris

nandiga1 | Thu, 02/07/2013 - 21:44

Hi Chris,

I compiled the cfdPostProc in the utilities folder. The "solvername" was detected during the run , but the program crashed with the following error !!

mesh needs to be built
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.x-0038d7805653
Exec : blockMesh
Date : Feb 07 2013
Time : 14:40:31
Host : "nandi.ceg.uiuc.edu"
PID : 3535
Case : /home/cmn/CFDEM/cmn-PUBLIC-2.1.x/run/cfdemPostproc/fillCylinder/CFD
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Creating block mesh from
"/home/cmn/CFDEM/cmn-PUBLIC-2.1.x/run/cfdemPostproc/fillCylinder/CFD/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Reading patches section

Creating block mesh topology

Reading physicalType from existing boundary file

Default patch type set to empty

Check topology

Basic statistics
Number of internal faces : 8
Number of boundary faces : 14
Number of defined boundary faces : 14
Number of undefined boundary faces : 0
Checking patch -> block consistency

Creating block offsets
Creating merge list .

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 1

Writing polyMesh
----------------
Mesh Information
----------------
boundingBox: (-0.0138 -0.0138 0) (0.0138 0.0138 0.0553)
nPoints: 5225
nCells: 4608
nFaces: 14400
nInternalFaces: 13248
----------------
Patches
----------------
patch 0 (start: 13248 size: 192) name: inlet
patch 1 (start: 13440 size: 192) name: outlet
patch 2 (start: 13632 size: 768) name: wall

End

// run_liggghts_fillCylinder_DEM //

/home/cmn/CFDEM/cmn-PUBLIC-2.1.x/run/cfdemPostproc/fillCylinder/DEM

LIGGGHTS (Version LIGGGHTS-PUBLIC 2.2.4, compiled 2013-01-31-17:15:59 by cmn based on LAMMPS 20 Apr 2012)
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.0554 units box
create_box 1 reg
Created orthogonal box = (-0.015 -0.015 -0.001) to (0.015 0.015 0.0554)
1 by 1 by 1 MPI processor grid

neighbor 0.001 bin
neigh_modify delay 0

#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/hertz/history
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/hertz/history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran/hertz/history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran/hertz/history primitive type 1 zcylinder 0.0138 0. 0. tangential_damping off

#cfd coupling
#fix cfd all couple/cfd

#particle insertion
region bc cylinder z 0.0 0.0 0.012 0.02 0.03 units box
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 200 radius constant 0.001
fix pdd1 all particledistribution/discrete 1. 1 pts1 1.0
Fix particledistribution/discrete (id pdd1): distribution based on mass%:
pts1: d=2.000000e-03 (max. bounding sphere) mass%=100.000000%
Fix particledistribution/discrete (id pdd1): distribution based on number%:
pts1: d=2.000000e-03 (max. bounding sphere) number%=100.000000%

fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. -1. 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 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
run 1
Setting up run ...
INFO: Resetting random generator for region bc
Memory usage per processor = 9.09048 Mbytes
Step Atoms KinEng 1 Volume
0 0 -0 0 5.076e-05
INFO: Particle insertion: inserted 305 particle templates (mass 0.000256) at step 1
- a total of 305 particle templates (mass 0.000256) inserted so far.
WARNING: Particle insertion: Less insertions than requested (fix_insert.cpp:594)
1 305 0.00012777063 0 5.076e-05
Loop time of 0.023236 on 1 procs for 1 steps with 305 atoms

Pair time (%) = 1.5974e-05 (0.0687469)
Neigh time (%) = 0.00040102 (1.72585)
Comm time (%) = 2.86102e-06 (0.0123129)
Outpt time (%) = 8.10623e-06 (0.0348865)
Other time (%) = 0.0228081 (98.1582)

Nlocal: 305 ave 305 max 305 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 1060 ave 1060 max 1060 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 1060
Ave neighs/atom = 3.47541
Neighbor list builds = 1
Dangerous builds = 0
dump dmp all custom 1000 post/dump.liggghts_init id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius

run 3000 upto
Setting up run ...
Memory usage per processor = 9.93088 Mbytes
Step Atoms KinEng 1 Volume
1 305 0.00012777063 0 5.076e-05
1000 305 0.00015403997 0 5.076e-05
2000 305 7.420842e-05 6.4791164e-06 5.076e-05
3000 305 2.0729148e-06 1.9275211e-06 5.076e-05
Loop time of 0.145689 on 1 procs for 2999 steps with 305 atoms

Pair time (%) = 0.0605328 (41.5493)
Neigh time (%) = 0.0182474 (12.5249)
Comm time (%) = 0.0015831 (1.08663)
Outpt time (%) = 0.00514007 (3.52811)
Other time (%) = 0.0601857 (41.3111)

Nlocal: 305 ave 305 max 305 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 1203 ave 1203 max 1203 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 1203
Ave neighs/atom = 3.94426
Neighbor list builds = 57
Dangerous builds = 0
#write_restart liggghts.restart
starting LIGGGHTS memory optimized parallel post processing
chunksize: 8 --> 8 files are processed per chunk. If you run out of memory reduce chunksize.
Working with 4 processes...
calculating chunks 1 - 1 of 1
dump is already unscaled
wrote 1 granular snapshots in VTK format
time needed: 0.0770449638367 sec

// run_cfdemPostproc_fillCylinder_CFD //

/home/cmn/CFDEM/cmn-PUBLIC-2.1.x/run/cfdemPostproc/fillCylinder/CFD

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.x-0038d7805653
Exec : cfdemPostproc
Date : Feb 07 2013
Time : 14:40:31
Host : "nandi.ceg.uiuc.edu"
PID : 3571
Case : /home/cmn/CFDEM/cmn-PUBLIC-2.1.x/run/cfdemPostproc/fillCylinder/CFD
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Reading field p

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

Reading voidfraction field voidfraction = (Vgas/Vparticle)

Reading particle velocity field Us

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model laminar
Selecting locateModel standard
Selecting dataExchangeModel oneWayVTK
relativePath_"../DEM/post"
Selecting IOModel off
Selecting voidFractionModel centre
centreVoidFraction constructor done
Selecting averagingModel dense
Selecting clockModel off
Selecting regionModel allRegion
Selecting meshMotionModel noMeshMotion

CFDEMcoupling version: cfdem-2.4.4

, compatible to LIGGGHTS version: 2.0.4

If BC are important, please provide volScalarFields -imp/expParticleForces-
Selecting forceModel off
Selecting momCoupleModel off

Starting time loop

Time = 0.001

#0 Foam::error::printStack(Foam::Ostream&) in "/home/cmn/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/home/cmn/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 typeinfo for Foam::dataExchangeModel in "/home/cmn/OpenFOAM/cmn-2.1.x/platforms/linux64GccDPOpt/lib/liblagrangianCFDEM-PUBLIC-2.1.x.so"
deleting data at: /home/cmn/CFDEM/cmn-PUBLIC-2.1.x/run/cfdemPostproc/fillCylinder
done

Thanks

Vishal

Vishal Nandigana

nandiga1 | Thu, 02/07/2013 - 22:05

Hi Chris,

1. Discard my previous mail. The cfdemPostProc is also working well now. The reason for the previous error was I performed wmake only on the cfdPostProc solver and ran the tutorial. However, when I compiled the "cfdemCompCFDEM", the tutorial works. Thanks for the help.

2. However, I would like to point that there is still a small bug in the "cfdemSolverIB" tutorial. The tutorial works fine, however, it was not able to perform the reconstructPar operation as it states the following error. Please let me know how we can fix this !!

cmn@nandi:~/CFDEM/CFDEMcoupling-PUBLIC-2.1.x/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI$ ./Allrun.sh > a.out
rm: cannot remove `couplingFiles/*': No such file or directory

--> FOAM FATAL IO ERROR:
cannot find file

file: /home/cmn/CFDEM/CFDEMcoupling-PUBLIC-2.1.x/tutorials/cfdemSolverIB/twoSpheresGlowinskiMPI/CFD/processor0/0.003/polyMesh/pointProcAddressing at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting

Thanks

Vishal Nandigana

alice's picture

alice | Fri, 02/08/2013 - 08:56

Hello Vishal,
in my experience using reconstructPar together with dynamic local mesh refinement is problematic. A very fast way to visualize the results as a whole is creating an empty file with the ending ".foam" (e.g. test.foam, if there is no such file already) and open it in paraview. There you can choose the option decomposed case instead od reconstructed case and all the data from the different processor-directories is displayed together.
Cheers,
Alice

alice's picture

alice | Fri, 02/08/2013 - 08:58

Hello Vishal,
in my experience using reconstructPar together with dynamic local mesh refinement is problematic. A very fast way to visualize the results as a whole is creating an empty file with the ending ".foam" (e.g. test.foam, if there is no such file already) and open it in paraview. There you can choose the option decomposed case instead od reconstructed case and all the data from the different processor-directories is displayed together.
Cheers,
Alice

alice's picture

alice | Fri, 02/08/2013 - 08:58

Hello Vishal,
in my experience using reconstructPar together with dynamic local mesh refinement is problematic. A very fast way to visualize the results as a whole is creating an empty file with the ending ".foam" (e.g. test.foam, if there is no such file already) and open it in paraview. There you can choose the option decomposed case instead od reconstructed case and all the data from the different processor-directories is displayed together.
Cheers,
Alice

nandiga1 | Sun, 02/10/2013 - 23:48

Hi Alice,

Thanks for your reply.

1. I was trying to execute one of my Lammps input file before I tried to couple it with openfoam. The atom_style used in my input file is full, and when I started to execute it using LIGGGHTS executable file (lmp_fedora_pic), I got the following error.

LIGGGHTS (Version LIGGGHTS-PUBLIC 2.2.4, compiled 2013-01-31-17:15:59 by cmn based on LAMMPS 20 Apr 2012)
ERROR: Invalid atom style (atom.cpp:343)

I would like to know if LIGGGHTS can read only granular particle input scripts. If that is the case, can you please let me know how to couple the Lammps file with the continuum framework for other kind of atom_styles and for different types of input files. Where should we change in the source code ?

2. The problem, I would like to solve is to model polymer translocation in an ionic solution. The polymer is modeled as a chain of beads and solved using Langevin dynamics in Lammps. While, the ionic solution is modeled using continuum framework using a coupled Poisson-Nernst Planck equation (coded in OpenFOAM).
Please provide answer to first question. I would discuss about the implementation of step 2, later.

Thanks
Regards

Vishal Nandigana

nandiga1 | Mon, 02/11/2013 - 05:13

Hi Alice,

A. I fixed the error in step 1 by installing the molecule package. make yes-molecule and compiling LIGGGHTS again using cfdemCompLig command !!

B. With regard to my second query, below is the algorithm I would like to implement, and it would be great if you could offer your suggestion.
Step 1. Solve Langevin dynamics for every bead in the polymer chain for first time step
d^2r_i/dt^2 = -A*dr_i/dt - \nabla(U_i) + F(t)
(Use LIGGGHTS to solve Langevin dynamics, code works fine when LIGGGHTS is run independently)
where r_i is the position of the bead, U_i is the total interaction potential considering Lennard-Jones interactions and bonded interaction between beads, along with the electric voltage force q_i*V(r_i). F(t) is the random noise.
Step 2: Get the positions of the bead to update the continuum ion transport equation. Here the spatial variation of the permittivity (eps_r) is needed to couple the ionic transport. Governing equation for ion transport (coded in OpenFOAM) given below is solved iteratively to obtain the converged phi(r) and c1(r) and c2(r) for a given eps_r.
\nabla \cdot (\eps_r \nabla \grad \phi(r)) = -F(z1*c1+z2*c2)-\rho_c(r)
dc1/dt = -nabla\cdot(-D1\nabla c1 - B1*z1*c1*\grad \phi(r))
dc2/dt = -nabla\cdot(-D2\nabla c2 - B1*z2*c2*\grad \phi(r))

Can you let me know, how to send the information of eps_r after every N time steps to the continuum solver. I see that it is similar to sending voidfraction in the PisoScalarFoam example, but I donot still understand what changes I should make. Please let me know !!

Step 3: The spatial potential distribution Phi(r) obtained from the continuum solver should update the force acting on the particles. Again, I have little idea as to what changes have to be made in the CFDEM package. Can you please provide some suggestions.

Step 4: Repeat steps 1:3 until M time steps for Langevin.

Thanks for your help

Regards
Vishal

Vishal Nandigana

saad2311 | Tue, 04/02/2019 - 18:16

Hi everyone, this forum thread proved to be useful for me regarding the Post-Processing troubleshooting. However I'm using LIGGGHTS 3.8.0 version and I encountered the problem while trying to post-process the tutorial "chute_wear", I have OpenFOAM v5.x
"starting LIGGGHTS memory optimized parallel post processing
chunksize: 8 --> 8 files are processed per chunk. If you run out of memory reduce chunksize.
Working with 2 processes...
calculating chunks 1 - 1 of 1
aborting due to errors: [Errno 2] No such file or directory: 'dump*.chute' "

Is the matter already discussed above ?

saad2311 | Tue, 04/09/2019 - 15:57

After going through the file "in.chute_wear" I came across the command line :

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

with this, all of the files generated are all ready converted into the *.vtk format which can be easily read by ParaView.