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. 请问怎么修改只读文件etc/controlDict里的参数?

请问怎么修改只读文件etc/controlDict里的参数?

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

    如题,因为我现在用的openfoam是在超算中心里的模块,参数文件都是只读的。但是我想修改etc/controlDict里面的mpiBufferSize这一项,不知道该怎么实现?

    以前在1712(或者一些其他的版本)中是可以通过,复制一个用户自定义的controlDict文件在目录$HOME/.OpenFOAM/v1712/controlDict中,从而编辑这个文件就可以实现修改。但是在之后的1912(我现在用的版本)中这一功能好像没有了,不起作用。不知道有没有别的途径可以修改mpiBufferSize这一参数?

    1 条回复 最后回复
  • bestucanB 离线
    bestucanB 离线
    bestucan 版主 大神
    写于 最后由 编辑
    #2

    https://www.openfoam.com/releases/openfoam-v1712/parallel.php
    这里的一句:

    as a setting in the OptimisationSwitches dictionary located in the \$WM_PROJECT_DIR/etc/controlDict file, or the per-user override in the /.OpenFOAM/v1712/controlDict file or per-case override in the $FOAM_CASE/system/controlDict file

    试试这个 or per-case 的方法:mihu:

    滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

    异步沟通方式(《posting style》from wiki)(下载后打开):
    https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
    提问的智慧(github在gitee的镜像):
    https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way

    1 条回复 最后回复
  • H 离线
    H 离线
    hotairballon1997
    写于 最后由 编辑
    #3

    谢谢回复,这个就是我之前提到的放在$HOME/.OpenFOAM/v1712/controlDict中可以覆盖etc/controlDict中的参数。但是这个功能好像只在1712,1812中有效,但是在1912版本中就不行了:135:

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

    1712

    Note
    #     Many environment variables can be overridden using a <prefs.sh> file
    #     from one of these locations:
    #     * user-specific:
    #         * ~/.OpenFOAM/$WM_PROJECT_VERSION
    #         * ~/.OpenFOAM
    #     * group-specific:
    #         * $WM_PROJECT_SITE/site/$WM_PROJECT_VERSION
    #         * $WM_PROJECT_SITE/site
    #     * general:
    #         * $WM_PROJECT_DIR/etc
    #
    #     Any changes made to this bashrc file may be lost with the next upgrade.
    

    2006

    Description
    #     The OpenFOAM environment for POSIX shell (eg, bash,dash,zsh,...).
    #     Source manually or from the ~/.bashrc or ~/.profile files.
    #
    #     Most settings can be overridden with a <prefs.sh> file:
    #
    #       - Base values (eg, from system admin):
    #         -  $WM_PROJECT_DIR/etc/prefs.sh
    #
    #       - User or group values (first file found):
    #         -  ~/.OpenFOAM/$FOAM_API/prefs.sh
    #         -  ~/.OpenFOAM/prefs.sh
    #         -  $WM_PROJECT_SITE/$FOAM_API/etc/prefs.sh
    #         -  $WM_PROJECT_SITE/etc/prefs.sh
    #
    #     Some settings can also be overridden on the command-line when
    #     sourcing this file. For example,
    #
    #       . /path/etc/bashrc WM_COMPILER=Clang WM_LABEL_SIZE=64
    

    有些变化,你试试?

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

    1 条回复 最后回复
  • bestucanB 离线
    bestucanB 离线
    bestucan 版主 大神
    在 中回复了 hotairballon1997 最后由 编辑
    #5

    @hotairballon1997 看着我真诚的眼神,告诉我,你看了我的帖子

    or per-case override in the $FOAM_CASE/system/controlDict file

    你懂我的意思吧.jpg

    滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

    异步沟通方式(《posting style》from wiki)(下载后打开):
    https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
    提问的智慧(github在gitee的镜像):
    https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way

    1 条回复 最后回复

  • 登录

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