安装IAPWS-IF97-OF
参考网址
https://openfoamwiki.net/index.php/Contrib/IAPWS-IF97-OF
首先要安装freesteam
To build freesteam you will need to have Python, SCons, and SWIG, GSL and the GCC compiler installed on your system.
1、安装GSL
先去官网下载GSL安装包http://www.gnu.org/software/gsl/
官方给了USTC的镜像:
http://mirrors.ustc.edu.cn/gnu/gsl/
下载后解压,在ROOT权限下
./configure && make && make install
执行 make install 时,会自动将动态库和头文件分别拷贝到/usr/local/lib和 /usr/local/include 下面,但如果这两个目录没有写权限,就无法创建此二目录,导致安装失败,此时改用 sudo make install或者手动去赋予权限,便能解决此问题。
2、之后安装freesteam
(1) Download the source code tarball from the freesteam files page on sourceforge.net.
(2)Unpack the tarball using freesteam-2.1.tar.bz2
(3)Enter the source directory using cd freesteam-2.1
(4) Build the package using scons
(scons指令需要安装)
安装成功freesteam
在freesteam 文件夹里有 libfreesteam.so 以及libfreesteam.so.1文件 将其copy到
Home<OpenFOAM<用户名-2.4.0<platforms<linux64GccDPOpt<lib 目录下
然后安装IAPWS-IF97-OF
打开命令行窗口,然后导航到要存储IAPWS-IF97-OF源代码的目录。 然后在计算机上的命令行中运行以下命令
git clone https://github.com/romansCode/IAPWS-IF97-OF.git
cd IAPWS-IF97-OF
wclean && wmake libso
当git 指令clone时可能会出现如下错误
出现问题的原因是没有移除git上的proxy configuration;
解决方案
git config --global http.proxy
git config --global --unset http.proxy