pressure distribution in water flow, differences in icoFoam and COMSOL

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

September 23, 2010, 09:09
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: 8
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
 comsol.jpg (23.7 KB, 64 views) 210910-U.jpg (51.6 KB, 56 views) 210910-..jpg (44.4 KB, 55 views)

 September 23, 2010, 09:51 #2 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,702 Rep Power: 27 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

 September 23, 2010, 09:58 #3 Member   Nico T Join Date: Aug 2010 Location: Leipzig, Germany Posts: 39 Rep Power: 8 hi Niels, never heard of this, where can I switch it "on"? Thanks! Nico

 September 23, 2010, 10:03 #4 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,702 Rep Power: 27 Take a look in the fvSolution file in the system folder. / Niels

 September 23, 2010, 10:10 #5 Member   Nico T Join Date: Aug 2010 Location: Leipzig, Germany Posts: 39 Rep Power: 8 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?

 September 23, 2010, 10:16 #6 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,702 Rep Power: 27 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

September 23, 2010, 11:14
#7
Member

Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 8
I hope this is ok. For more comsol-details I have to switch to windows...

Thanks for your help, Niels.

Nico
Attached Images
 UvectorOF.jpg (44.6 KB, 43 views) comsol_detail.jpg (36.1 KB, 39 views)

 September 23, 2010, 11:30 #8 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,702 Rep Power: 27 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

 September 23, 2010, 14:03 #9 Member   Nico T Join Date: Aug 2010 Location: Leipzig, Germany Posts: 39 Rep Power: 8 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

 September 24, 2010, 02:20 #10 Senior Member   Alberto Passalacqua Join Date: Mar 2009 Location: Ames, Iowa, United States Posts: 1,907 Rep Power: 27 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.

 September 24, 2010, 02:27 #11 Senior Member   Alberto Passalacqua Join Date: Mar 2009 Location: Ames, Iowa, United States Posts: 1,907 Rep Power: 27 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.

 September 26, 2010, 07:38 #12 Member   Nico T Join Date: Aug 2010 Location: Leipzig, Germany Posts: 39 Rep Power: 8 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.

 September 27, 2010, 05:35 #13 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,702 Rep Power: 27 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

 September 28, 2010, 11:20 #14 Member   Nico T Join Date: Aug 2010 Location: Leipzig, Germany Posts: 39 Rep Power: 8 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

September 30, 2010, 03:48
#15
Member

Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 8
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
 280910-2.jpg (27.6 KB, 27 views) graph1.jpg (57.5 KB, 31 views) graph2.jpg (55.4 KB, 24 views)

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

All times are GMT -4. The time now is 11:28.

 Contact Us - CFD Online - Top