@李东岳
我自己熬夜重新装了ubantu 14.04LTS和openFoam2.3.0,步骤如下:
第一步:下载14.04(https://releases.ubuntu.com/trusty/)
f6855da5-6ea8-4893-b504-bd76811725e7-image.png
第二步:装ubantu(https://blog.csdn.net/IT_job/article/details/79578543?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0.pc_relevant_paycolumn_v3&spm=1001.2101.3001.4242.1&utm_relevant_index=3)
第三步:下载OpenFoam2.3.0和paraView以及安装必须的包
sudo apt-get update
sudo apt-get install build-essential cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev libqtwebkit-dev gnuplot \
libreadline-dev libncurses5-dev libxt-dev libopenmpi-dev openmpi-bin libboost-system-dev libboost-thread-dev libgmp-dev \
libmpfr-dev python python-dev libcgal-dev
sudo apt-get install libglu1-mesa-dev libqt4-opengl-dev
cd ~
mkdir OpenFOAM
cd OpenFOAM
wget "http://downloads.sourceforge.net/foam/OpenFOAM-2.3.0.tgz?use_mirror=mesh" -O OpenFOAM-2.3.0.tgz
wget "http://downloads.sourceforge.net/foam/ThirdParty-2.3.0.tgz?use_mirror=mesh" -O ThirdParty-2.3.0.tgz
tar -xzf OpenFOAM-2.3.0.tgz
tar -xzf ThirdParty-2.3.0.tgz
ln -s /usr/bin/mpicc.openmpi OpenFOAM-2.3.0/bin/mpicc
ln -s /usr/bin/mpirun.openmpi OpenFOAM-2.3.0/bin/mpirun
source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI
echo "alias of230='source \$HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc $FOAM_SETTINGS'" >> $HOME/.bashrc
第四步:编译第三方程序(需要十几分钟)
cd ~
touch.bashrc
cd $WM_THIRD_PARTY_DIR
export QT_SELECT=qt4
./Allwmake > log.make 2>&1
wmSET $FOAM_SETTINGS
export QT_SELECT=qt4
./makeParaView4 > log.makePV 2>&1
vmSET $FOAM_SETTINGS
第五步:编译OpenFoam(这个时间比较长)
cd $WM_PROJECT_DIR
export QT_SELECT=qt4
./Allwmake > log.make 2>&1
编译好之后,在终端输入of230,回车,再输入icoFoam -help,会出现:
53f19f3d-70e6-46ed-ad58-8a1c5be1b3df-image.png
然后测试paraFoam:
965bd91c-3804-4584-80ae-b3e27c97fef4-image.png
就成功了
第六步;解决右键有可能没有打开终端这个选项
#如果你希望能够在当前目录点击右键的方式打开terminal,需要安装一个安装包:nautilus-open-terminal。
sudo apt-get install nautilus-open-terminal
#然后重新加载文件管理器
nautilus -q
#或注销再登录即可使用
5ee6c839-9206-4810-bb55-abdfb5df8041-image.png
至此,安装结束