Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    动网格求解中correctPhi的作用是什么

    OpenFOAM
    3
    5
    1060
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 史
      史浩 讲师 last edited by

      现在OpenFOAM比较成熟的求解器都能求解动网格算例,与v5.0中普通求解器相比,现在的求解器为了求解动网算例,都会在循环中加这么一段:

              while (pimple.loop())
              {
                  if (pimple.firstIter() || moveMeshOuterCorrectors)
                  {
                      mesh.update();
      
                      if (mesh.changing())
                      {
                          // Do not apply previous time-step mesh compression flux
                          // if the mesh topology changed
                          if (mesh.topoChanging())
                          {
                              talphaPhi1Corr0.clear();
                          }
      
                          gh = (g & mesh.C()) - ghRef;
                          ghf = (g & mesh.Cf()) - ghRef;
      
                          MRF.update();
      
                          if (correctPhi)
                          {
                              // Calculate absolute flux
                              // from the mapped surface velocity
                              phi = mesh.Sf() & Uf();
      
                              #include "correctPhi.H"  
      
                              // Make the flux relative to the mesh motion
                              fvc::makeRelative(phi, U);
      
                              mixture.correct();
                          }
      
                          if (checkMeshCourantNo)
                          {
                              #include "meshCourantNo.H"
                          }
                      }
                  }
      
                  ........
      
              }
      

      其中比较关键的是correctPhi.H,这个文件主要是实现一个面通量的预修正,引入了一个修正压力pcorr。但是这一块具体实现了什么功能,我还是不清楚,于是我把这一行给注释掉了,然后比较原始的interFoam和注释掉correctPhi.H后的求解器求解结果,算例采用OpenFOAM自带的interFoam tutorial算例——testTubeMixer。比较了两个算例在t=0.89s的结果:
      下图为原始的interFoam求解的结果:

      下图为注释掉correctPhi.H后的求解结果:

      就上面的结果来看,没有任何的区别。但是作为OpenFOAM的程序设计师们,肯定不会把一段没用的代码放在一个这么经典的求解器中。有没有哪位CFDer能够解释一下这个correctPhi.H是做什么呢?

      让我们随波逐流

      1 Reply Last reply Reply Quote
      • 史
        史浩 讲师 last edited by

        上面的图片实在上传不上去,主要是证明两种结果一样,两个图看起来确实是一样的,就不再另外挂图了

        让我们随波逐流

        1 Reply Last reply Reply Quote
        • 史
          史浩 讲师 last edited by

          t=0.89s
          原始interFoam求解器结果
          cfe3a104-8198-4390-966b-be652ae5195f-图片.png file:///media/sh/SH/OpenFOAM/droplets/tutorials/noPcorrInterFoam/testTubeMixer1/interFoam.jpg
          去掉correctPhi.H后的结果
          d8b024e1-b6d4-4894-974b-d4a61f5279a4-图片.png file:///media/sh/SH/OpenFOAM/droplets/tutorials/noPcorrInterFoam/testTubeMixer2/interNoPcorrFoam.jpg
          把图补上,原来的图太大了上传失败了

          让我们随波逐流

          1 Reply Last reply Reply Quote
          • bestucan
            bestucan 版主 副教授 last edited by

            我记得是修正非正交网格的面通量。两个相邻的网格,共用面的中心点到两个网格体中心点连线。如果两个连线不重合就要修正。你看那个correctPhi里不是面的法向量和速度向量相乘么。

            phi = mesh.Sf() & Uf();
            

            我说的不严谨,大概是这个意思。

            滚来滚去……~(~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 Reply Last reply Reply Quote
            • 李东岳
              李东岳 管理员 last edited by

              是的,一般情况下你1)可以忽略correctPhiH,2)pcorr也可以不求解

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

              1 Reply Last reply Reply Quote
              • First post
                Last post

              CFD中文网 | 东岳流体 | 京ICP备15017992号-2
              论坛登录问题反馈可联系 li.dy@dyfluid.com