Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. PIMPLE算法的使用

PIMPLE算法的使用

已定时 已固定 已锁定 已移动 OpenFOAM
8 帖子 4 发布者 6.8k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 小 离线
    小 离线
    小考拉
    写于 最后由 编辑
    #1

    最近想用PIMPLE算法,只是修改了fvSolution里面 PIMPLE下面的 nOuterCorrectors

    代码如下

    solvers
    {
        alpha.water
        {
            nAlphaCorr      1;
            nAlphaSubCycles 1;
            cAlpha          1;
    
            MULESCorr       yes;
            nLimiterIter    5;
    
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-7;
            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;
        };
    
        ".*(rho|rhoFinal)"
        {
            solver          diagonal;
        }
    
        pcorr
        {
            solver          PCG;
            preconditioner
            {
                preconditioner  GAMG;
                tolerance       1e-05;
                relTol          0;
                smoother        DICGaussSeidel;
            }
            tolerance       1e-05;
            relTol          0;
            maxIter         500;
        }
    	
        Phi
        {
            $p_rgh;
            relTol          0;
        };
    
        p_rgh
        {
            solver          GAMG;
            tolerance       1e-07;
            relTol          0.00001;
            smoother        DIC;
        }
    
        p_rghFinal
        {
            solver          PCG;
            preconditioner
            {
                preconditioner  GAMG;
                tolerance       1e-07;
                relTol          0;
                nVcycles        2;
                smoother        DICGaussSeidel;
                nPreSweeps      2;
            }
            tolerance       1e-07;
            relTol          0;
            maxIter         1000;
        }
    
        U
        {
            solver          smoothSolver;
            smoother        GaussSeidel;
            tolerance       1e-06;
            relTol          0;
            nSweeps         1;
        }
    
        "(U|k|omega)"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-08;
            relTol          0.0001;
        }
    
        "(T|k|B|nuTilda).*"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-08;
            relTol          0;
            maxIter         100;
        }
        "(U|k|omega)Final"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-08;
            relTol          0;
        }
    }
    
    PIMPLE
    {
        momentumPredictor no;
        transonic       no;
        nOuterCorrectors 1;
        nCorrectors    2;
        nNonOrthogonalCorrectors 0;
    }
    
    

    但计算输出的log文件里面显示

    PIMPLE: No convergence criteria found
    
    
    PIMPLE: Operating solver in PISO mode
    

    PIMPLE算法的收敛准则如何设置呢?

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #2

    这样就是运行的PISO算法,完全没问题。你用的什么算例,PISO算法我觉得挺好的,

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    1 条回复 最后回复
  • 小 离线
    小 离线
    小考拉
    写于 最后由 编辑
    #3

    老师您好!

    我用的LES-VOF模型计算 水翼空化,我看计算空化的文献里面大部分都用的是PIMPLE,PIMPLE的稳定性可能高一点,所以我想试一试。

    我目前计算的水翼空化,网格量400w,采用PISO算法,开的动态时间步长,计算一段时间就耗散掉了。。。。我感觉可能是求解器的问题。。。

    星 1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 李东岳 编辑
    #4

    我建议你用小点的网格试试

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    1 条回复 最后回复
  • 星 离线
    星 离线
    星星星星晴
    在 中回复了 小考拉 最后由 编辑
    #5

    @小考拉

    /*--------------------------------*- 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       dictionary;
       location    "system";
       object      fvSolution;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    solvers
    {
       rho
       {
           /*solver          PCG;
           preconditioner  DIC;
           tolerance       1e-05;
           relTol          0.1;
       	minIter			1;*/
    
       	solver          		GAMG;
           tolerance       		1e-06;
           relTol         		 	0;
           smoother        		GaussSeidel;
           nPreSweeps      		0;
           nPostSweeps     		2;
           cacheAgglomeration 		true;
           nCellsInCoarsestLevel 	64;
           agglomerator    		faceAreaPair;
           mergeLevels     		1;
       	minIter					1;
       }
    
       rhoFinal
       {
           $rho;
           tolerance       1e-05;
           relTol          0;
       	minIter			1;
       }
    
       "(U|k|epsilon)"
       {
           solver          		GAMG;
           tolerance       		1e-06;
           relTol         		 	0;
           smoother        		GaussSeidel;
           nPreSweeps      		0;
           nPostSweeps     		2;
           cacheAgglomeration 		true;
           nCellsInCoarsestLevel 	64;
           agglomerator    		faceAreaPair;
           mergeLevels     		1;
       	minIter					1;
       }
    
       p
       {
            solver          		GAMG;
           tolerance       		1e-06;
           relTol         		 	0;
           smoother        		GaussSeidel;
           nPreSweeps      		0;
           nPostSweeps     		2;
           cacheAgglomeration 		true;	
           nCellsInCoarsestLevel 	64;
           agglomerator    		faceAreaPair;
           mergeLevels     		1;
       	minIter					1;
       }
    
       pFinal
       {
           $p;
           tolerance       1e-06;
           relTol          0;
       }
    
       "(U|k|epsilon)Final"
       {
           $U;
           tolerance       1e-06;
           relTol          0;
       }
    
       "(Yi|O2|N2|H2O)"
       {
           solver          PBiCG;
           preconditioner  DILU;
           tolerance       1e-6;
           relTol          0;
       	minIter					1;
       }
    
       h
       {
           $Yi;
           relTol          0.1;
       }
    
       hFinal
       {
           $Yi;
       }
    }
    
    PIMPLE
    {
        nOuterCorrectors 			10; //for PIMPLE . if 1 PISO
       nCorrectors     			3;	//set the number of times the algorithm solves 
       								//the P and momentum corrector in each Time step
       momentumPredictor	 		yes;
       nNonOrthogonalCorrectors 	1;
       pRefCell        			0;
       pRefValue       			0;
       transonic       no;
    
       turbOnFinalIterOnly         false;
    }
    
    residualControl
       {
           U
           {
                   tolerance  1e-5;
                   relTol      0;
           }
           p
           {
                   tolerance  1e-5;
                   relTol      0;
           }
       	k
           {
                   tolerance  1e-5;
                   relTol      0;
           }
       	epsilon
           {
                   tolerance  1e-5;
                   relTol      0;
           }
       	rho
       	{
       			 tolerance  1e-5;
                   relTol      0;
       	}
        }
    
    
    relaxationFactors
    {
       equations
       {
           ".*Final"       0.1;
       }
    }/*
    
    solvers
    {
       p
       {
           solver          		GAMG;
           tolerance       		1e-05;
           relTol         		 	0;
           smoother        		DICGaussSeidel;
           nPreSweeps      		0;
           nPostSweeps     		2;
           cacheAgglomeration 		true;	
           nCellsInCoarsestLevel 	8;
           agglomerator    		faceAreaPair;
           mergeLevels     		2;
       	minIter					1;
       }
    
       pFinal
       {
          	$p;
           smoother        DICGaussSeidel
    ;											//DILUGaussSeidel -> para malhas mais complexas
           tolerance       1e-07;
           relTol          0;
       }
    
       "(U|k|epsilon)"
       {
           solver          		GAMG;
           tolerance       		1e-05;
           relTol         		 	0;
           smoother        		DILUGaussSeidel;
           nPreSweeps      		0;
           nPostSweeps     		2;
           cacheAgglomeration 		true;
           nCellsInCoarsestLevel 	8;
           agglomerator    		faceAreaPair;
           mergeLevels     		2;
       	minIter					1;
       }
    
      
       "(U|k|epsilon)Final"
       {
           solver          		GAMG;
           tolerance       		1e-05;
           relTol         		 	0;
           smoother        		DILUGaussSeidel;
           nPreSweeps      		0;
           nPostSweeps     		2;
           cacheAgglomeration 		true;
           nCellsInCoarsestLevel 	8;
           agglomerator    		faceAreaPair;
           mergeLevels     		2;
       	minIter					1;
       }
    
    
    }
    PIMPLE
    {
       nOuterCorrectors 			30;//for PIMPLE . if 1 PISO
       nCorrectors     			3;	//set the number of times the algorithm solves 
       								//the P and momentum corrector in each Time step
       momentumPredictor	 		yes;
       nNonOrthogonalCorrectors 	1;
       pRefCell        			0;
       pRefValue       			0;
    
       turbOnFinalIterOnly         false;
    
       residualControl
       {
           U
           {
                   tolerance  1e-4;
                   relTol      0;
           }
           p
           {
                   tolerance  1e-4;
                   relTol      0;
           }
        }
    
       relaxationFactors
       {
       	equations
       	{
       	    "k.*"       0.1;
       	}
       }
    
    }*/
    /***************************************************Explain Documentation***********************
    simulation stop at
    {
       1. the residual falls below the solver tolerance, tolerance;
       2. the ratio of current to initial residuals falls below the solver relative tolerance, relTol;
       3. maxIter 1000
       in transient simulation always force relTol= 0 to force simulation at each time step should be converged 
    }
    
    GAMG	generalised geometric-algebraic multi-grid.
    {	
       solver          		GAMG;
       tolerance       		1e-07;
       relTol         		 	0;
       cacheAgglomeration 		true;			switch specifying caching of the agglomeration strategy (default true).
       nCellsInCoarsestLevel 	2;				approximate mesh size at the most coarse level in terms of the number of cells (default 10).
       directSolveCoarset		false			use a direct solver at the coarsest level (default false).
       agglomerator    		faceAreaPair;
       mergeLevels     		2;				keyword controls the speed at which coarsening or refinement is performed. simple mesh use 2
       preSweepsLevelMultiplier				multiplier for the the number of sweeps between each coarsening level (default 1).
       maxPreSweeps							maximum number of sweeps as the algorithm is coarsening (default 4).
       nPostSweeps 							number of sweeps as the algorithm is refining (default 2).
       postSweepsLevelMultiplier 				multiplier for the the number of sweeps between each refinement level (default 1).
       maxPostSweeps 							maximum number of sweeps as the algorithm is refining (default 4).
       nFinestSweeps 							number of sweeps at finest level (default 2).
    
       smoother        		DILUGaussSeidel;
       nPreSweeps      		0;				number of sweeps as the algorithm is coarsening (default 0).
       nPostSweeps     		2;
       minIter					1;
    }
    
    *******************************************************************************/
    /*rho
       {
           solver          PCG;
           preconditioner  DIC;
           tolerance       1e-05;
           relTol          0.1;
       }
    
       rhoFinal
       {
           $rho;
           tolerance       1e-05;
           relTol          0;
       }
    */
       /*"(Yi|O2|N2|H2O)"
       {
           solver          PBiCG;
           preconditioner  DILU;
           tolerance       1e-6;
           relTol          0;
       }
    
       h
       {
           $Yi;
           relTol          0.1;
       }
    
       hFinal
       {
           $Yi;
       }
    }
    */
    /*PIMPLE
    {
       transonic       no;
       nCorrectors     2;
       nNonOrthogonalCorrectors 0;
       momentumPredictor yes;
    }
    
    relaxationFactors
    {
       equations
       {
           ".*Final"       1;
       }
    }*/
    // ************************************************************************* //
    // ************************************************************************* //
    

    游荡

    C 1 条回复 最后回复
  • C 离线
    C 离线
    Calf.Z-DNS
    在 中回复了 星星星星晴 最后由 编辑
    #6

    @星星星星晴 在 PIMPLE算法的使用 中说:

    nCorrectors

    对于nCorrectors,啥情况下需要设成3呢,之前好像在论坛上看到设成2就够了。

    星 1 条回复 最后回复
  • 星 离线
    星 离线
    星星星星晴
    在 中回复了 Calf.Z-DNS 最后由 编辑
    #7

    @Calf-Z-DNS 是的,其实这个是相当于设置计算p的次数,我的理解是根据网格情况选择,网格简单,结构不是特别复杂的,1就可以,你可以具体找一下PIMPLE的介绍

    游荡

    C 1 条回复 最后回复
  • C 离线
    C 离线
    Calf.Z-DNS
    在 中回复了 星星星星晴 最后由 编辑
    #8

    @星星星星晴 好的谢谢,我目前网格有7500W,质量0.72以上,结构是简单的圆管,在算DNS,ncorrector设置的2,您觉得可以吗?

    1 条回复 最后回复

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]