Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. Ubuntu 20.04 安装 OpenFOAM-v1712

Ubuntu 20.04 安装 OpenFOAM-v1712

已定时 已固定 已锁定 已移动 OpenFOAM
35 帖子 5 发布者 25.6k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • chengan.wangC 离线
    chengan.wangC 离线
    chengan.wang
    写于 最后由 编辑
    #11

    @李东岳 李老师,编译过程出现了很多错误:

    == Generating build files ==
    Configuring libCGAL
    -- Requested component: MPFR
    -- Requested component: GMP
    libCGAL is configured
    -- Sources for CGAL component library 'CGAL_Core/CMakeLists.txt' detected
    CMake Error at src/CMakeLists.txt:81 (add_subdirectory):
      add_subdirectory given source
      "/home/chengan/OpenFOAM/ThirdParty-2.4.0/CGAL-4.6/src/CGAL_Core/CMakeLists.txt"
      which is not an existing directory.
    Call Stack (most recent call first):
      src/CMakeLists.txt:140 (configure_component)
    
    
    -- Sources for CGAL component library 'CGAL_ImageIO/CMakeLists.txt' detected
    CMake Error at src/CMakeLists.txt:81 (add_subdirectory):
      add_subdirectory given source
      "/home/chengan/OpenFOAM/ThirdParty-2.4.0/CGAL-4.6/src/CGAL_ImageIO/CMakeLists.txt"
      which is not an existing directory.
    Call Stack (most recent call first):
      src/CMakeLists.txt:140 (configure_component)
    
    
    -- Sources for CGAL component library 'CGAL_Qt3/CMakeLists.txt' detected
    CMake Error at src/CMakeLists.txt:81 (add_subdirectory):
      add_subdirectory given source
      "/home/chengan/OpenFOAM/ThirdParty-2.4.0/CGAL-4.6/src/CGAL_Qt3/CMakeLists.txt"
      which is not an existing directory.
    Call Stack (most recent call first):
      src/CMakeLists.txt:140 (configure_component)
    
    
    -- Sources for CGAL component library 'CGAL_Qt4/CMakeLists.txt' detected
    CMake Error at src/CMakeLists.txt:81 (add_subdirectory):
      add_subdirectory given source
      "/home/chengan/OpenFOAM/ThirdParty-2.4.0/CGAL-4.6/src/CGAL_Qt4/CMakeLists.txt"
      which is not an existing directory.
    Call Stack (most recent call first):
      src/CMakeLists.txt:140 (configure_component)
    
    
    -- Sources for CGAL component libraries 'CGAL_Core/CMakeLists.txt;CGAL_ImageIO/CMakeLists.txt;CGAL_Qt3/CMakeLists.txt;CGAL_Qt4/CMakeLists.txt' detected
    == Generating build files (DONE) ==
    
    -- Configuring incomplete, errors occurred!
    See also "/home/chengan/OpenFOAM/ThirdParty-2.4.0/build/linux64Gcc/CGAL-4.6/CMakeFiles/CMakeOutput.log".
    See also "/home/chengan/OpenFOAM/ThirdParty-2.4.0/build/linux64Gcc/CGAL-4.6/CMakeFiles/CMakeError.log".
    + exit 1
    

    还有很多这样的:

    /usr/bin/ld: /home/chengan/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()'
    collect2: error: ld returned 1 exit status
    make[2]: *** [/home/chengan/OpenFOAM/OpenFOAM-2.4.0/wmake/Makefile:150: /home/chengan/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/bin/interMixingFoam] Error 1
    make[1]: *** [/home/chengan/OpenFOAM/OpenFOAM-2.4.0/wmake/MakefileApps:39: interFoam] Error 2
    make[1]: Target 'application' not remade because of errors.
    make: *** [/home/chengan/OpenFOAM/OpenFOAM-2.4.0/wmake/MakefileApps:39: multiphase] Error 2
    make: Target 'application' not remade because of errors.
    

    log文件如下:
    log.tar.xz
    希望李老师能百忙之中指点一下!

    李东岳李 1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    在 中回复了 chengan.wang 最后由 编辑
    #12

    @chengan-wang

    第三方包先不用管 你先在终端输入这个编译openfoam应该没问题了

    https://www.cfd-china.com/topic/4859/yyflex-error

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    chengan.wangC 2 条回复 最后回复
  • chengan.wangC 离线
    chengan.wangC 离线
    chengan.wang
    在 中回复了 李东岳 最后由 编辑
    #13

    @李东岳 谢谢李老师,不过命令报错了

    chengan@chengan-MS-7C80:~/OpenFOAM/OpenFOAM-2.4.0$ find src applications -name "*.L" -type f | xargs sed -i -e 's=(YY_FLEX_SUBMINOR_VERSION)=YY_FLEX_MINOR_VERSION < 6 && \1='
    sed: -e expression #1, char 61: invalid reference \1 on `s' command's RHS
    
    1 条回复 最后回复
  • chengan.wangC 离线
    chengan.wangC 离线
    chengan.wang
    在 中回复了 李东岳 最后由 编辑
    #14

    @李东岳 李老师,我在wiki上找到命令如下:

    find src applications -name "*.L" -type f | xargs sed -i -e 's=\(YY\_FLEX\_SUBMINOR\_VERSION\)=YY_FLEX_MINOR_VERSION < 6 \&\& \1='
    

    这个可以用。

    最终我选择gcc-4.8、g++-4.8编译,目前可以运行icoFoam cavity 算例,似乎编译成功了,但是log文件有2522个错误,不知道算是编译成功了没有:143: ,还是可以将就着用?

    log.zip

    李东岳李 1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    在 中回复了 chengan.wang 最后由 编辑
    #15

    @chengan-wang 没关系,主要是其中做foamQuad网格的,这个用得少

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    chengan.wangC 1 条回复 最后回复
  • chengan.wangC 离线
    chengan.wangC 离线
    chengan.wang
    在 中回复了 李东岳 最后由 编辑
    #16

    @李东岳 谢谢李老师

    李东岳李 1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    在 中回复了 chengan.wang 最后由 编辑
    #17

    @chengan-wang 为什么要用openfoam2.4.?

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    chengan.wangC 1 条回复 最后回复
  • chengan.wangC 离线
    chengan.wangC 离线
    chengan.wang
    在 中回复了 李东岳 最后由 编辑
    #18

    @李东岳 之前用了很久,很多求解器也是基于这个版本改的

    1 条回复 最后回复
  • Y 离线
    Y 离线
    Yu_Tian
    在 中回复了 李东岳 最后由 编辑
    #19

    @李东岳 李老师,求详细的2.1.1的安装教程:140:

    永远学习,永远进步

    1 条回复 最后回复
  • 李东岳李 李东岳 被引用 于这个主题
  • 李东岳李 李东岳 被引用 于这个主题
  • liujmL 离线
    liujmL 离线
    liujm
    写于 最后由 编辑
    #20

    @李东岳 李老师,我看了新版waves2foam的教程,参考这篇帖子的gfortran4安装。指令直接复制到终端,出现了报错:
    76c22eae-984f-437f-a12b-a5ed0446a28e-image.png
    77679983-3eb1-47de-8464-65a3c662d894-image.png
    可以请教一下这该怎么解决吗?
    :papa:

    李东岳李 1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    在 中回复了 liujm 最后由 编辑
    #21

    @liujm 你查一下那个no pubkey的问题,我当时也遇到了,百度一下就行

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    liujmL 1 条回复 最后回复
  • liujmL 离线
    liujmL 离线
    liujm
    在 中回复了 李东岳 最后由 编辑
    #22

    @李东岳 已解决,谢谢!

    1 条回复 最后回复
  • Z 离线
    Z 离线
    zhou
    写于 最后由 zhou 编辑
    #23

    1719218313463.png
    老师好,我遇到这种路径不存在应该怎么解决,我在网上也搜不到答案@李东岳

    1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    写于 最后由 编辑
    #24

    你的ubuntu应该不支持安装gfortran-4 你要用gfortran-4么 最简单的办法是装个ubuuntu16

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    Z 1 条回复 最后回复
  • Z 离线
    Z 离线
    zhou
    在 中回复了 李东岳 最后由 zhou 编辑
    #25

    @李东岳 老师您好,我是跟着“waves2Foam安装 2024年更新版本”这个教程来的这个链接,里面在编译wave2foam前写着需要安装gfortran-4。我目前电脑里是自带着一个gfortran-11,编译出来的log文件跟您的相比小了很多,里面也有显示一些警告和错误,我不知道这编译出来的能不能正常使用,老师您能帮我看一下给我点建议吗,如果不能用是否是只能重新安一个老版本ubuntu之后去安装gfortran-4来编译 。log.zip

    1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    写于 最后由 编辑
    #26

    你的/etc/apt/sources.list文件,添加这个了么:

    deb http://mirrors.aliyun.com/ubuntu/ trusty main
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty universe

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    Z 1 条回复 最后回复
  • Z 离线
    Z 离线
    zhou
    在 中回复了 李东岳 最后由 编辑
    #27

    @李东岳 5e65c22b4a81ff2a1ae37e7f234ab28.png 老师您好,我在之前已经添加过了,依然会发生这种问题

    1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    写于 最后由 编辑
    #28

    sudo apt install gfortran-4.7

    试一下

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    Z 1 条回复 最后回复
  • Z 离线
    Z 离线
    zhou
    在 中回复了 李东岳 最后由 编辑
    #29

    @李东岳 谢谢李老师,能够成功用使用gfortran-4了,但是我在编译wave2Foam后出现的log文件中,产生了一些下图中关于lwaves2Foam的错误,这会影响后续的使用吗
    60abf2dc69ca17ae9f43c82c1b5b1d7.png

    李东岳李 1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    在 中回复了 zhou 最后由 编辑
    #30

    @zhou 我刚编译wavesfoam在虚拟机里面,我发现我得代码仓库里面ocean3d还是丢失了,我今天上传一个编译好的虚拟机,你直接下载。

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    Z 1 条回复 最后回复

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]