Compile openfoam 4 with CFDEMcoupling-4.0

Submitted by esmaeilyazdani on Wed, 10/12/2016 - 17:39

Dear All
i try to compile openfoam 4 with CFDEMcoupling-4.0. but i faced with below error:

using CFDEM_ADD_LIBS_NAME=additionalLibs_4.0 .
!!! ERROR !!!: CFDEM_ADD_LIBS_DIR/CFDEM_ADD_LIBS_NAME=/home/cfdemlab/CFDEM/CFDEMcoupling-PUBLIC-4.0/src/lagrangian/cfdemParticle/etc/additionalLibs_4.0 does not exist.
************************************
WARNING from your CFDEM code!
WARNING: Coupling with your OpenFOAM(R) version is currently under development!
In doubt switch to another version.
************************************

while in /home/cfdemlab/CFDEM/CFDEMcoupling-PUBLIC-4.0/src/lagrangian/cfdemParticle/etc/additionalLibs_4.x ,the file" additionalLibs_4.x" exist.

Regards
Esmaeil

j-kerbl's picture

j-kerbl | Thu, 10/13/2016 - 09:52

Hi Esmaeil,

can you confirm the CFDEMcoupling version is
CFDEMversion="cfdem-3.5.1";
This information is located in /src/lagrangian/cfdemParticle/cfdTools/versionInfo.H within your CFDEMcoupling folder.

If this is correct, then the reason for this behaviour is that the official repository name of OF is 4.x not 4.0 . Your installation tells CFDEMcoupling to look for version 4.0 -> additionalLibs_4.0 does not exist.

The easiest way of fixing this on your end is probably to add the following lines in FRONT of the CFDEM environment variables in your .bashrc .
CFDEM_ADD_LIBS_DIR=/home/cfdemlab/CFDEM/CFDEMcoupling-PUBLIC-4.0/src/lagrangian/cfdemParticle/etc
CFDEM_ADD_LIBS_NAME=additionalLibs_4.x

The CFDEM coupling bashrc will autodetect user defined add libs settings and use them.
If you source the bashrc again or open a new terminal, a message as "using CFDEM_ADD_LIBS_NAME=additionalLibs_3.0.x defined by user." should appear.
And please keep in mind 4.x support is still experimental.

Regards
Josef

esmaeilyazdani | Thu, 10/13/2016 - 22:25

Hi josef

I checked, my CFDEMcoupling version is 3.5.1 while additionalLibs_4.x is exist.
I installed new OpenFoam “OpenFOAM 4.1” and I faced this error again.

Best Regards
Esmaeil

esmaeilyazdani | Thu, 10/13/2016 - 22:33

Hi Josef

I add mentioned commands in my bashrc and I installed OPenFOAM-4.1 again i faced with below error:

using CFDEM_ADD_LIBS_NAME=additionalLibs_4.x defined by user.
using CFDEM_ADD_LIBS_DIR=/home/cfdemlab/CFDEM/CFDEMcoupling-PUBLIC-4.1/src/lagrangian/cfdemParticle/etc defined by user.
************************************
WARNING from your CFDEM code!
WARNING: Coupling with your OpenFOAM(R) version is currently under development!
In doubt switch to another version.
************************************

esmaeilyazdani | Thu, 10/13/2016 - 23:14

I am not sure but in the following file:
/home/cfdemlab/CFDEM/CFDEMcoupling-PUBLIC-4.1/src/lagrangian/cfdemParticle/etc/bashrc
seems that if the OF version is 4.* then abort coupling and send error “WARNING: Coupling with your OpenFOAM(R) version is currently under development!”

j-kerbl's picture

j-kerbl | Mon, 10/17/2016 - 10:42

Hi Esmaeil,

do you actually get an error message?
This message:
“WARNING: Coupling with your OpenFOAM(R) version is currently under development!”
is actually a warning and it does not stop there.

And as I've stated:
And please keep in mind 4.x support is still experimental.

So with 4.x the cfdemPostProc utility won't compile and you will definitely see an error. If you do not warn errors, listen to this message
"In doubt switch to another version."
and switch to OF 3.x

Cheers,
Josef

NTT1508 | Thu, 10/20/2016 - 08:05

Hi Josef,

I am confused about the recent version of CFDEM. When I checked versionfo.H, it says CFDEM3.5.1. This should be right because I just downloaded the latest from CFDEM github. However, when I checked the variable $CFDEM_PROJECT_DIR, it reports a version 3.0.1. And because of this variable, all directories must change to version 3.0.1 when compiling. Any mistakes here ? Furthermore, can we have a chance to see the version in the Manual for both LIGGGHTS and CFDEM ?

Thanks and Regards,

Nathan,

j-kerbl's picture

j-kerbl | Thu, 10/20/2016 - 10:48

Hi Nathan,

I understand your confusion and to bring light to this topic:
The CFDEMcoupling version in versionInfo.H is correct. The folder names of the CFDEMcoupling are expecting $WM_PROJECT_VERSION, which is the OpenFOAM version it shall be coupled to. This is useful if you have multiple OFs installed on your system.
So from your input 3.0.1 is your OF version tag.
Please have a look at the CFDEM variables you added to your bashrc, there you can see that

export CFDEM_VERSION=PUBLIC
export CFDEM_PROJECT_DIR=$HOME/CFDEM/CFDEMcoupling-$CFDEM_VERSION-$WM_PROJECT_VERSION

The project directory is added with $WM_PROJECT_VERSION

Cheers,
Josef

NTT1508 | Fri, 10/21/2016 - 09:54

Thank Josef, yes it makes sense when considering OF.