setting up CFD DEM coupling

Submitted by hseybold on Sun, 06/09/2013 - 01:06

Hi,
I am trying to set up my first (modified) CFDEM case inspired by the
ErgunTestMPI case.

My setup is a square box sheared on top with a velocity inlet, a outlet
and periodic conditions in lateral direction (top moving wall, bottom fixed)

I can run the case without problems in pisoFoam.

For the particles I insert a few (3-5) particles in the center of the box
similar to the in_init function of the ErgunTestMPI

I also took the coupling parameters from this case.

I can run the init function in liggghts

For the CFDEM test case i joined the two parts using the couling
parameters of the ErgunTestMPI test case

after decomposePar -case . i run
mpirun -np 4 cfdemSolverPiso -parallel -case .

according to the log file everything starts up OK
----------------------------------------------------------------------------------------------------
...
Selecting liggghtsCommandModel runLiggghts ,provide dicts, numbered from 0 to n
firstCouplingStep = 1
lastCouplingStep = 1000000000
couplingStepInterval = 1
cg is set to: 1
solving volume averaged Navier Stokes equations of type A
check if Archimedes lift is necessary (depends on pressure formulation)
Starting time loop
Time = 1e-06
Courant Number mean: 1.25e-06 max: 3.125e-05
...
SOME PISO FOAM ITERATIONS
...
Total # of neighbors = 290
Ave neighs/atom = 2.13235
Neighbor list builds = 1
Dangerous builds = 0
LIGGGHTS finished
Coupling...
Total particle volume neglected: 0.00117987
--------------------------------------------------------------------------------------------------
at this point the simulation does not continue and hangs until killed.
I attached my log and parameter files

Any hint what is going wrong in my case is appreciated.

Thank you very much
hansjoerg

P.S. Would like to add some info I found during the weekend:

Some parameters hang with

Coupling...
Total particle volume neglected: 0
*** glibc detected *** cfdemSolverPiso: corrupted double-linked list: 0x000000000218e4b0 ***
======= Backtrace: =========
...

or get stuck with
Coupling...
Total particle volume neglected: 0
[2] #0 Foam::error::printStack(Foam::Ostream&)^Cmpirun: killing job...

--------------------------------------------------------------------------------------------------
What I found out so far is that the cyclic boundary conditions in the flow field seem to curupt
the particle coupling.

Using wall instead of cyclic in the y direction worked

jiatangwang | Thu, 01/16/2014 - 15:01

Hi, hseybold
How are you ?
How long you are using CFDEM coupling ?
I am a new beginner in OpenFOAM, and want to do some research in CFDEM. I have installed all of the necessory packages, but i meet some blocks when I use ./Allrun command to run the CFDEM in coupling.
I really donot know whether the command ./Allrun I used is right. Could you tell me ? Or I must do set something ? If it is , can you tell me the step by step commands i need to use in running the CFDEM coupling ?
Thank you very much.

By the way , I am glad to post my mistake in running the test case, just as followes.

When i run the command
>> cfdemTestTUT
The running results is a graph, and without any errors. I am not sure if I installed the CFDEM coupling correctly ? But some times when I run the command, it responses "cfdemTestTUT: command not found"

But CFDEM can not work in coupling in the test case called cfdemSolverPiso/ErgunTestMPI, I used the command:
>> ./Allrun.sh
But the Allrun.sh script does not work for me.
when I run test case called cfdemSolverPiso/ErgunTestMPI, I used the command:
>> ./Allrun.sh
the results are as follows:

parse error near line 10 of file totalPressureDrop.m

syntax error

>>> path = '../postProcessing/probes/0/T'; //'../probes/0/p'
^

error: parse error while reading script file totalPressureDrop.m
error: source: error sourcing file `totalPressureDrop.m'

** (evince:18644): WARNING **: Error when getting information for file '/home/jt/CFDEM/jt-PUBLIC-2.2.1/run/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/octave/cfdemSolverPiso_ErgunTestMPI.eps': No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

** (evince:18644): WARNING **: Error setting file metadata: No such file or directory

what is wrong with my CFDEM coupling ?? help

After that i run the test case cfdemSolverPiso/ErgunTestMPI/DEM and cfdemSolverPiso/ErgunTestMPI/CFD seperately and running in several processors. Then works, the commands I used as follows 3 examples:
>> cd CFD
>> blockMesh
>> decomposePar
>> mpirun -np 4 cfdemSolverPiso -parallel
>> reconstructPar
>> paraFoam

>> cd ../DEM
>> liggghts < in.liggghts_init // dump.* files were created in post file
>> cd post
>> lpp dump*.liggghts_init // form to VTK files
>> paraview

also run DEM in parallel, works well too,
>> mpirun -np 4 liggghts -in in.liggghts_init
>> cd post
>> lpp dump*.liggghts_init // form to VTK files
>> paraview

Thank you very much.

alice's picture

alice | Fri, 01/17/2014 - 12:58

Hello jitangwang,
well there are two short remarks I can make: first of all, when you enter the commands manally, as you state in the lower part of your message, then you have to make sure that the initializing commandy of the liggghts case are run BEFORE you start the coupled calculation. If it works the other way round as well, the restart file is still available from an old calculation.
The error-message you get seems to be related to a wrong path. Go through the files stepwisely, and check which data was generated.
And please, if you post your error-messages (which is perfectly okay), it would be great if you posted them only once. Then we can avoid the distribution of the answers to one question over multiple threads ;)
Regards,
Alice

jiatangwang | Fri, 01/17/2014 - 17:34

hi alice,
Thanks for your kind comments. And i am sorry to post my mistake in several times, really sorry to all members. And this is the last time.
If I have not missunderstood your meaning is that if the command >>./Allrun can not work in my CFDEM coupling calculating, I should run liggghts before CFD (your words initializing commandy of the liggghts), and then turn to CFD to let CFDEM calculate in coupling ? Depend on my knowledge can you tell me if the command are right running CFDEM coupling in several processors ? Take the test case cfdemSolverPiso/settlingTestMPI as example,

in first terminal,
>>cd cfdemSolverPiso/settlingTestMPI/DEM
>> mpirun -np 2 liggghts -in in.liggghts_init // if they are initializing commandy of the liggghts ???
in second terminal,
>> cd cfdemSolverPiso/settlingTestMPI/CFD
>> blockMesh
>> decomposePar
>> mpirun -np 2 cfdemSolverPiso -parallel
>> reconstructPar
>> paraFoam
then in first terminal,
cfdemSolverPiso/settlingTestMPI/DEM$ lpp dump*.liggghts_init // form to VTK files
last open the VTK files in paraFoam

I can run the test case just follow the above commands without errors, can you tell me if CFD and DEM are running in coupling ? But the commands " mpirun -np 2 liggghts -in in.liggghts_init " only lasts several seconds runing, it finished running before i strart the commands "mpirun -np 2 cfdemSolverPiso -parallel". I really do not know. Who can tell me ? Thanks very much.

alice's picture

alice | Mon, 01/20/2014 - 09:54

Good morning,
this doesn't look to bad. If the calculation called by "cfdemSolverPiso" is running properly, which seems to be the case, then your simulation is coupled.
The Allrun-script should run the case without any pre-run commands, so perhaps some pathes are set incorrectly in your installation. But if you can manage to run the calculation manually, you can be sure that the software is installed properly, and further simulations can be carried out without problems!
Cheers,
Alice