|
[Sponsors] |
pressure distribution in water flow, differences in icoFoam and COMSOL |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 23, 2010, 10: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: 16 |
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 |
|
September 23, 2010, 10:51 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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, 10:58 |
|
#3 |
Member
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 16 |
hi Niels,
never heard of this, where can I switch it "on"? Thanks! Nico |
|
September 23, 2010, 11:03 |
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Take a look in the fvSolution file in the system folder.
/ Niels |
|
September 23, 2010, 11:10 |
|
#5 |
Member
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 16 |
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; } |
|
September 23, 2010, 11:16 |
|
#6 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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, 12:14 |
|
#7 |
Member
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 16 |
I hope this is ok. For more comsol-details I have to switch to windows...
Thanks for your help, Niels. Nico |
|
September 23, 2010, 12:30 |
|
#8 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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, 15:03 |
|
#9 |
Member
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 16 |
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, 03:20 |
|
#10 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
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 (current status: http://albertopassalacqua.com/?p=1541) 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, 03:27 |
|
#11 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
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 (current status: http://albertopassalacqua.com/?p=1541) 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, 08:38 |
|
#12 |
Member
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 16 |
Maybe the unconsidered gravitiy force in icoFoam could be a reason for my different results?
Last edited by deniggo; September 26, 2010 at 09:45. |
|
September 27, 2010, 06:35 |
|
#13 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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, 12:20 |
|
#14 |
Member
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 16 |
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, 04:48 |
|
#15 |
Member
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 16 |
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 |
|
|
|