CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   set Min and Max values for pressure in pimpleFoam (http://www.cfd-online.com/Forums/openfoam/123015-set-min-max-values-pressure-pimplefoam.html)

mechy September 2, 2013 17:57

set Min and Max values for pressure in pimpleFoam
 
Hi all

in my problem the velocities are calculated correctly but pressure is not.
I use pimpleFoam and I want to limit the pressure

I add bellow statment in fvSolution/PIMPLE

pMin pMin [ 0 2 -2 0 0 0 0 ] -150;
pMax pMax [ 0 2 -2 0 0 0 0 ] 150;

but it not work

any help will be appreciated

nimasam September 3, 2013 00:13

Hello

did you change your solver at all!? then those lines would not reflect anything to solver :)
besides as you use incopressible solver i dont gauss its a good idea to limit the pressure which will be effect on continuity too and it may impair divergence issue

mechy September 3, 2013 01:05

3 Attachment(s)
Hi Nima


I have added the setting of my test case as follow:

more information:
I use my icoFsiFoam solver which used pimpleFoam for solve fluid.
the results is good until time=0.1205 with maxCor=.6 ( deltaT ~1e-5)
at the next state (Time = 0.1205+deltaT) the velocity is calculated correctly, but pressure not.
I check the original pimpleFoam solver to solve fluid only, but the pressure is diverged again. I have attached its contours.



fvSchemes

HTML Code:

ddtSchemes
{
    default Euler;
}

gradSchemes
{
    default          Gauss linear ;//cellMDLimited leastSquares 1;//extendedLeastSquares 1;
//    grad(p)        leastSquares ;
//    grad(U)        leastSquares ;
}

divSchemes
{
    default        none;
    div(phi,U)      Gauss limitedLinearV 1;//Gauss linearUpwindV grad(U);//
    div(phi,k)      Gauss upwind;//limitedLinear 1;
    div(phi,omega)  Gauss upwind;//limitedLinear 1;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
    div((nuEff*dev(grad(U).T())))  Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear corrected;//Gauss linear limited 0.5;//
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    pcorr          ;
    p;
}

// ************************************************************************* //


fvSolutions


HTML Code:

solvers
{
    p
    {
        solver          GAMG;
        tolerance        1e-4;
        relTol          0;
        smoother        GaussSeidel;
        nPreSweeps      1;
        nPostSweeps      2;
        cacheAgglomeration true;
        directSolveCoarsest true;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 40;
        mergeLevels      1;
        minIter          1;
    }
    pFinal
    {
        solver          GAMG;
        tolerance        1e-8;
        relTol          0;
        smoother        GaussSeidel;
        nPreSweeps      1;
        nPostSweeps      2;
        cacheAgglomeration true;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 40;
        mergeLevels      1;
        minIter          1;
    }

    "(U|k|omega)"
    {
        solver          PBiCG;
        preconditioner  DILU;

        tolerance        1e-5;
        relTol          0;
        nSweeps          1;   
        minIter          1;
    }
    "(UFinal|kFinal|omegaFinal)"
    {

        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-6;
        relTol          0.0;
        nSweeps          1; 
        minIter          1;
    }
}

PIMPLE
{
    nOuterCorrectors    3;
    nCorrectors        2;
    nNonOrthogonalCorrectors 3;

    pRefCell            0;
    pRefValue          0;
//    momentumPredictor yes;
    ddtPhiCorr no;
    correctPhi no;

}

relaxationFactors
{
    fields
    {
        p              0.3;
    }
    equations
    {
        U              0.7;
        k              0.7;
        omega          0.7;
    }
}
cache
{
    grad(U);
}

// ************************************************************************* //


Bernhard September 3, 2013 02:24

Bounding pressure is certainly not the way to go. Check your velocity in a few more time steps, and you will probably see something weird there as well. In other words, your solution is diverging, please check the residuals of the equations from the log file. It might be wise to study the origin of the pressure issue, which might well be related to the FSI part.


All times are GMT -4. The time now is 20:02.