CFD中文网

    CFD中文网

    • 登录
    • 搜索
    • 最新

    对旋转机械进行计算时的错误提示

    OpenFOAM
    5
    18
    6810
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • L
      lllwonderliquid 最后由 编辑

      大家好,最近在做旋转机械内流场的计算工作,使用了AMI动静交接面,采用MRF坐标系,可是当我开始计算时,却出现了以下错误提示。。。觉得很可能是边界条件设置有问题。。贴一下边界条件设置文件,如下。求大神指教!

      lizehao@lizehao-Z97-HD3:~/openFoam/run/tubulence_model_test_on_centrifugal_pump/mesh5/merge_grid$ simpleFoam |tee simpleFoam.log
      /*---------------------------------------------------------------------------*\
      | =========                 |                                                 |
      | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
      |  \\    /   O peration     | Version:  4.1                                   |
      |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
      |    \\/     M anipulation  |                                                 |
      \*---------------------------------------------------------------------------*/
      Build  : 4.1
      Exec   : simpleFoam
      Date   : Dec 08 2017
      Time   : 11:09:02
      Host   : "lizehao-Z97-HD3"
      PID    : 30537
      Case   : /home/lizehao/openFoam/run/tubulence_model_test_on_centrifugal_pump/mesh5/merge_grid
      nProcs : 1
      sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
      fileModificationChecking : Monitoring run-time modified files using timeStampMaster
      allowSystemOperations : Allowing user-supplied system call operations
      
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      Create time
      
      Create mesh for time = 0
      
      
      SIMPLE: convergence criteria
          field p	 tolerance 1e-05
          field U	 tolerance 1e-05
          field k	 tolerance 1e-05
          field epsilon	 tolerance 1e-05
          field nut	 tolerance 1e-05
      
      Reading field p
      
      Reading field U
      
      Reading/calculating face flux field phi
      
      AMI: Creating addressing and weights between 18792 source faces and 2424 target faces
      AMI: Patch source sum(weights) min/max/average = 0.992729, 1.00082, 0.999897
      AMI: Patch target sum(weights) min/max/average = 0, 1.00061, 0.580281
      AMI: Creating addressing and weights between 7722 source faces and 3861 target faces
      AMI: Patch source sum(weights) min/max/average = 0.0916406, 1, 0.994738
      AMI: Patch target sum(weights) min/max/average = 0, 1, 0.877149
      AMI: Creating addressing and weights between 7722 source faces and 3861 target faces
      AMI: Patch source sum(weights) min/max/average = 0.0916406, 1, 0.994738
      AMI: Patch target sum(weights) min/max/average = 0, 1, 0.877149
      Selecting incompressible transport model Newtonian
      Selecting turbulence model type RAS
      Selecting RAS turbulence model kEpsilon
      kEpsilonCoeffs
      {
          Cmu             0.09;
          C1              1.44;
          C2              1.92;
          C3              -0.33;
          sigmak          1;
          sigmaEps        1.3;
      }
      
      Creating MRF zone list from MRFProperties
          creating MRF zone: MRF1
      No finite volume options present
      
      
      Starting time loop
      
      Time = 1
      
      smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.0389849, No Iterations 2
      smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.0580972, No Iterations 2
      smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.0935053, No Iterations 1
      #0  Foam::error::printStack(Foam::Ostream&) at ??:?
      #1  Foam::sigFpe::sigHandler(int) at ??:?
      #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
      #3  Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) at ??:?
      #4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
      #5  ? at ??:?
      #6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
      #7  ? at ??:?
      
      

      U文件,进口fixedValue,出口zeroGradient,壁面noslip,交接面cyclicAMI

      /*--------------------------------*- C++ -*----------------------------------*\
      | =========                 |                                                 |
      | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
      |  \\    /   O peration     | Version:  4.1                                   |
      |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
      |    \\/     M anipulation  |                                                 |
      \*---------------------------------------------------------------------------*/
      FoamFile
      {
          version     2.0;
          format      ascii;
          class       volVectorField;
          object      U;
      }
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      
      dimensions      [0 1 -1 0 0 0 0];
      
      internalField   uniform (2.744 0 0);
      
      boundaryField
      {
          wall1_runner
          {
              type            noSlip;
          }
          wall2_runner
          {
              type            noSlip;
          }
          wall3_runner
          {
              type            noSlip;
          }
          wall4_runner
          {
              type            noSlip;
          }
          interface_runner
          {
              type            cyclicAMI;
              value           uniform (2.744 0 0);
          }
          interface1_runner
          {
              type            cyclicAMI;
              value           uniform (2.744 0 0);
          }
          interface2_runner
          {
              type            cyclicAMI;
              value           uniform (2.744 0 0);
          }
          wall2_suction
          {
              type            noSlip;
          }
          outflow_suction
          {
              type            noSlip;
          }
          wall1_suction
          {
              type            noSlip;
          }
          inlet
          {
              type            fixedValue;
              value           uniform (2.744 0 0); 
          }
          interFace1_suction
          {
              type            cyclicAMI;
              value           uniform (2.744 0 0);
          }
          interFace2_suction
          {
              type            cyclicAMI;
              value           uniform (2.744 0 0);
          }
          wall1_volute
          {
              type            noSlip;
          }
          interface_volute
          {
              type            cyclicAMI;
              value           uniform (2.744 0 0);
          }
          wall2_volute
          {
              type            noSlip;
          }
          outlet_volute
          {
              type            zeroGradient;
          }
      }
      

      P文件,进口及壁面zeroGradient,出口fixedValue,交接面cyclicAMI

      /*--------------------------------*- C++ -*----------------------------------*\
      | =========                 |                                                 |
      | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
      |  \\    /   O peration     | Version:  4.1                                   |
      |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
      |    \\/     M anipulation  |                                                 |
      \*---------------------------------------------------------------------------*/
      FoamFile
      {
          version     2.0;
          format      ascii;
          class       volScalarField;
          object      p;
      }
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      
      dimensions      [0 2 -2 0 0 0 0];
      
      internalField   uniform 0;
      
      boundaryField
      {
          wall1_runner
          {
              type            zeroGradient;
          }
          wall2_runner
          {
              type            zeroGradient;
          }
          wall3_runner
          {
              type            zeroGradient;
          }
          wall4_runner
          {
              type            zeroGradient;
          }
          interface_runner
          {
              type            cyclicAMI;
              value           uniform 0;
          }
          interface1_runner
          {
              type            cyclicAMI;
              value           uniform 0;
          }
          interface2_runner
          {
              type            cyclicAMI;
              value           uniform 0;
          }
          wall2_suction
          {
              type            zeroGradient;
          }
          outflow_suction
          {
              type            zeroGradient;
          }
          wall1_suction
          {
              type            zeroGradient;
          }
          inlet
          {
              type            zeroGradient;
          }
          interFace1_suction
          {
              type            cyclicAMI;
              value           uniform 0;
          }
      
          interFace2_suction
          {
              type            cyclicAMI;
              value           uniform 0;
          }
          
          wall1_volute
          {
              type            zeroGradient;
          }
          interface_volute
          {
              type            cyclicAMI;
              value           uniform 0;
          }
          
          wall2_volute
          {
              type            zeroGradient;
          }
          outlet_volute
          {
              type            fixedValue;
              value           uniform 0;
          }
      }
      

      k文件,进口fixedValue,出口inletoutlet,壁面kqRWallFunction,交接面cyclicAMI

      /*--------------------------------*- C++ -*----------------------------------*\
      | =========                 |                                                 |
      | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
      |  \\    /   O peration     | Version:  4.1                                   |
      |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
      |    \\/     M anipulation  |                                                 |
      \*---------------------------------------------------------------------------*/
      FoamFile
      {
          version     2.0;
          format      ascii;
          class       volScalarField;
          location    "0";
          object      k;
      }
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      
      dimensions      [0 2 -2 0 0 0 0];
      
      internalField   uniform 0.01;
      
      boundaryField
      {
          wall1_runner
          {
              type            kqRWallFunction;
              value           uniform 0.01;
          }
      
          wall2_runner
          {
              type            kqRWallFunction;
              value           uniform 0.01;
          }
          wall3_runner
          {
              type            kqRWallFunction;
              value           uniform 0.01;
          }
      
          wall4_runner
          {
              type            kqRWallFunction;
              value           uniform 0.01;
          }
          interface_runner
          {
              type            cyclicAMI;
              value           $internalField;
          }
      
          interface1_runner
          {
              type            cyclicAMI;
              value           $internalField;
          }
          interface2_runner
          {
              type            cyclicAMI;
              value           $internalField;
          }
          wall2_suction
          {
              type            kqRWallFunction;
              value           uniform 0.01;
          }
          outflow_suction
          {
              type            kqRWallFunction;
              value           uniform 0.01;
          }
          wall1_suction
          {
              type            kqRWallFunction;
              value           uniform 0.01;
          }
          inlet
          {
              type            fixedValue;
              value           uniform 0.01;
          }
          interFace1_suction
          {
              type            cyclicAMI;
              value           $internalField;
          }
          interFace2_suction
          {
              type            cyclicAMI;
              value           $internalField;
          }
          wall1_volute
          {
              type            kqRWallFunction;
              value           uniform 0.01;
          }
          interface_volute
          {
              type            cyclicAMI;
              value           $internalField;
          }
          wall2_volute
          {
              type            kqRWallFunction;
              value           uniform 0.01;
          }
          outlet_volute
          {
              type            inletOutlet;
              inletValue      $internalField;
              value           $internalField;
          }
      
      }
      
      

      epsilon文件,进口fixedValue,出口inletoutlet,壁面epsilonWallFunction,交接面cyclicAMI

      /*--------------------------------*- C++ -*----------------------------------*\
      | =========                 |                                                 |
      | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
      |  \\    /   O peration     | Version:  4.1                                   |
      |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
      |    \\/     M anipulation  |                                                 |
      \*---------------------------------------------------------------------------*/
      FoamFile
      {
          version     2.0;
          format      ascii;
          class       volScalarField;
          location    "0";
          object      epsilon;
      }
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      
      dimensions      [0 2 -3 0 0 0 0];
      
      internalField   uniform 0.0095;
      
      boundaryField
      {
          wall1_runner
          {
              type            epsilonWallFunction;
              value           uniform 0.0095;
          }
      
          wall2_runner
          {
              type            epsilonWallFunction;
              value           uniform 0.0095;
          }
          wall3_runner
          {
              type            epsilonWallFunction;
              value           uniform 0.0095;
          }
      
          wall4_runner
          {
              type            epsilonWallFunction;
              value           uniform 0.0095;
          }
          interface_runner
          {
              type            cyclicAMI;
              value           $internalField;
          }
      
          interface1_runner
          {
              type            cyclicAMI;
              value           $internalField;
          }
          interface2_runner
          {
              type            cyclicAMI;
              value           $internalField;
          }
          wall2_suction
          {
              type            epsilonWallFunction;
              value           uniform 0.0095;
          }
          outflow_suction
          {
              type            epsilonWallFunction;
              value           uniform 0.0095;
          }
          wall1_suction
          {
              type            epsilonWallFunction;
              value           uniform 0.0095;
          }
          inlet
          {
              type            fixedValue;
              value           uniform 0.0095;
          }
          interFace1_suction
          {
              type            cyclicAMI;
              value           $internalField;
          }
          interFace2_suction
          {
              type            cyclicAMI;
              value           $internalField;
          }
          wall1_volute
          {
              type            epsilonWallFunction;
              value           uniform 0.0095;
          }
          interface_volute
          {
              type            cyclicAMI;
              value           $internalField;
          }
          wall2_volute
          {
              type            epsilonWallFunction;
              value           uniform 0.0095;
          }
          outlet_volute
          {
              type            inletOutlet;
              inletValue      $internalField;
              value           $internalField;
          }
      
      }
      
      1 条回复 最后回复 回复 引用
      • 李东岳
        李东岳 管理员 最后由 编辑

        只能看出来

        Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) at ??:?
        

        可能除以0了,但是并不知道是哪里出去了,需要更深度的debug

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

        1 条回复 最后回复 回复 引用
        • L
          lllwonderliquid 最后由 编辑

          嗯嗯:crying: 我看到CFD-online上一些前辈们也是这样说,然后我就懵圈了,完全不知道应该怎样去debug,不知道应该遵循一个怎样的流程或原则。。:crying:

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

            使用了AMI动静交接面,采用MRF坐标系

            为什么同时使用AMI和MRF?

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

            1 条回复 最后回复 回复 引用
            • L
              lllwonderliquid 最后由 编辑

              嗯。。因为网格划分时把动静部件分开划分,然后合并的时候有交接面,所以用了AMI。。然后我是采用多重参考系定义速度。。难道它们之间是有矛盾的?:big_mouth:

              D 2 条回复 最后回复 回复 引用
              • 李东岳
                李东岳 管理员 最后由 编辑

                这样的话你用AMI就不需要用MRF了 :big_mouth:

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

                1 条回复 最后回复 回复 引用
                • L
                  lllwonderliquid 最后由 编辑

                  嗯。。可我目前算的是稳态,不用MRF的话怎么处理内部的旋转部件呢:surprised:

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

                    估计你之前用过Fluent,OpenFOAM里面MRF也可以瞬态,拟瞬态。

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

                    Y 1 条回复 最后回复 回复 引用
                    • D
                      dzw05 教授 @lllwonderliquid 最后由 编辑

                      @lllwonderliquid 你可以不用设定AMI边界条件。这个和fluent可能不一样,也就是说动静网格可以是一个整体,但是把其中的一部分网格设定为rotater。至少我这样算是成功了。

                      自主匠心,普惠仿真。

                      1 条回复 最后回复 回复 引用
                      • D
                        dzw05 教授 @lllwonderliquid 最后由 编辑

                        @lllwonderliquid 或者另一个思路去理解。你分别生成了动、静区域,但是这两个区域的交界面必须一致。这是和fluent里不同的地方。我也一直试图理解AMI边界的用法,按理说和fluent一样是可行的,但是实际使用的时候并不行。

                        自主匠心,普惠仿真。

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

                          @李东岳 你好!之前看过你在cfd-online的回复(https://www.cfd-online.com/Forums/openfoam-programming-development/153989-modified-pimplefoam-solver-mrfpimplefoam-solver.html),我想知道pimpleFoam(2.3.x)能否可以直接使用MRF吗?只需要添加fvOptions即可?

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

                            只需要添加fvOptions即可?

                            是的。主要是多相那面代码处理有点甚至超过了Weller的高度。单相这面容易。

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

                            1 条回复 最后回复 回复 引用
                            • Y
                              yuanlee2011 最后由 yuanlee2011 编辑

                              @李东岳 也就是说MRF通过fvOptions(U)对动量方程产生作用?若在pimpleFOAM中添加温度T方程,需要考虑MRF作用吗,是否得添加fvOptions(T)?

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

                                @yuanlee2011

                                要的,简单添加

                                fvOptions(T);
                                fvOptions.constrain(TEqn);
                                fvOptions.correct(T);
                                

                                即可,这就是面向对象的方便之处。是不是要比Fluent简单点?我不清楚Fluent..没准Fluent那面更简单,哈哈。

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

                                Y 2 条回复 最后回复 回复 引用
                                • Y
                                  yuanlee2011 @李东岳 最后由 编辑

                                  @李东岳 非常感谢!

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

                                    @李东岳 有很多帖子(尤其与Fluent相关)都表明MRF只适用于稳态求解,不知道在Openfoam中能否实现MRF瞬态求解? 是否有相关的求解器(已验证其准确性)?

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

                                      0_1515405607854_捕获2.JPG

                                      目前OpenFOAM这面采用MRF做计算已经发表的文章有很多,包括我用OpenFOAM计算的旋转搅拌器。在这里贴一个其他课题组的:http://www.sciencedirect.com/science/article/pii/S0892687516301789

                                      有关Fluent,我的理解只局限于理论,你可以参考英文版的理论指南里面的论述。使用MRF进行瞬态模拟是可能的。

                                      但同时我也注意到很多用Fluent的用户告诉我说Fluent中的MRF不能用于瞬态计算。由于我没有用过Fluent,我自己也有点迷惑Fluent那面具体怎么个情况。

                                      不过可以确定的是,理论上是可以的

                                      0_1515405331036_捕获.JPG

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

                                      1 条回复 最后回复 回复 引用
                                      • 液
                                        液固两相流 最后由 编辑

                                        @lllwonderliquid 请问你的问题目前解决了吗?
                                        我目前也在使用MRF以及AMI边界条件进行计算,但是碰到了与你类似的问题

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