CFDEM compliling error

Submitted by zengjunsheng on Sat, 10/19/2013 - 17:34

Everything goes well before I type "cfdemCompCFDEM" in the terminal. I can run both OpenFOAM examples and LIGGGHTS examples successfully.
But errors occur during the CFDEM compiling below:
##################################################################
/home/ciel/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/autoPtrI.H: In member function ‘const T& Foam::autoPtr::operator()() const [with T = Foam::clockModel]’:
/home/ciel/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/autoPtrI.H:163:23: instantiated from ‘Foam::autoPtr::operator const T&() const [with T = Foam::clockModel]’
/home/ciel/CFDEM/CFDEMcoupling-PUBLIC-2.2.x/src/lagrangian/cfdemParticle/lnInclude/cfdemCloudI.H:192:12: instantiated from here
/home/ciel/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/autoPtrI.H:150:9: error: invalid use of incomplete type ‘struct Foam::clockModel’
/home/ciel/CFDEM/CFDEMcoupling-PUBLIC-2.2.x/src/lagrangian/cfdemParticle/lnInclude/cfdemCloud.H:69:7: error: forward declaration of ‘struct Foam::clockModel’
/home/ciel/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/autoPtrI.H: In member function ‘const T& Foam::autoPtr::operator()() const [with T = Foam::smoothingModel]’:
/home/ciel/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/autoPtrI.H:163:23: instantiated from ‘Foam::autoPtr::operator const T&() const [with T = Foam::smoothingModel]’
/home/ciel/CFDEM/CFDEMcoupling-PUBLIC-2.2.x/src/lagrangian/cfdemParticle/lnInclude/cfdemCloudI.H:197:12: instantiated from here
/home/ciel/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/autoPtrI.H:150:9: error: invalid use of incomplete type ‘struct Foam::smoothingModel’
/home/ciel/CFDEM/CFDEMcoupling-PUBLIC-2.2.x/src/lagrangian/cfdemParticle/lnInclude/cfdemCloud.H:70:7: error: forward declaration of ‘struct Foam::smoothingModel’
/home/ciel/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/autoPtrI.H: In member function ‘const T& Foam::autoPtr::operator()() const [with T = Foam::meshMotionModel]’:
/home/ciel/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/autoPtrI.H:163:23: instantiated from ‘Foam::autoPtr::operator const T&() const [with T = Foam::meshMotionModel]’
/home/ciel/CFDEM/CFDEMcoupling-PUBLIC-2.2.x/src/lagrangian/cfdemParticle/lnInclude/cfdemCloudI.H:202:12: instantiated from here
/home/ciel/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/autoPtrI.H:150:9: error: invalid use of incomplete type ‘struct Foam::meshMotionModel’
/home/ciel/CFDEM/CFDEMcoupling-PUBLIC-2.2.x/src/lagrangian/cfdemParticle/lnInclude/cfdemCloud.H:72:7: error: forward declaration of ‘struct Foam::meshMotionModel’
make: *** [Make/linuxGccDPOpt/cfdemPostproc.o] Error 1
########################################################################

I don't know what's wrong with the problem, I appreciate your help.

Jing Lu | Fri, 10/31/2014 - 19:42

Hi,

I just met exactly the same problem. I know now everything goes to some new version, but I want to reproduce my successful compilations and simulations with openfoam-2.2.x, liggghts-2.3.8, and cfdem-2.5.5 on Ubuntu 12.04.2.

I didn't use anything 'new'. I git clone the openfoam 2.2.x, and copied my previous CFDEM and LIGGGHTS folders. I set the environmental variables consistent with the previous version. Now I have Openfoam and liggghts running well. but when I execute 'cfdemCompCFDEM' I got the same error message shown in the above post.

Can anybody help figure out the reason?

Thanks,
Jing

APerez | Fri, 11/07/2014 - 02:10

Have you found any solution to this problem? I've been experiencing errors related with cfdemPostproc.o everytime I try to compile CFDEM.

Best regards,

Agustin

j-kerbl's picture

j-kerbl | Mon, 11/10/2014 - 10:53

Hi all,

the current CFDEMcoupling (2.7.1) is set up to work with OF 2.3.x. If you want to run it with 2.2.x you need to change a setting in the following file:
CFDEMcoupling-PUBLIC-2.2.x/src/lagrangian/cfdemParticle/etc/OFversion
//#define version23
#define version22
comment the version 23 line and uncomment version 22 and recompile the thing!

I hope that works for all of you!

Cheers
Josef