CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Pressure drop consistently lower than measured with SimpleFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 2, 2021, 14:38
Default Pressure drop consistently lower than measured with SimpleFoam
  #1
New Member
 
Join Date: Feb 2020
Posts: 6
Rep Power: 6
OisinOC is on a distinguished road
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;
    }
}
OisinOC is offline   Reply With Quote

Old   March 3, 2021, 04:02
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
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.
simrego is offline   Reply With Quote

Old   March 3, 2021, 07:21
Default
  #3
New Member
 
Join Date: Feb 2020
Posts: 6
Rep Power: 6
OisinOC is on a distinguished road
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.
Attached Images
File Type: jpg Residuals.jpg (53.6 KB, 18 views)
Attached Files
File Type: txt fieldValueDelta.txt (2.9 KB, 2 views)
OisinOC is offline   Reply With Quote

Old   March 3, 2021, 07:26
Default
  #4
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
These residuals are quiet high and based on your attached file I would say that this simulation is not converged...
simrego is offline   Reply With Quote

Old   March 3, 2021, 07:43
Default
  #5
New Member
 
Join Date: Feb 2020
Posts: 6
Rep Power: 6
OisinOC is on a distinguished road
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
Attached Images
File Type: jpg Residuals.jpg (42.7 KB, 6 views)
Attached Files
File Type: txt fieldValueDelta.txt (1.4 KB, 1 views)
OisinOC is offline   Reply With Quote

Old   March 3, 2021, 08:02
Default
  #6
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
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.
simrego is offline   Reply With Quote

Old   March 3, 2021, 09:00
Default
  #7
New Member
 
Join Date: Feb 2020
Posts: 6
Rep Power: 6
OisinOC is on a distinguished road
Thanks for the feedback, I've been focusing too much on the residuals. I'll work on getting results with a stable pressure result.
OisinOC is offline   Reply With Quote

Old   March 3, 2021, 11:37
Default
  #8
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 665
Rep Power: 14
Tobermory will become famous soon enough
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.
Tobermory is offline   Reply With Quote

Reply

Tags
duct, pressure drop, simplefoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressure drop in pipe flow with Large Eddy Simulation xerox FLUENT 1 October 16, 2019 08:55
OpenFOAM - cyclicAMI Pressure drop result variation Vishsel OpenFOAM 0 May 31, 2019 02:47
total pressure and pressure drop omaralyahia CFX 5 July 14, 2015 08:13
simpleFoam - pressure (coefficient) of head shape GJM1991 OpenFOAM Running, Solving & CFD 4 May 12, 2015 17:15
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 15:00


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