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

pressure distribution in water flow, differences in icoFoam and COMSOL

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 23, 2010, 09:09
Default pressure distribution in water flow, differences in icoFoam and COMSOL
  #1
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 7
deniggo is on a distinguished road
Hello,

I simulate flow in an open stream over repeating streambed geometries (sinusoidal geometry of ripples).

I used COMSOL some weeks ago and tried to do the same job in OpenFOAM. Now, I'm a bit confused about the different results, even I use similar (boundary) conditions.

The general model setup:
Water is entering the domain in an parabolic velocity profile at the left boundary and leaves it at the right. Top bc is symmetryPlane and bottom is no-slip bc. In OF I use icoFoam, COMSOL is also laminar flow.

The results:
The velocity fields are looking quite similar, whereas pressure (p) distributions show differences:
In flow experiments and literature the highest pressure occurs at the stoss side of the ripple (plane against flow direction), and low pressure on the lee side (plane in flow direction).
COMSOL shows exactly this behavior, but OF does not.
In OF, lowest pressure values are exactly at the crest of the ripple. Highest values are in the "valleys".
Also the pressure magnitude differs: In COMSOL it accounts for 200 Pa, in OF it is only 2e-3 Pa and pressure
is negative (!?) at left inlet.
The relative pressure distribution does not depend on velocity.

Maybe (and hopefully) the differences are related to calculations concerning Bernoullis eq: p = p_dynamic + p_hydrostatic ?
Btw: sigmayy = wallGradU(y) * nu (=1e-6) shows a distribution similar to COMSOL and as expected, but with a magnitude of 5e-3 Pa.

Please look at my attached files:
The first one shows the velocity and pressure distribution in COMSOL, red is high, blue is low value. The other two pictures show U and p in OF, blue is low, green is high value.

Can somebody explain these differences?

Thanks,

Nico


Attached Images
File Type: jpg comsol.jpg (23.7 KB, 63 views)
File Type: jpg 210910-U.jpg (51.6 KB, 55 views)
File Type: jpg 210910-..jpg (44.4 KB, 54 views)
deniggo is offline   Reply With Quote

Old   September 23, 2010, 09:51
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,693
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
Hi Nico

icoFoam has the switch momentumPrediction. Is this turned on? It seems like seperation is not occuring in one of the cases hence the shift in pressure distribution.

/ Niels
ngj is offline   Reply With Quote

Old   September 23, 2010, 09:58
Default
  #3
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 7
deniggo is on a distinguished road
hi Niels,

never heard of this, where can I switch it "on"?

Thanks!

Nico
deniggo is offline   Reply With Quote

Old   September 23, 2010, 10:03
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,693
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
Take a look in the fvSolution file in the system folder.

/ Niels
ngj is offline   Reply With Quote

Old   September 23, 2010, 10:10
Default
  #5
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 7
deniggo is on a distinguished road
Thats my fvsolution file:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-06;
        relTol          0;
    }

    U
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0;
    }
}

PISO
{
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
    //pRefCell        0;
    //pRefValue       0;
}
maybe pRefCell or pRefValue is the switch?
deniggo is offline   Reply With Quote

Old   September 23, 2010, 10:16
Default
  #6
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,693
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
Sorry, the switch has been removed from 1.6, so it is probably not in 1.7 either.

Could you post more detailed vector plots of the velocity field on the lee side from both models?

- Niels
ngj is offline   Reply With Quote

Old   September 23, 2010, 11:14
Default
  #7
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 7
deniggo is on a distinguished road
I hope this is ok. For more comsol-details I have to switch to windows...

Thanks for your help, Niels.

Nico
Attached Images
File Type: jpg UvectorOF.jpg (44.6 KB, 43 views)
File Type: jpg comsol_detail.jpg (36.1 KB, 39 views)
deniggo is offline   Reply With Quote

Old   September 23, 2010, 11:30
Default
  #8
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,693
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
Hi Nico

