waves2Foam的一键安装解决方案
-
waves2Foam是海岸工程研究中非常常用的造波模块。安装waves2Foam经常遇到版本匹配和编译错误。这里提供一个新的解决方案,用户可一键安装解决。
解决方案 可从本人github中下载,地址是 https://github.com/zhisongli/publicData,文件名是 waves2Foam2156-of2206-github.zip。
关于openfoam和waves2Foam匹配方案,推荐openfoam2206和waves2Foam2156。
编译错误多来自于Fortran程序中,实参和形参的类型不匹配,也有来自程序语句过长。
此处提供一个新的ThirdParty/settings,用户可一键安装。一键安装脚本
# install necessary packages sudo apt-get install libgsl-dev sudo apt install subversion # download OceanWave3D-Fortran90 and move it to ThirdParty git clone https://github.com/boTerpPaulsen/OceanWave3D-Fortran90.git cp -r OceanWave3D-Fortran90 ThirdParty/OceanWave3D-Fortran90BK # download waves2Foam svn co http://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.6/other/waves2Foam # go to waves2Foam and copy my Thirdparty. cd waves2Foam rm -rf ThirdParty cp -f ../ThirdParty . cd .. # move waves2Foam to $WM_PROJECT_USER_DIR/applications/utilities/ mkdir -p $WM_PROJECT_USER_DIR/applications/utilities/ cp -r waves2Foam $WM_PROJECT_USER_DIR/applications/utilities/ # compile cd $WM_PROJECT_USER_DIR/applications/utilities/waves2Foam ./Allwmake