compiling CFDEMcoupling with different OF versions

cgoniva's picture
Submitted by cgoniva on Mon, 01/18/2016 - 13:58

Hello,

the latest release of CFDEMcouplng-PUBLIC compiles with several different OF versions.
I personally use 2.4.x (see here: https://github.com/CFDEMproject/CFDEMcoupling-PUBLIC/blob/master/src/lag... ) and therefore the settings in the repo should be fine for 2.4.x.

In case you want to compile the CFDEMcoupling toolbox with other OF versions you have the following switches:

a) chose your version (2.4.x, 3.0.x and Ext-3.2 should work properly - for older versions you need to give it a try)
https://github.com/CFDEMproject/CFDEMcoupling-PUBLIC/blob/master/src/lag...

b) select the corresponding additionalLibs file by defining CFDEM_ADD_LIBS_NAME and CFDEM_ADD_LIBS_DIR in your .bashrc file.
See the different files here: https://github.com/CFDEMproject/CFDEMcoupling-PUBLIC/blob/master/src/lag...

For the tutorials you might need to do minor changes in ..CFD/0/U and ../CFD/octave/*.m . The BC migth have different names or the write path of a probe might have changed.

Enjoy,
Chris

hunger's picture

hunger | Tue, 01/19/2016 - 09:57

Hi Chris,

thanks for the new commit c3a1e37 of CFDEM yesterday, this solved a lot of issues during the compilation! I compiled CFDEM 3.0.0 with OpenFOAM 3.0.x and the compilation ran smoothly after some minor changes, but I have not tested it yet.

Beside considering the two points (a) and (b) mentioned above, I had to change the VTK library links in the additionalLibs_30x file because I am using Ubuntu instead of Fedora.

=============================================
Fedora (comment or delete)
=============================================
# paths for additional libraries
CFDEM_ADD_LIB_PATHS = \
-L/usr/include/vtk \
-L/usr/lib64/vtk \

# additional libraries to be linked to solvers
CFDEM_ADD_LIBS = \
-lvtkCommonCore \
-lvtkIOCore \
-lvtkIOXML \
-lvtkIOLegacy \
-lvtkCommonDataModel \
=============================================

=============================================
Ubuntu (add)
=============================================
# paths for additional libraries
CFDEM_ADD_LIB_PATHS = \
-I/usr/include/vtk-5.8 \

# additional libraries to be linked to solvers
CFDEM_ADD_LIBS = \
-lvtkCommon \
-lvtkFiltering \
-lvtkIO \

=============================================

If the VTK library is not installed yet on the system, one can get it with the following command:
sudo apt-get install libvtk5-dev

Best regards
Harald

aalborz | Fri, 03/25/2016 - 02:07

Hey Harald,

I'm new with CFDEM and I'm having a very hard time understanding the following line in the previous post.

"select the corresponding additionalLibs file by defining CFDEM_ADD_LIBS_NAME and CFDEM_ADD_LIBS_DIR in your .bashrc file."

I would really appreciate it if you could provide me with more information on how to define CFDEM_ADD_LIBS_NAME and CFDEM_ADD_LIBS_DIR in .bashrc file. (Do I need to add more command lines to .bashrc file?)

It would be very helpful if you could kindly provide me with your files, which you were able to make it work.

Thank you very much,

aalborz

alice's picture

alice | Fri, 03/25/2016 - 12:48

Hello aalborz,
you are right, just add the two additional variables in the same manner as the other CFDEM-variables that you copied there during the installation. For compiling CFDEMcoupling with OF 3.0.x you'll need to set the CFDEM_ADD_LIBS_NAME to additionalLibs_30x, and the CFDEM_ADD_LIBS_DIR is the path of the etc directory within your lagrangian source directory (it's best to just look for it).
Hope this helps!
Best regards,
Alice

aalborz | Fri, 03/25/2016 - 23:48

Dear Alice,

Thank you very much for you prompt response. I really appreciate it. It worked !!!

I'm also having a hard time compiling one of the solvers in CFDEM. (I'm using OF 3.0.x)

The error is:
"turbulenceModel.H: No such file or directory"

I noticed somewhere that the dir-path of the turbulence model in OF 3.0.x is different from OF 2.x.

I'm confused about chaging this directory and really don't know where and what to change.
-- I've already applied the change in the following link:
http://www.cfdem.com/forums/compiling-cfdemcoupling-different-versions

I would really appreciate it if you could provide me with any information regarding this issue.

Thank you very much,

aalborz

cgoniva's picture

cgoniva | Wed, 01/20/2016 - 09:28

Hello Harald,

thank you for the feedback!

Yes, I pushed some minor changes to allow for smoother compilation with the cfdemCompileCFDEMxxx scripts - glad to hear it works for you now.

Concerning your changes to the additionalLibs file - this is very system specific and so I can only give an example for how it looks on my system.
Thank you for sharing your setup - it might be useful for someone else!

Best regards,
Chris

Daniel Queteschiner | Fri, 01/22/2016 - 10:44

Hi Chris,
could you please set a version tag in the git repository to mark the final commit of the release?
Cheers
Daniel

cgoniva's picture

cgoniva | Tue, 01/26/2016 - 22:38

Hi Daniel,

I guess your intention is being able to identify "previous versions", right?

Cheers,
Chris

Daniel Queteschiner | Mon, 02/01/2016 - 11:51

Yes, tags make it so much easier to identify a certain release and ensures that everyone is talking about the same code version.

Cheers,
Daniel

yyu | Sun, 01/24/2016 - 08:35

Hi Chris,

I chose OF version 3.0.x and the corresponding additionalLibs file by defining CFDEM_ADD_LIBS_NAME and CFDEM_ADD_LIBS_DIR in .bashrc file. There is no error after cfdemCompCFDEM command. But I still can't start an example by cfdemTestTUT, even by ./Allrun.sh in the folder. when these command were used, the error came out:
mesh needs to be built
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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-27da24b530cf
Exec : blockMesh
Date : Jan 24 2016
Time : 15:29:14
Host : "yuyaowei-shu"
PID : 9828
Case : /home/yuyaowei/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials/cfdemSolverPisoScalar/packedBedTemp/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

Creating block mesh from
"/home/yuyaowei/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials/cfdemSolverPisoScalar/packedBedTemp/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 : 0
Number of boundary faces : 6
Number of defined boundary faces : 6
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
Block 0 cell size :
i : 0.05 .. 0.05
j : 0.05 .. 0.05
k : 0.0606061 .. 0.0606061

Writing polyMesh
----------------
Mesh Information
----------------
boundingBox: (0 0 -0.5) (0.1 0.1 1.5)
nPoints: 306
nCells: 132
nFaces: 532
nInternalFaces: 260
----------------
Patches
----------------
patch 0 (start: 260 size: 4) name: inlet
patch 1 (start: 264 size: 4) name: outlet
patch 2 (start: 268 size: 264) name: wall

End

LIGGGHTS init was run before - using existing restart file
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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-27da24b530cf
Exec : decomposePar
Date : Jan 24 2016
Time : 15:29:14
Host : "yuyaowei-shu"
PID : 9835
Case : /home/yuyaowei/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials/cfdemSolverPisoScalar/packedBedTemp/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

Create mesh

Calculating distribution of cells
Selecting decompositionMethod simple

Finished decomposition in 0 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 = 66
Number of faces shared with processor 1 = 6
Number of processor patches = 1
Number of processor faces = 6
Number of boundary faces = 136

Processor 1
Number of cells = 66
Number of faces shared with processor 0 = 6
Number of processor patches = 1
Number of processor faces = 6
Number of boundary faces = 136

Number of processor faces = 6
Max number of cells = 66 (0% above average 66)
Max number of processor patches = 1 (0% above average 1)
Max number of faces between processors = 6 (0% above average 6)

Time = 0

Processor 0: field transfer
Processor 1: field transfer

End

// run_parallel_cfdemSolverPisoScalar_packedBedTemp_CFDDEM //

/home/yuyaowei/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials/cfdemSolverPisoScalar/packedBedTemp/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-27da24b530cf
Exec : cfdemSolverPisoScalar -parallel
Date : Jan 24 2016
Time : 15:29:15
Host : "yuyaowei-shu"
PID : 9855
Case : /home/yuyaowei/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD
nProcs : 2
Slaves : 1("yuyaowei-shu.9856")
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

Creating dummy density field rho = 1

Creating fluid-particle heat flux field

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
[1] [0]
[0]
[0] --> FOAM FATAL ERROR:
[0] Unknown TurbulenceModel type RASModel

Valid TurbulenceModel types:

3
(
LES
RAS
laminar
)

[1]
[1] --> FOAM FATAL ERROR:
[1] Unknown TurbulenceModel type RASModel

Valid TurbulenceModel types:

3
(
LES
RAS
laminar
)
[1]
[1]
[1] From function TurbulenceModel::New(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, transportModel&, const word&)
[0]
[0]
[0] From function TurbulenceModel::New(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, transportModel&, const word&)
[0] in file /home/yuyaowei/OpenFOAM/OpenFOAM-3.0.x/src/TurbulenceModels/turbulenceModels/lnInclude/TurbulenceModel.C at line 119.[1] in file /home/yuyaowei/OpenFOAM/OpenFOAM-3.0.x/src/TurbulenceModels/turbulenceModels/lnInclude/TurbulenceModel.C at line 119.

[0]
FOAM parallel run exiting
[0]
[1]
FOAM parallel run exiting
[1]
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun has exited due to process rank 0 with PID 9855 on
node yuyaowei-shu exiting improperly. There are two reasons this could occur:

1. this process did not call "init" before exiting, but others in
the job did. This can cause a job to hang indefinitely while it waits
for all processes to call "init". By rule, if one process calls "init",
then ALL processes must call "init" prior to termination.

2. this process called "init", but exited without calling "finalize".
By rule, all processes that call "init" MUST call "finalize" prior to
exiting or it will be considered an "abnormal termination"

This may have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
[yuyaowei-shu:09853] 1 more process has sent help message help-mpi-api.txt / mpi-abort
[yuyaowei-shu:09853] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
rm: cannot remove ‘*.eps’: No such file or directory

calc Ergun eqn:
muG = 0.0017820
dpErgun = 2561.0
final pressure drop = 2560.977345 Pa
error: load: unable to find file ../postProcessing/probes/0/p
error: called from
totalPressureDropAndNusselt.m at line 35 column 6

** (evince:9872): WARNING **: Error when getting information for file '/home/yuyaowei/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/octave/cfdemSolverPisoScalar_pressureDrop.eps': No such file or directory

** (evince:9871): WARNING **: Error when getting information for file '/home/yuyaowei/CFDEM/CFDEMcoupling-PUBLIC-3.0.x/tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/octave/cfdemSolverPisoScalar_Nusselt.eps': No such file or directory

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Do you have any clue about these error? octave 4.0.0 was installed.
Thanks a lot
Regards,
Yaowei

vkoppejan | Mon, 02/22/2016 - 15:14

I just compiled CFDEM 30x on OpenSUSE LEAP 42.1. I had to fiddle around a bit and install the vtk and vtk-devel packages (current version is 6.3)

These were the settings for the additionallibs_30x file (top part) that worked for me. I haven't tested all my codes yet so maybe I'll reporting a change later but let's hope not.

Cheers,

Victor
----------------------------------------------------------------------------------
paths for additional libraries
CFDEM_ADD_LIB_PATHS = \
-L/usr/include/vtk-6.3 \
-L/usr/lib64/vtk \

# additional libraries to be linked to solvers
CFDEM_ADD_LIBS = \
-lvtkCommonCore \
-lvtkIOCore \
-lvtkIOXML \
-lvtkIOLegacy \
-lvtkCommonDataModel \

# additional static libraries to be linked to lagrangian library
CFDEM_ADD_STATICLIBS = \
-lmpi_cxx \

aalborz | Sat, 03/26/2016 - 19:25

Dear Alice,

Thank you very much for you prompt response. I really appreciate it. It worked !!!

I'm also having a hard time compiling one of the solvers in CFDEM. (I'm using OF 3.0.x)

The error is:
"turbulenceModel.H: No such file or directory"

I noticed somewhere that the dir-path of the turbulence model in OF 3.0.x is different from OF 2.x.

I'm confused about chaging this directory and really don't know where and what to change.
-- I've already applied the change in the following link:
http://www.cfdem.com/forums/compiling-cfdemcoupling-different-versions

I would really appreciate it if you could provide me with any information regarding this issue.

Thank you very much,

aalborz