Based on the pictures the ripples in COMSOL and OF are not identical, having a trough-to-crest over length ratio of 0.88 and 0.67 respectively, hence you are comparing apples and pears. This also explains the difference in pressure distribution.

/ Niels
ngj is offline   Reply With Quote

Old   September 23, 2010, 14:03
Default
  #9
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 7
deniggo is on a distinguished road
Hi Niels,

yes that's true, but geometry of the ripples does not influence the location of the highest pressure on the stoss side. I changed geometry often, and tried it also with more "realistic" round ripples.

It seems like the p-field in OF is rather a pure hydostatic pressure than the addition of dynamic and hydrostatic pressure.

I'm also wondering about the sigmayy values, that show at least the right distribution, apart from a reliable magnitute (approx. 50 - 100 Pa).

Nico
deniggo is offline   Reply With Quote

Old   September 24, 2010, 02:20
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,904
Rep Power: 27
alberto will become famous soon enoughalberto will become famous soon enough
To solve the momentum predictor add

momentumPredictor on;

to the PISO subdictionary in fvSolution. The switch is still in the code, just not in the tutorial.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats.
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 24, 2010, 02:27
Default
  #11
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,904
Rep Power: 27
alberto will become famous soon enoughalberto will become famous soon enough
Sorry... icoFoam, and I was thinking to pisoFoam. Please, ignore my previous post

icoFoam always solves the momentum predictor in 1.7.x
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats.
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 26, 2010, 07:38
Default
  #12
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 7
deniggo is on a distinguished road
Maybe the unconsidered gravitiy force in icoFoam could be a reason for my different results?

Last edited by deniggo; September 26, 2010 at 08:45.
deniggo is offline   Reply With Quote

Old   September 27, 2010, 05:35
Default
  #13
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,693
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
Hi

Have you tried switching off gravity in COMSOL then? If you are comparing total pressure with excess pressure, then there most be significant differences.

/ Niels
ngj is offline   Reply With Quote

Old   September 28, 2010, 11:20
Default
  #14
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 7
deniggo is on a distinguished road
Hello,

in most of the cases, including posted pic above, gravity was switched off in COMSOL.
But in general, for me it's not completely clear, when and then why gravity force should be considered in CFD (Sorry for this beginners question).

Nico
deniggo is offline   Reply With Quote

Old   September 30, 2010, 03:48
Default
  #15
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 7
deniggo is on a distinguished road
Hello again,

I played a bit with the pressure data of my results. By calculating p = p_dynamic + p_hydrostatic I obtain pressure data as I expect it.

In the first picture the pressure output p calculated by OF is shown: Lowest pressure at the highest point and highest pressure at the lowest point.
In graph1 the dark blue line indicates the pressure distribution (p) of the bottom plane and shows same distribution as the picture. The green line is the linear interpolation between maxima and minima of the pressure data. This should describe p_hydrostatic.

In the next step I subtract p_hydrostatic from p (blue minus green line). The result is shown in graph2 by the light blue line. In respect to p = p_dynamic + p_hydrostatic this indicates p_dynamic.
But on the lee side dynamic pressure should be negative, due to the downstream velocity. Considering this, the highest pressure is located on the stoss side, while the lowest is on the lee side (red dashed line).

With this result the values and the distribution of p_dynamic are in the magnitude of the COMSOL model and the literature. A more or less sinusoidal pressure distribution occurs.


So far so good. For my further simulations mainly the dynamic pressure is of importance.
My question: How can I modify icoFoam / pisoFoam to obtain only dynamic pressure?

Any comment on my post is welcome.

Thank you.

Nico
Attached Images
File Type: jpg 280910-2.jpg (27.6 KB, 27 views)
File Type: jpg graph1.jpg (57.5 KB, 31 views)
File Type: jpg graph2.jpg (55.4 KB, 24 views)
deniggo is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 18:24.