CFDEM安装测试
-
本文工作来自于 @hurricane007 的贡献,在此做个笔记测试
原贴地址:http://www.cfd-china.com/topic/971/cfdem-在一个新的ubuntu系统的安装-基本是官网教程就加了一点东西
CFDEM官网安装教程:https://www.cfdem.com/media/CFDEM/docu/CFDEMcoupling_Manual.html#installation
测试如下:
-
本步骤安装
git
,用来在命令行下下载安装等;sudo apt-get install git-core
-
在
$HOME
文件夹下创立文件夹CFDEM
(分两次输入,后续类似的分行均需要多次输入):cd $HOME mkdir CFDEM
完成后效果:
-
使用
git
工具从服务器拷贝CFDEM
源程序:cd CFDEM git clone git://github.com/CFDEMproject/CFDEMcoupling-PUBLIC.git
-
类似的,创立
LIGGGHTS
文件夹,同时拷贝LIGGGHTS
程序:cd $HOME mkdir LIGGGHTS cd LIGGGHTS git clone git://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git git clone git://github.com/CFDEMproject/LPP.git lpp
-
类似的,安装OpenFOAM-4.x:
cd $HOME mkdir OpenFOAM cd OpenFOAM git clone git://github.com/OpenFOAM/OpenFOAM-4.x.git
安装之后编译OpenFOAM,不再赘述。
-
安装出图依赖库:
sudo apt-get install octave epstool
-
重命名一下CFDEM的文件夹
cd $HOME/CFDEM mv CFDEMcoupling-PUBLIC CFDEMcoupling-PUBLIC-$WM_PROJECT_VERSION
-
打开环境变量,设置如下:
export CFDEM_VERSION=PUBLIC export CFDEM_PROJECT_DIR=$HOME/CFDEM/CFDEMcoupling-$CFDEM_VERSION-$WM_PROJECT_VERSION export CFDEM_PROJECT_USER_DIR=$HOME/CFDEM/$LOGNAME-$CFDEM_VERSION-$WM_PROJECT_VERSION export CFDEM_bashrc=$CFDEM_PROJECT_DIR/src/lagrangian/cfdemParticle/etc/bashrc export CFDEM_LIGGGHTS_SRC_DIR=$HOME/LIGGGHTS/LIGGGHTS-PUBLIC/src export CFDEM_LIGGGHTS_MAKEFILE_NAME=auto export CFDEM_LPP_DIR=$HOME/LIGGGHTS/lpp/src . $CFDEM_bashrc
-
重新打开一个新的终端,键入:
cfdemSysTest
会输出下面的信息:
********************************************* * C F D E M (R) c o u p l i n g * * * * by DCS Computing GmbH * * www.dcs-computing.com * ********************************************* ********************************* CFDEM(R)coupling system settings: ********************************* 中间略去 Report bugs to http://www.open-mpi.org/community/help/ ********************** additional packages...
-
进行编译:
cfdemCompCFDEMall
-
-
dyfluid@dyfluid:~$ cfdemCompCFDEMall copying patch files for LIGGGHTS if available cp: 无法获取'/home/dyfluid/CFDEM/CFDEMcoupling-PUBLIC-4.x/src/LIGGGHTSpatch/*' 的文件状态(stat): 没有那个文件或目录 =========================================== Compiling sub-libraries of LIGGGHTS now... Please provide the libraries to be compiled in the //home/dyfluid/CFDEM/CFDEMcoupling-PUBLIC-4.x/src/lagrangian/cfdemParticle/etc/library-liggghts-list.txt file. Libraries must be in: /home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src/../lib, or a path defined by the Line in the above file. =========================================== deactivating all possible packages of LIGGGHTS now... Please provide the packages to be compiled in the //home/dyfluid/CFDEM/CFDEMcoupling-PUBLIC-4.x/src/lagrangian/cfdemParticle/etc/package-undo-liggghts-list.txt file. Packages must be in: /home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src/../lib. will change path... /home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src rm: 无法删除'log_compilePOEMSlib': 没有那个文件或目录 Uninstalling package POEMS will change path... /home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src rm: 无法删除'log_compileDIPOLElib': 没有那个文件或目录 Package DIPOLE does not exist will change path... /home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src rm: 无法删除'log_compileASPHERElib': 没有那个文件或目录 Uninstalling package ASPHERE will change path... /home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src rm: 无法删除'log_compilePASCALlib': 没有那个文件或目录 Uninstalling package PASCAL =========================================== activating packages of LIGGGHTS now... Please provide the packages to be compiled in the //home/dyfluid/CFDEM/CFDEMcoupling-PUBLIC-4.x/src/lagrangian/cfdemParticle/etc/package-liggghts-list.txt file. Packages must be in: /home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src/../lib. rm: 无法删除'/home/dyfluid/CFDEM/CFDEMcoupling-PUBLIC-4.x/src/lagrangian/cfdemParticle/etc/log/log_compileLIGGGHTS': 没有那个文件或目录 // log_compileLIGGGHTS-2017-09-20-17:47 // /home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src rm: 无法删除'/home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src/lmp_auto': 没有那个文件或目录 rm -rf Obj_auto MAKE/Makefile.auto.options lmp_auto liblmp_auto.a liblmp_auto.so rm: 无法删除'/home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src/liblmp_auto.a': 没有那个文件或目录 cleaning LIGGGHTS compiling LIGGGHTS on 4 CPUs Generating model list, this could take a moment... Creating list of contact models completed. make[1]: Entering directory '/home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_auto' >>> WARNING <<< Created MAKE/Makefile.user for the first time. Please check that the options in that file are set correctly. Makefile:538: *** Could not obtain VTK_MAJOR_VERSION。 停止。 make[1]: Leaving directory '/home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_auto' Makefile:87: recipe for target 'auto' failed make: *** [auto] Error 2 make[1]: Entering directory '/home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_auto' Makefile:538: *** Could not obtain VTK_MAJOR_VERSION。 停止。 make[1]: Leaving directory '/home/dyfluid/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_auto' Makefile.shlib:43: recipe for target 'auto' failed make: *** [auto] Error 2 dyfluid@dyfluid:~$
报错如上, @hurricane007 是否知道解决办法?
我和你那个区别就是我用的OpenFOAM-4.x
-
@李东岳 你开个新的窗口会显示些什么东西啊?能给我看下么。但是这个错误似乎我电脑也会有的,他还是正常编译的啊
正常我打开的时候会显示这些:************************************ using default CFDEM_SRC_DIR = /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src using default CFDEM_SOLVER_DIR = /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/applications/solvers using default CFDEM_DOC_DIR = /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/doc using default CFDEM_UT_DIR = /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/applications/utilities using default CFDEM_TUT_DIR = /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/tutorials using default CFDEM_LAMMPS_LIB_DIR = /home/he/LIGGGHTS/LIGGGHTS-PUBLIC/src/../lib using default CFDEM_LIGGGHTS_LIB_PATH = /home/he/LIGGGHTS/LIGGGHTS-PUBLIC/src using default CFDEM_ADD_LIBS_DIR = /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal using default CFDEM_ADD_LIBS_NAME = additionalLibs_3.0.1 using default CFDEM_LIB_DIR = /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/platforms/linux64GccDPInt32Opt/lib using default CFDEM_USER_LIB_DIR = /home/he/CFDEM/he-PUBLIC-3.0.1/platforms/linux64GccDPInt32Opt/lib using default CFDEM_APP_DIR = /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/platforms/linux64GccDPInt32Opt/bin using default CFDEM_USER_APP_DIR = /home/he/CFDEM/he-PUBLIC-3.0.1/platforms/linux64GccDPInt32Opt/bin
-
@李东岳 仔细看了下,可能是VTK的问题,是不是这个没装?
sudo apt-get install build-essential flex bison cmake zlib1g-dev libboost-system-dev libboost-thread-dev libopenmpi-dev openmpi-bin gnuplot libreadline-dev libncurses-dev libxt-dev libscotch-dev libptscotch-dev sudo apt-get install libvtk6-dev sudo apt-get install python-numpy