CFD中文网

    CFD中文网

    • 登录
    • 搜索
    • 最新

    pointwise划分了地形网格计算域为3000*3000*1000 ,用openFoam中simpleFoam求解计算错误?

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

      我在这个问题这儿卡了2个月了,我用pointwise划分了一个复杂地型网格,计算域300030001000,最小网格长宽为30*30,第一层网格高度为50cm,我计算的时候出现如下现象,到最后一行,算例自动停止。
      我最初的想法是将of自带的一个例子里的网格替换成用pointwise生成的网格,进行计算,不知道出了什么问题,希望能得到各位老师的帮助,谢谢!

      /*---------------------------------------------------------------------------*\
        =========                 |
        \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
         \\    /   O peration     | Website:  https://openfoam.org
          \\  /    A nd           | Version:  6
           \\/     M anipulation  |
      \*---------------------------------------------------------------------------*/
      Build  : 6-e29811f5dff8
      Exec   : simpleFoam
      Date   : Jun 07 2019
      Time   : 18:39:08
      Host   : "DESKTOP-K2TDLI2"
      PID    : 434
      I/O    : uncollated
      Case   : /home/dyb/turbineSiting
      nProcs : 1
      sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
      fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
      allowSystemOperations : Allowing user-supplied system call operations
      
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      Create time
      
      Create mesh for time = 0
      
      
      SIMPLE: Convergence criteria found
              p: tolerance 0.001
              U: tolerance 0.0001
              "(k|epsilon)": tolerance 0.0001
      
      Reading field p
      
      Reading field U
      
      Reading/calculating face flux field phi
      
      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;
          sigmaEps        1.11;
          C3              0;
          sigmak          1;
      }
      
      No MRF models present
      
      No finite volume options present
      
      Starting time loop
      
      Time = 0.5
      
      smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.130925946068, No Iterations 1000
      smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.305787562946, No Iterations 1000
      smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 1.18059515052, No Iterations 1000
      

      如下是我的一些设置
      fvSolution

      /*--------------------------------*- C++ -*----------------------------------*\
        =========                 |
        \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
         \\    /   O peration     | Website:  https://openfoam.org
          \\  /    A nd           | Version:  6
           \\/     M anipulation  |
      \*---------------------------------------------------------------------------*/
      FoamFile
      {
          version     2.0;
          format      ascii;
          class       dictionary;
          object      fvSolution;
      }
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      
      solvers
      {
          p
          {
              solver           GAMG;
              tolerance        1e-7;
              relTol           0.1;
              smoother         GaussSeidel;
          }
      
          U
          {
              solver           smoothSolver;
              smoother         GaussSeidel;
              tolerance        1e-8;
              relTol           0.1;
              nSweeps          1;
          }
      
          k
          {
              solver           smoothSolver;
              smoother         GaussSeidel;
              tolerance        1e-8;
              relTol           0.1;
              nSweeps          1;
          }
      
          epsilon
          {
              solver           smoothSolver;
              smoother         GaussSeidel;
              tolerance        1e-8;
              relTol           0.1;
              nSweeps          1;
          }
      }
      
      SIMPLE
      {
          nNonOrthogonalCorrectors 0;
      
          residualControl
          {
              p               1e-3;
              U               1e-4;
              "(k|epsilon)"   1e-4;
          }
      }
      
      relaxationFactors
      {
          fields
          {
              p               0.3;
          }
          equations
          {
              U               0.7;
              k               0.7;
              epsilon         0.7;
          }
      }
      
      cache
      {
          grad(U);
      }
      
      // ************************************************************************* //
      
      

      fvSchemes

      /*--------------------------------*- C++ -*----------------------------------*\
        =========                 |
        \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
         \\    /   O peration     | Website:  https://openfoam.org
          \\  /    A nd           | Version:  6
           \\/     M anipulation  |
      \*---------------------------------------------------------------------------*/
      FoamFile
      {
          version     2.0;
          format      ascii;
          class       dictionary;
          object      fvSchemes;
      }
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      
      ddtSchemes
      {
          default             steadyState;
      }
      
      gradSchemes
      {
          default             Gauss linear;
      }
      
      divSchemes
      {
          default             none;
      
          div(phi,U)          bounded Gauss upwind;
          div(phi,epsilon)    bounded Gauss upwind;
          div(phi,k)          bounded Gauss upwind;
      
          div((nuEff*dev2(T(grad(U)))))    Gauss linear;
      }
      
      laplacianSchemes
      {
          default             Gauss linear limited corrected 0.33;
      }
      
      interpolationSchemes
      {
          default             linear;
      }
      
      snGradSchemes
      {
          default             limited corrected 0.33;
      }
      
      
      // ************************************************************************* //
      
      

      controlDict

      /*--------------------------------*- C++ -*----------------------------------*\
        =========                 |
        \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
         \\    /   O peration     | Website:  https://openfoam.org
          \\  /    A nd           | Version:  6
           \\/     M anipulation  |
      \*---------------------------------------------------------------------------*/
      FoamFile
      {
          version     2.0;
          format      ascii;
          class       dictionary;
          object      controlDict;
      }
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      
      application     simpleFoam;
      
      startFrom       latestTime;
      
      startTime       0;
      
      stopAt          endTime;
      
      endTime         1000;
      
      deltaT          0.5;
      
      writeControl    timeStep;
      
      writeInterval   50;
      
      purgeWrite      0;
      
      writeFormat     binary;
      
      writePrecision  12;
      
      writeCompression off;
      
      timeFormat      general;
      
      timePrecision   6;
      
      runTimeModifiable yes;
      
      libs ("libatmosphericModels.so");
      
      // ************************************************************************* //
      
      
      1 条回复 最后回复 回复 引用
      • 李东岳
        李东岳 管理员 最后由 李东岳 编辑

        \

        看起来像是边界条件设置有问题

        线上CFD课程开始报名:http://www.dyfluid.com/class.html

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

        1 条回复 最后回复 回复 引用
        • dyb
          dyb 最后由 李东岳 编辑

          李老师,我把我的边界条件发过来,您帮忙看一下。大概是压力项可能出错了

          epsilon

          /*--------------------------------*- C++ -*----------------------------------*\
            =========                 |
            \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
             \\    /   O peration     | Website:  https://openfoam.org
              \\  /    A nd           | Version:  6
               \\/     M anipulation  |
          \*---------------------------------------------------------------------------*/
          FoamFile
          {
              version     2.0;
              format      ascii;
              class       volScalarField;
              location    "0";
              object      epsilon;
          }
          // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
          
          dimensions      [0 2 -3 0 0 0 0];
          
          #include        "include/initialConditions"
          
          internalField   uniform $turbulentEpsilon;
          
          boundaryField
          {
              terrain
              {
                  type            epsilonWallFunction;
                  Cmu             0.09;
                  kappa           0.4;
                  E               9.8;
                  value           $internalField;
              }
          
              outlet
              {
                  type            inletOutlet;
                  inletValue      uniform $turbulentEpsilon;
                  value           $internalField;
              }
          
              inlet
              {
                  type            atmBoundaryLayerInletEpsilon;
                  #include        "include/ABLConditions"
              }
          
              ground
              {
                  type            zeroGradient;
              }
          
              top
              {
                  type            slip;
              }
              sides   
              {
                  type            slip;
              }
          }
          
          
          // ************************************************************************* //
          

          k

          /*--------------------------------*- C++ -*----------------------------------*\
            =========                 |
            \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
             \\    /   O peration     | Website:  https://openfoam.org
              \\  /    A nd           | Version:  6
               \\/     M anipulation  |
          \*---------------------------------------------------------------------------*/
          FoamFile
          {
              version     2.0;
              format      ascii;
              class       volScalarField;
              object      k;
          }
          // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
          
          #include        "include/initialConditions"
          
          dimensions      [0 2 -2 0 0 0 0];
          
          internalField   uniform $turbulentKE;
          
          boundaryField
          {
              outlet
              {
                  type            inletOutlet;
                  inletValue      uniform $turbulentKE;
                  value           $internalField;
              }
          
              inlet
              {
                  type            atmBoundaryLayerInletK;
                  #include        "include/ABLConditions"
              }
          
              terrain
              {
                  type            kqRWallFunction;
                  value           uniform 0.0;
              }
          
              ground
              {
                  type            zeroGradient;
              }
          
              top
              {
                  type            slip;
              }
              sides   
              {
                  type            slip;
              }
          }
          
          
          // ************************************************************************* //
          nut
          /*--------------------------------*- C++ -*----------------------------------*\
            =========                 |
            \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
             \\    /   O peration     | Website:  https://openfoam.org
              \\  /    A nd           | Version:  6
               \\/     M anipulation  |
          \*---------------------------------------------------------------------------*/
          FoamFile
          {
              version     2.0;
              format      ascii;
              class       volScalarField;
              location    "0";
              object      nut;
          }
          // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
          
          dimensions      [0 2 -1 0 0 0 0];
          
          internalField   uniform 0;
          
          boundaryField
          {
              #include "include/ABLConditions"
          
              inlet
              {
                  type            calculated;
                  value           uniform 0;
              }
          
              outlet
              {
                  type            calculated;
                  value           uniform 0;
              }
          
              terrain
              {
                  type            nutkAtmRoughWallFunction;
                  z0              $z0;
                  value           uniform 0.0;
              }
          
              ground
              {
                  type            calculated;
                  value           uniform 0;
              }
          
              top
              {
                  type            slip;
              }
              sides   
              {
                  type            slip;
              }
          }
          
          
          // ************************************************************************* //
          

          P

          /*--------------------------------*- C++ -*----------------------------------*\
            =========                 |
            \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
             \\    /   O peration     | Website:  https://openfoam.org
              \\  /    A nd           | Version:  6
               \\/     M anipulation  |
          \*---------------------------------------------------------------------------*/
          FoamFile
          {
              version     2.0;
              format      ascii;
              class       volScalarField;
              object      p;
          }
          // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
          
          #include        "include/initialConditions"
          
          dimensions      [0 2 -2 0 0 0 0];
          
          internalField   uniform $pressure;
          
          boundaryField
          {
              inlet
              {
                  type            zeroGradient;
              }
          
              outlet
              {
                  type            uniformFixedValue;
                  uniformValue    $internalField;
              }
          
              terrain
              {
                  type            zeroGradient;
              }
          
              ground
              {
                  type            zeroGradient;
              }
              top
              {
                  type            slip;
              }
              sides   
              {
                  type            slip;
              }
              
          }
          
          // ************************************************************************* //
          
          

          u

          /*--------------------------------*- C++ -*----------------------------------*\
            =========                 |
            \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
             \\    /   O peration     | Website:  https://openfoam.org
              \\  /    A nd           | Version:  6
               \\/     M anipulation  |
          \*---------------------------------------------------------------------------*/
          FoamFile
          {
              version     2.0;
              format      ascii;
              class       volVectorField;
              location    "0";
              object      U;
          }
          // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
          
          #include        "include/initialConditions"
          
          dimensions      [0 1 -1 0 0 0 0];
          
          internalField   uniform $flowVelocity;
          
          boundaryField
          {
              outlet
              {
                  type            inletOutlet;
                  inletValue      uniform (0 0 0);
                  value           $internalField;
              }
          
              inlet
              {
                  type            atmBoundaryLayerInletVelocity;
                  #include        "include/ABLConditions"
              }
          
              terrain
              {
                  type            uniformFixedValue;
                  uniformValue    (0 0 0);
                  value           uniform (0 0 0);
              }
          
              ground
              {
                  type            uniformFixedValue;
                  value           uniform (0 0 0);
                  uniformValue    constant (0 0 0);
              }
          
              top
              {
                  type            slip;
              }
              sides   
              {
                  type            slip;
              }
          }
          
          
          // ************************************************************************* //
          
          

          说明文件ABL

            =========                 |
            \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
             \\    /   O peration     | Website:  https://openfoam.org
              \\  /    A nd           | Version:  6
               \\/     M anipulation  |
          \*---------------------------------------------------------------------------*/
          
          Uref                 10.0;
          Zref                 20;
          zDir                 (0 0 1);
          flowDir              (1 0 0);
          z0                   uniform 0.1;
          zGround              uniform 0;
          
          // ************************************************************************* //
          
          
          

          initialConditions

          /*--------------------------------*- C++ -*----------------------------------*\
            =========                 |
            \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
             \\    /   O peration     | Website:  https://openfoam.org
              \\  /    A nd           | Version:  6
               \\/     M anipulation  |
          \*---------------------------------------------------------------------------*/
          
          flowVelocity         (0 0 0);
          pressure             0;
          turbulentKE          1.3;
          turbulentEpsilon     0.01;
          
          // ************************************************************************* //
          
          

          fixedInlet

          inlet
          {
              type  fixedValue;
              value $internalField;
          }
          
          1 条回复 最后回复 回复 引用
          • dyb
            dyb 最后由 编辑

            解决了,不同尺度的网格对应压力求解方法的平滑smoother有问题,初始条件也没有错,

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