计算报错未定义关键词PIMPLE



  • 各位朋友新年好!

    最近想在of2.3版本上跑一个空化case,用的LES一方程涡粘模型,以前这个case在6.0版本运行没有问题,但在2.3上报错如下:

    --> FOAM FATAL IO ERROR: 
    
    keyword PIMPLE is undefined in dictionary "/project/ll/new/system/fvSolution"
    
    file: /project/ll/new/system/fvSolution from line 20 to line 133.
    
        From function dictionary::subDict(const word& keyword) const
        in file db/dictionary/dictionary.C at line 643.
    
    FOAM exiting
    

    自己对照着of2.3的tutorials中的case修改了好久,也不知道哪里出了问题,,,:zoule:
    fvSolution文件如下:

    solvers
    {
        alpha.water
        {
            nAlphaCorr      1;
            nAlphaSubCycles 1;
            cAlpha          1;
    
            MULESCorr       yes;
            nLimiterIter    5;
    
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-8;
            relTol          0;
            maxIter         100;
    
        }
    
         alpha.waterFinal
        {
            nAlphaCorr      1;
            nAlphaSubCycles 1;
            cAlpha          1;
    
            MULESCorr       yes;
            nLimiterIter    5;
    
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-8;
            relTol          0;
            maxIter         100;
         }
    
    	  "U.*"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-6;
            relTol          0;
        };
    
        pcorr
        {
            solver          PCG;
            preconditioner
            {
                preconditioner  GAMG;
                tolerance       1e-05;
                relTol          0;
                cacheAgglomeration true;
    	    nCellsInCoarsestLevel 10;
    	    nPreSweeps      0;
                nPostSweeps     2;
                nFinestSweeps   2;
    	    agglomerator    faceAreaPair;
                smoother        DICGaussSeidel;
    	    mergeLevels     1;
            }
            tolerance       1e-05;
            relTol          0;
            maxIter         500;
        }
    	
    
        p_rgh
        {
            solver          GAMG;
            tolerance       1e-07;
            relTol          0.00001;
            smoother        DIC;
        }
    
        p_rghFinal
        {
            solver          PCG;
            preconditioner
            {
               preconditioner  GAMG;
    
                tolerance        1e-7;
                relTol           0;
    
                nVcycles         2;
    
                smoother         DICGaussSeidel;
                nPreSweeps       0;
                nPostSweeps      2;
                nFinestSweeps    2;
    
                cacheAgglomeration true;
                nCellsInCoarsestLevel 10;
                agglomerator     faceAreaPair;
                mergeLevels      1;
            }
            tolerance       1e-07;
            relTol          0;
            maxIter         1000;
        }
    
    
        "(U|k)"
        {
            solver          smoothSolver;
            smoother        GaussSeidel;
            tolerance       1e-08;
            relTol          0.1;
        }
    
    
        }
        "(U|k)Final"
        {
            solver          smoothSolver;
            smoother        GaussSeidel;
            tolerance       1e-08;
            relTol          0;
        }
    }
    
    PIMPLE
    {
        momentumPredictor no;
        nCorrectors     2;
        nNonOrthogonalCorrectors 1;
    }
    

    哪位朋友可以给我提供点解决思路呢??



  • 这只是一个非常简单的设置问题,我觉得你已经处理好了



  • 是的,已经解决。

    解决方法是 直接拷贝一个低版本(我用的2.3版本)tutorials里面case的 fvSolution文件,以这个文件为基础模板,进行相应的修改(即把高版本的代码 对应的替换过来)

    我分析我以前犯的错误应该是一些格式性的问题,以后还是不要乱用为好!

    最后给大家分享一下,我修改的在of2.3里面可以运行的fvSolution文件代码

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  2.3.0                                 |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      fvSolution;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    solvers
    {
        
        alpha.water
        {
            cAlpha          1;
            nAlphaCorr      1;
            nAlphaSubCycles 1;
    
            MULESCorr       yes;
            nLimiterIter    5;
    
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-8;
            relTol          0;
            maxIter         100;
           
        };
    
    	 alpha.waterFinal
        {
            nAlphaCorr      1;
            nAlphaSubCycles 1;
            cAlpha          1;
    
            MULESCorr       yes;
            nLimiterIter    5;
    
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-8;
            relTol          0;
            maxIter         100;
    
        }
    
    
        "U.*"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-6;
            relTol          0;
        };
    
    
    
        "pcorr.*"
    	{
         solver          PCG;
            preconditioner
            {
               preconditioner  GAMG;
               tolerance       1e-05;
               relTol          0;
               cacheAgglomeration no;
    		   nCellsInCoarsestLevel 10;
    		  // nPreSweeps      0;
              // nPostSweeps     2;
              // nFinestSweeps   2;
    		   agglomerator    faceAreaPair;
               smoother        DICGaussSeidel;
    		   mergeLevels     1;
    
            }
            tolerance       1e-05;
            relTol          0;
    		agglomerator    faceAreaPair;
            maxIter         1000;
        }
    
    	 Phi
        {
            $p_rgh;
            relTol          0;
        };
    
        p_rgh
        {
            //solver          GAMG;
            //tolerance       1e-7;
            //relTol          0.00001;
    		//smoother        DIC;
    
    		solver           GAMG;
            tolerance        1e-7;
            relTol           0.00001;
    
            smoother         DICGaussSeidel;
            nPreSweeps       0;
            nPostSweeps      2;
    
            cacheAgglomeration true;
    
            nCellsInCoarsestLevel 10;
            agglomerator     faceAreaPair;
            mergeLevels      1;
    
            maxIter          100;
            minIter		 5;
        }
    
        p_rghFinal
        {
             solver          PCG;
            preconditioner
            {
               preconditioner  GAMG;
    
                tolerance        1e-7;
                relTol           0;
    
                nVcycles         2;
    
                smoother         DICGaussSeidel;
                nPreSweeps       0;
                nPostSweeps      2;
                nFinestSweeps    2;
    
                cacheAgglomeration true;
                nCellsInCoarsestLevel 10;
                agglomerator     faceAreaPair;
                mergeLevels      1;
            }
            tolerance       1e-07;
            relTol          0;
            maxIter         1000;
        }
    
         U
        {
            solver          smoothSolver;
            smoother        GaussSeidel;
            tolerance       1e-06;
            relTol          0;
            nSweeps         1;
        }
    
        "(U|k|nuSgs)"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-8;
            relTol          0.1;
            minIter         1;
    		maxIter         100;
        }
    
        "(U|k|nuSgs)Final"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-08;
            relTol          0;
        }
    }
    
    PIMPLE
    {
        correctPhi          yes;
        nOuterCorrectors    1;
        nCorrectors         3;
        nNonOrthogonalCorrectors 0;
    	momentumPredictor          no;
    }
    

Log in to reply
 

CFD中文网 2016 - 2020 | 京ICP备15017992号-2