wave2foam安装编译过程

本文详细指导如何在Linux系统中安装waves2Foam,包括更新数据包、安装必要的库、使用SVN下载特定版本的源代码、编译并测试waveFoam,涉及OpenFOAMv1812的VOFsolver和相关特性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  • 首先更新下数据
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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值