- 首先更新下数据
sudo apt-get update
- 安装libgsl0ldbl
sudo apt-get install libgsl0ldbl
- 然后安装 waves2Foam 的依赖包
sudo apt install libgsl-dev gfortran subversion git
- 再后下载 waves2Foam 的源代码,开发者推荐使用 svn 下载,使用如下命令新建文件夹
mkdir -p $FOAM_RUN/../applications/utilities
cd $FOAM_RUN/../applications/utilities
- 使用 svn 下载
svn co -r 2141 http://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.6/other/waves2Foam
- 注意这里 svn 命令的参数 -r,这个参数的含义是指定具体的版本号,不指定这个参数默认是最新版。建议使用小编测试过的版本。
- 下载好进入 waves2Foam 文件夹,运行一键编译脚本
cd waves2Foam
如果提示 wave2Foam目录不存在,输入ls查看,再重新进入wave2Foam文件夹,然后接着编译:
./Allwmake
编译完成后测试下,最简单的测试方法是
waveFoam -help
如果安装无误,会提示
Usage: waveFoam [OPTIONS]
Options:
-case <dir> Specify case directory to use (instead of the cwd)
-decomposeParDict <file>
Use specified file for decomposePar dictionary
-dry-run Check case set-up only using a single time step
-dry-run-write Check case set-up and write only using a single time step
-noFunctionObjects
Do not execute function objects
-parallel Run in parallel
-doc Display documentation in browser
-doc-source Display source code in browser
-help Display short help and exit
-help-full Display full help and exit
Solver for two incompressible, isothermal immiscible fluids using VOF
phase-fraction based interface capturing.
With optional mesh motion and mesh topology changes including adaptive
re-meshing.
Using: OpenFOAM-v1812 (1812) (see www.OpenFOAM.com)
Build: _3fe4e281-20200312 (patch=200312)
Arch: LSB;label=32;scalar=64