CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Pressure drop consistently lower than measured with SimpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/234316-pressure-drop-consistently-lower-than-measured-simplefoam.html)

OisinOC March 2, 2021 14:38

Pressure drop consistently lower than measured with SimpleFoam
 
I'm trying to simulate the pressure drop through a small rectangular duct with a 90 degree bend. I've measured the pressure drop at 70m^3/h to be around 165Pa but my simulations are always 50-60Pa lower than that. Hopefully someone can see what I'm doing wrong. Am I defining a boundary condition incorrectly?

Control Dict
Code:

application    simpleFoam;

startFrom      startTime;

startTime      0;

stopAt          endTime;

endTime        2000;

deltaT          1;

writeControl    timeStep;

writeInterval  100;

purgeWrite      0;

writeFormat    ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision  6;

runTimeModifiable true;

functions
{
    #includeFunc streamlines
}

fvschemes
Code:

ddtSchemes
{
    default        steadyState;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    default        none;
    div(phi,U)      bounded Gauss linearUpwind grad(U);
    div(phi,k)      bounded Gauss limitedLinear 1;
    div(phi,epsilon) bounded Gauss limitedLinear 1;
    div(phi,omega)  bounded Gauss limitedLinear 1;
    div(phi,v2)    bounded Gauss limitedLinear 1;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
    div(nonlinearStress) Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

wallDist
{
    method meshWave;
}

fvSolutions
Code:

solvers
{
    p
    {
        solver          GAMG;
        tolerance      1e-06;
        relTol          0.1;
        smoother        GaussSeidel;
    }

    "(U|k|epsilon|omega|f|v2)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance      1e-05;
        relTol          0.1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 2;
    consistent      yes;

    residualControl
    {
        p              1e-2;
        U              1e-3;
        "(k|epsilon|omega|f|v2)" 1e-3;
    }
}

relaxationFactors
{
    equations
    {
        U              0.9; // 0.9 is more stable but 0.95 more convergent
        ".*"            0.9; // 0.9 is more stable but 0.95 more convergent
    }
}

transportProperties
Code:

transportModel  Newtonian;

nu              [0 2 -1 0 0 0 0] 1.516e-05;

turbulenceProperties
Code:

simulationType RAS;

RAS
{
    // Tested with kEpsilon, realizableKE, kOmega, kOmegaSST, v2f,
    // ShihQuadraticKE, LienCubicKE.
    RASModel        kOmegaSST;

    turbulence      on;

    printCoeffs    on;
}

U
Code:

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (0.0 0.0 0.0);

boundaryField
{
    inlet
    {
        type                flowRateInletVelocity;
        volumetricFlowRate  0.0194;
        value              $internalField;
    }

    outlet
    {
        type            zeroGradient;
    }

    wall
    {
        type            noSlip;
    }

}

p

Code:

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            fixedValue;
        value          uniform 0;
    }

    wall
    {
        type            zeroGradient;
    }

}

k
Code:

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0.3723;

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          $internalField;
    }
    outlet
    {
        type            inletOutlet;
        value          $internalField; 
        inletValue      $internalField;
    }
    wall
    {
        type            kqRWallFunction;
        value          $internalField;
    }
}

omega
Code:

dimensions      [0 0 -1 0 0 0 0];

internalField  uniform 182.6;

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          $internalField;
    }
    outlet
    {
        type            inletOutlet;
        value          $internalField; 
        inletValue      $internalField;
    }
    wall
    {
        type            omegaWallFunction;
        value          $internalField;
    }
}

nut
Code:

dimensions      [0 2 -1 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    inlet
    {
        type            calculated;
        value          uniform 0;
    }
    outlet
    {
        type            calculated;
        value          uniform 0;
    }
    wall
    {
        type            nutUSpaldingWallFunction;
        value          1e-4;
    }
}


simrego March 3, 2021 04:02

Hi!


What is your fluid? In simpleFoam p is a kinematic pressure (pressure/rho) so you will have to multiply the pressure drop with the fluid density to get the pressure in Pa.
If you already did that, just ignore this reply.

OisinOC March 3, 2021 07:21

2 Attachment(s)
Thanks I did make that mistake but I'm still out by a quite a bit after taking it into account. I ran the simulation again with the relaxationFactors brought down to 0.15 and the endTime extended to 10000. The pressure difference (attached) averages around 99. The fluid is air and the conditions during the measurement were Lab air Temp 19.2°C and Atmospheric Pressure 29.3 inHg so the density is around 1.18kg/m^3 I think. That means simpleFoam predicts the pressure drop as 99*1.18=116.82Pa at 70m^3/h while the measurement is 162m^3/h.

I'm running it again currently with a finer mesh to try rule that out as the problem.

simrego March 3, 2021 07:26

These residuals are quiet high and based on your attached file I would say that this simulation is not converged...

OisinOC March 3, 2021 07:43

2 Attachment(s)
Okay from reading other posts I had taught that it was because of the turbulence and once the residuals had leveled off it was as close as I'd get to converged. The finer mesh has just converged with a pressure difference of 93 (110Pa) at the last time step. I'll try lowering the residual controls to:

Code:

        p              1e-3;
        U              1e-4;
        "(k|epsilon|omega|f|v2)" 1e-4;

and see if that improves things

simrego March 3, 2021 08:02

It did not converged either.
Check your pressure. It is still increasing. For convergence you should check some physical values if they are not changing anymore, not the residuals.
In your case you should run as long as your pressure drop is not changing anymore.

OisinOC March 3, 2021 09:00

Thanks for the feedback, I've been focusing too much on the residuals. I'll work on getting results with a stable pressure result.

Tobermory March 3, 2021 11:37

The other thing to keep in mind is that you are being quite ambitious in trying to use CFD for this ... bear in mind that the pressure loss is all down to flow turbulence, and that the reason why the 90deg bend generates a larger pressure drop than a straight duct is because of flow separation and enhanced turbulence generation (which sucks energy out of the mean flow, ie the pressure field).

So, to get the correct pressure drop, you need to be able to model the smooth body separation and secondary flow patterns in the duct to high accuracy. This is not trivial! You will need a good mesh and a good turbulence model to get the answer spot on ... I don't want to dissuade you from trying, but do realise that this is not a trivial problem.

Lastly - if you want to be ultra accurate - remember also that for simplicity, RANS solvers often combine the following two terms \nabla p + \frac{2\rho}{3} \nabla k terms, into a single pressure gradient term, \nabla p^+ (the turbulence term is the contribution from the normal Reynolds stresses). The solver then solves for p^+ = p + 2\rho k/3 rather than for the static pressure p, so for a true comparison you also ned to subtract off the turbulence energy part ... this is typically negligible though, which is why the approximation is made!

Good luck.


All times are GMT -4. The time now is 19:16.