CFD中文网

    CFD中文网

    • 登录
    • 搜索
    • 最新

    OpenFOAM 运行的时候,如何关闭屏幕输出的信息?

    OpenFOAM
    3
    7
    528
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • Q
      Qing 最后由 李东岳 编辑

      比如运行 reactingFOAM 的时候
      屏幕上不停的输出:

      DILUPBiCG:  Solving for h, Initial residual = 2.1859e-07, Final residual = 2.1859e-07, No Iterations 0
      
      ExecutionTime = 8545.97 s  ClockTime = 8756 s
      
      Courant Number mean: 0.00199512 max: 0.401162
      deltaT = 2.09015e-06
      Time = 0.00879189
      
      min/max(T) = 291, 1880
      time step continuity errors : sum local = 9.41463e-08, global = 1.84917e-08, cumulative = 1.25902e-07
      

      这些个没营养的信息
      而且屏幕输出还占用大量时间

      该怎么关闭呢?不让它们从屏幕上输出来

      李东岳 1 条回复 最后回复 回复 引用
      • 李东岳
        李东岳 管理员 @Qing 最后由 编辑

        @qing reactingFoam &> log

        CFD高性能服务器 http://dyfluid.com/servers.html

        Q 1 条回复 最后回复 回复 引用
        • Q
          Qing @李东岳 最后由 编辑

          @李东岳

          可这样还是会往文件里面写东西?
          尤其是,每个迭代步都要写
          这样会浪费很多计算时间

          有没有办法,就是让运行过程彻底不往外输出信息
          或者控制它,比如每隔 1000 步 再输出一次信息?

          多谢!

          李东岳 1 条回复 最后回复 回复 引用
          • 李东岳
            李东岳 管理员 @Qing 最后由 编辑

            @qing simpleFoam > /dev/null就不会输出任何东西了。写log不会浪费很多时间,如果你的log写的特别频繁,说明网格很小。如果网格很大,写log会很慢。二者都不会在写入上浪费很多时间。

            比如每隔 1000 步 再输出一次信息?

            这个控制不了。

            CFD高性能服务器 http://dyfluid.com/servers.html

            Q 1 条回复 最后回复 回复 引用
            • bestucan
              bestucan 版主 副教授 最后由 编辑

                        || visible in terminal ||   visible in file   || existing
                Syntax  ||  StdOut  |  StdErr  ||  StdOut  |  StdErr  ||   file
              ==========++==========+==========++==========+==========++===========
                 >      ||    no    |   yes    ||   yes    |    no    || overwrite
                 >>     ||    no    |   yes    ||   yes    |    no    ||  append
              	  ||          |          ||          |          ||
                 2>     ||   yes    |    no    ||    no    |   yes    || overwrite
                 2>>    ||   yes    |    no    ||    no    |   yes    ||  append
               	  ||          |          ||          |          ||
                 &>     ||    no    |    no    ||   yes    |   yes    || overwrite
                 &>>    ||    no    |    no    ||   yes    |   yes    ||  append
              	  ||          |          ||          |          ||
               | tee    ||   yes    |   yes    ||   yes    |    no    || overwrite
               | tee -a ||   yes    |   yes    ||   yes    |    no    ||  append
              	  ||          |          ||          |          ||
               n.e. (*) ||   yes    |   yes    ||    no    |   yes    || overwrite
               n.e. (*) ||   yes    |   yes    ||    no    |   yes    ||  append
              	  ||          |          ||          |          ||
              |& tee    ||   yes    |   yes    ||   yes    |   yes    || overwrite
              |& tee -a ||   yes    |   yes    ||   yes    |   yes    ||  append
              

              滚来滚去……~(~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/blob/master/README-zh_CN.md

              李东岳 1 条回复 最后回复 回复 引用
              • 李东岳
                李东岳 管理员 @bestucan 最后由 编辑

                @bestucan 很全面!

                CFD高性能服务器 http://dyfluid.com/servers.html

                1 条回复 最后回复 回复 引用
                • Q
                  Qing @李东岳 最后由 编辑

                  @李东岳

                  多谢!

                  不过确实目前测试的网格还都比较小

                  1 条回复 最后回复 回复 引用
                  • First post
                    Last post