用simpleFoam求解器时出现的错误,求教如何解决



  • /*---------------------------------------------------------------------------*\
    | =========                 |                                                 |
    | \\      /  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   : Apr 10 2017
    Time   : 15:01:18
    Host   : "11"
    PID    : 9444
    Case   : /home/w11/OpenFOAM/w11-4.1/run/ASBM2-Da
    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-06
        field U	 tolerance 1e-06
    
    Reading field p
    
    Reading field U
    
    Reading/calculating face flux field phi
    
    Selecting incompressible transport model Newtonian
    Selecting turbulence model type laminar
    No MRF models present
    
    No finite volume options present
    
    
    Starting time loop
    
    Time = 1
    
    smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 9.33846e-13, No Iterations 136
    smoothSolver:  Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
    GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0975624, No Iterations 26
    time step continuity errors : sum local = 0.00312299, global = -0.000382393, cumulative = -0.000382393
    ExecutionTime = 11.95 s  ClockTime = 12 s
    
    .........
    
    Time = 80
    
    smoothSolver:  Solving for Ux, Initial residual = 0.564078, Final residual = 8.76275e-13, No Iterations 103
    smoothSolver:  Solving for Uy, Initial residual = 0.391492, Final residual = 9.39228e-13, No Iterations 97
    GAMG:  Solving for p, Initial residual = 0.990623, Final residual = 0.617109, No Iterations 1000
    time step continuity errors : sum local = 1.38438e+20, global = 5.64087e+19, cumulative = 5.64087e+19
    ExecutionTime = 1160.33 s  ClockTime = 1164 s
    
    Time = 81
    
    smoothSolver:  Solving for Ux, Initial residual = 0.414375, Final residual = 3.94608e-10, No Iterations 1000
    smoothSolver:  Solving for Uy, Initial residual = 0.468273, Final residual = 2.39705e-10, No Iterations 1000
    #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::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
    #4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
    #5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
    #6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
    #7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
    #8  Foam::fvMatrix<double>::solve() at ??:?
    #9  ? at ??:?
    #10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
    #11  ? at ??:?
    浮点数例外 (核心已转储)
    
    
    这是我的fvSolution文件
    solvers 
    {
    
        U
        {
            solver           smoothSolver;
            smoother         GaussSeidel;
            tolerance        1e-12;
            relTol           0;
            nSweeps          1;
        }
    
        p
        {
            solver           GAMG;
            tolerance        1e-9;
            relTol           0.1;
            smoother         GaussSeidel;
            nPreSweeps       0;
            nPostSweeps      2;
            cacheAgglomeration on;
            agglomerator     faceAreaPair;
            nCellsInCoarsestLevel 10;
            mergeLevels      1;
        }
    
    }
    
    
    SIMPLE
    {
        nNonOrthogonalCorrectors 0;
    
        residualControl
        {
            p               1e-6;
            U               1e-6;
        }
    
    	pRefCell 0;
    	pRefValue 0;
    }
    
    relaxationFactors
    {
        p               0.2;
        U               0.9;
    }
    
    

    这个问题困扰了我好几天,本人小白一枚,年初刚接触OpenFOAM,之前做过几次小的模拟没遇到过这种情况,请教各位大神如何解决,感激不尽。


  • 管理员

    你的质量不守恒。你的网格质量如何?确定不需要开湍流?



  • Create time
    
    Create polyMesh for time = 0
    
    Time = 0
    
    Mesh stats
        points:           972441
        faces:            2653016
        internal faces:   2348082
        cells:            841637
        faces per cell:   5.94211
        boundary patches: 6
        point zones:      0
        face zones:       0
        cell zones:       0
    
    Overall number of cells of each type:
        hexahedra:     792917
        prisms:        44780
        wedges:        0
        pyramids:      0
        tet wedges:    0
        tetrahedra:    0
        polyhedra:     3940
        Breakdown of polyhedra by number of faces:
            faces   number of cells
                4   4
                5   3936
    
    Checking topology...
        Boundary definition OK.
     ***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
        Cell to face addressing OK.
        Point usage OK.
        Upper triangular ordering OK.
        Face vertices OK.
        Number of regions: 1 (OK).
    
    Checking patch topology for multiply connected surfaces...
                       Patch    Faces   Points                  Surface topology
                frontAndBack    33720    37963  ok (non-closed singly connected)
                        left    10000    10251  ok (non-closed singly connected)
                       right    10000    10251  ok (non-closed singly connected)
                      bottom     3026     3561  ok (non-closed singly connected)
                         top     4712     5452  ok (non-closed singly connected)
                  fixedWalls   243476   249736  multiply connected (shared edge)
      <<Writing 2 conflicting points to set nonManifoldPoints
    
    Checking geometry...
        Overall domain bounding box (-0.17 -0.0604041 -0.001) (0.17 0.0601678 0.001)
        Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
        Mesh has 2 solution (non-empty) directions (1 1 0)
     ***Number of edges not aligned with or perpendicular to non-empty directions: 928948
      <<Writing 951037 points on non-aligned edges to set nonAlignedEdges
        Boundary openness (-2.86088e-16 1.1772e-16 -1.21395e-15) OK.
        Max cell openness = 7.07551e-16 OK.
        Max aspect ratio = 12.3976 OK.
        Minimum face area = 1.35674e-09. Maximum face area = 2.45047e-06.  Face area magnitudes OK.
        Min volume = 6.42698e-13. Max volume = 9.79806e-11.  Total volume = 3.44166e-05.  Cell volumes OK.
        Mesh non-orthogonality Max: 77.2055 average: 16.6713
       *Number of severely non-orthogonal (> 70 degrees) faces: 28.
        Non-orthogonality check OK.
      <<Writing 28 non-orthogonal faces to set nonOrthoFaces
     ***Error in face pyramids: 1 faces are incorrectly oriented.
      <<Writing 1 faces with incorrect orientation to set wrongOrientedFaces
     ***Max skewness = 7.85662, 2557 highly skew faces detected which may impair the quality of the results
      <<Writing 2557 skew faces to set skewFaces
        Coupled point location match (average 0) OK.
    
    Failed 3 mesh checks.
    


  • @赵一铭 之前的模拟一直用的层流,没出过这种问题。是哪个参数大小需要修改么?


  • 版主

    @温宝霖 这个网格有问题,不能算



  • @温宝霖
    你出错的那个例子也是用层流模拟的:upset: 网格snappyHexMesh做的?上来就79万啊。



  • @cfd-china 是的,用的snappyHexMesh做的网格。老师跟我说网格数多一点模拟的值更准确,我就用的100×100×100网格做的。我是照着一个案例自己取的值,案例做的是2维模拟,网格数400×100×1。我取的是一个立方体,之前模拟的都是2维,第一次做3维就懵了


  • 管理员

    @温宝霖
    snappyHexMesh生成的网格有时候质量不是特别高会影响收敛,如果几何简单的话最好生成六面体网格,simpleFoam非常稳健,设置正确很难出现收敛问题。


  • 版主

    @温宝霖 检查边界条件,3D模拟不应该包含empty边界



  • @wwzhao 好的,谢谢您



  • @wwzhao 我改了边界条件之后重生成了网格,果然模拟出来了。太谢谢您了,解决了困扰我的问题



  • 这个问题现在已经解决了,是数值单位的错误。因为我的初始边界条件中入口处的p=1e-3,出口处的p=0,将网格的数值缩小了一千倍以后,使他们在同一数量级上再运行simpleFoam就不会出现“浮点数例外,核心已转储”的错误了。
    我还发现在用snappyHexMesh画三维网格的时候,如果将blockMeshDict中frontAndBack设为empty,在进行snap步骤之后依然得不到很优美的平滑的网格连接。而我听从了@wwzhao 的建议之后,将frontAndBack设置成与除了出口和入口之外的其他四个面的边界条件一致,也就是patch之后,再进行snappyHexMesh,就能得到平滑的网格了。
    这三天我失败了上百次,终于在昨天晚上凌晨的时候解决了这个问题,谢谢各位大神的指导,谢谢你们。



  • @温宝霖 恭喜。
    你模拟的是什么问题?能否发个网格截图出来看看?听起来挺有意思。


登录后回复
 

与 CFD 中国 的连接断开,我们正在尝试重连,请耐心等待