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

Calculation of Pressure Loss

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

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 25, 2007, 12:43
Default Hi, I would like to use OF for
  #1
Member
 
Jason Dale
Join Date: Mar 2009
Location: UK
Posts: 80
Rep Power: 17
jason is on a distinguished road
Hi, I would like to use OF for estimating the pressure losses in a piping arrangement. The problem consists of an inlet and an outlet and some pipes, bends, reductions and enlargements inbetween. The inlet has a known flowrate and the outlet has a known pressure. I would like to estimate what the inlet pressure would be so that a suitable pump can be chosen for the system.

I appreciate this is a straightforward problem and that I can to some extent calculate this by hand. I have tried to do this in OF using a decent mesh of a 300mm dia pipe, a fixed velocity inlet (eg 3m/s) and a pressure outlet (eg 2.5bar) and no-slip walls. I have two problems:

1/ Using simpleFoam set to laminar or turbulent, everything converges fine. The velocity predictions are as expected however the pressure losses are miniscule (eg 0.001 bar) which I cannot believe. I have a nice believable velocity profile in the pipe sections and separation where expected.

2/ If I set the initial (0) internal field to anything other than the same as the outlet pressure (2.5bar) the solution diverges. I've tried the nonorthogonal correction but it doesn't help.

Not wanting to blow my own trumpet but I have worked in CFD for 15 years so hopefully I havent made too many mistakes in the problem setup. I would also be confident of obtaining a decent solution using this mesh in say Star or Fluent.

Hope you can enlighten.

Jason
hadip likes this.
jason is offline   Reply With Quote

Old   October 25, 2007, 13:41
Default Ok, I got it, simpleFoam uses
  #2
Member
 
Jason Dale
Join Date: Mar 2009
Location: UK
Posts: 80
Rep Power: 17
jason is on a distinguished road
Ok, I got it, simpleFoam uses normalised pressure, found the answer here

http://www.cfd-online.com/OpenFOAM_D...es/1/5124.html

Now I know what to do,

Many thanks

Jason
jason is offline   Reply With Quote

Old   October 25, 2007, 17:45
Default This is resolved, right? Hr
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
This is resolved, right?

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 25, 2007, 18:40
Default Hi Jason, i have a similar
  #4
New Member
 
Gabriel Barroso
Join Date: Mar 2009
Posts: 23
Rep Power: 17
gabriel is on a distinguished road
Hi Jason,

i have a similar test case. Do you have a method to calculate a mean pressure over a surface/cut. In paraview i can plot the pressure in the cut and estimate the averaged pressure over the cut, but do you have an idea how to get an exact value.

Bests Gabriel
gabriel is offline   Reply With Quote

Old   October 26, 2007, 06:39
Default Hi, Issue is resolved, than
  #5
Member
 
Jason Dale
Join Date: Mar 2009
Location: UK
Posts: 80
Rep Power: 17
jason is on a distinguished road
Hi,

Issue is resolved, thanks.

Gabriel, the calcPressureForces routine found at the link above outputs the Surface area, mean pressure and total forces on each patch you specify.

Not sure how you can do this in paraview, you can do it in Fieldview using the integrate over a surface option.

Reg

Jason
jason is offline   Reply With Quote

Old   February 14, 2008, 11:32
Default Hi OpenFOAMers, I made some
  #6
New Member
 
Jean-Luc Pelerin
Join Date: Mar 2009
Posts: 21
Rep Power: 17
jlpelerin is on a distinguished road
Hi OpenFOAMers,

I made some pressure loss computations inside a straight pipe using simpleFoam at different Reynolds.
Compared to Moody diagram, results are quite disappointing as they give errors up to 30%.
I have tried several schemes, k-epsilon and k-omega, several convergence criteria and several meshes (Y+ around 2).
Note : I use the development version of OpenFOAM.

Has anybody got good results on such cases?
Does anybody have an idea on where I could be wrong?

Thank you,

Jean-Luc Pelerin
chaitanyaarige likes this.
jlpelerin is offline   Reply With Quote

Old   February 15, 2008, 05:17
Default Hi Jean-Luc The 30% is not
  #7
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Jean-Luc

The 30% is not surprising, if it comes from the k-epsilon model. It has been reported in [1] for channel flows that the k-epsilon model deviates up to 30% from the Moody diagrams at k+=1200 / k/H = 0.02, H being channel height and k Nikuradses roughness height.

Though, if you get the the order of magnitude error using the k-omega model I would get surprised. [1] reportes error in the order of magnitude 1-3% and I have made some tests myself and get the same order of magnitude for a channel flow. Both [1] and I have been using the Wilcox 1993 model.

By the way, are you using a rough or smooth boundary? All the above mentioned are for completely rough boundaries.

Best regards,

Niels

[1] V. C. Patel and J. Y. Yoon, Application of Turbulence Models to Seperated Flow Over Rough Surfaces, Journal of Fluid Engineering, June 1995
fumiya likes this.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   February 15, 2008, 09:05
Default Hi Niels, Thank you for you
  #8
New Member
 
Jean-Luc Pelerin
Join Date: Mar 2009
Posts: 21
Rep Power: 17
jlpelerin is on a distinguished road
Hi Niels,

Thank you for your enlightenments. I will have a look at this paper asap.

I cannot find the Wilcox implementation in OpenFOAM. Can you tell me where it is?

I am working on smooth walls. I want to validate OF before going on with rough walls. (By the way, is there a repository for OF test cases/benchmarks ?)

I have enclosed one of my problem set up:
Smooth-ko-Long-Re2e4-steady.tar.gz
Could someone have a look?

And this is the evolution of the friction factor obtained with simpleFoam:
- Reynolds is Re = 2e4
- Moody gives 0.026
- OF gives 0.031
- the pseudo time step is 0.005


Thank you very much,

Best regards,

Jean-Luc
jlpelerin is offline   Reply With Quote

Old   February 15, 2008, 10:22
Default Hi It should be said that
  #9
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi

It should be said that I have never worked with smooth surfaces (main interest: sediment transport), but I have found the following by looking in Wilcox (2006) p383-386 and I'll give a small summary on the k-omega part:

For smooth wall boundary layers with k-omega, the main issue is how to treat the boundary condition for omega. He states that a good solution can be obtained for such things as pipe flows, etc, if the analytic solution to omega is applied in the 10 grid points closed to the boundary under the constraint that they are all below y+ < 2.5!
This is not an acceptable solution and becomes problematic for complex geometry and unstructured meshed.
The solution to this is to apply the rough boundary layer condition under the restriction that ks+ < 5. I have not worked with the k-omega model in OF, thus I do not know if such a boundary condition exists.
The limit ks+ < 5 is due to the fact that the viscous sublayer in terms of wall coordinates is 11.7, thus the roughness elements are covered by the vicous sublayer and the wall is therefore considered hydraulicly smooth from a physical point on view.
The Wilcox (1993) model is as far as I know not implemented in OF, but as k-omega SST is closed related (and improved) with a limitation and the eddy viscosity in the far field among other thing, I would not recommend you to use time om implementing it ... simply use SST.

Best regards,

Niels
fumiya likes this.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   February 18, 2008, 09:18
Default BTW, if you do not have Wilcox
  #10
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
BTW, if you do not have Wilcox (2006) the BC on omega is

omega = 40000 nu_wall / ks^2

where nu_wall is the kinematic viscosity of the fluid and ks is the DIMENSIONED roughness height. Make sure that ks+ < 5 and further that the location of the first grid point above the surface is less than 1 in wall coordinates.

Jean-Luc: Please tell if you get an improved prediction of the pressure loss.

Best regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   February 18, 2008, 09:55
Default Hi Niels, Thanks a lot for
  #11
New Member
 
Jean-Luc Pelerin
Join Date: Mar 2009
Posts: 21
Rep Power: 17
jlpelerin is on a distinguished road
Hi Niels,

Thanks a lot for your help. I don't have Wilcox (2006), but I have a paper on roughness and SST (Extension of the k-w SST turbulence model for flows over rough surfaces - Antti Hellsen and Seppo Laine). I will try to implement it asap. I have also started to implement formula found in Fluent manual... It seems promising but results are not yet good enough for me to present them. Anyway, if I manage to have good results on smooth and rough pipes, I will let you know!

Best regards,

Jean-Luc
jlpelerin is offline   Reply With Quote

Old   February 18, 2008, 09:59
Default Sorry the authors are "Antti H
  #12
New Member
 
Jean-Luc Pelerin
Join Date: Mar 2009
Posts: 21
Rep Power: 17
jlpelerin is on a distinguished road
Sorry the authors are "Antti Hellsten and Seppo Laine"
jlpelerin is offline   Reply With Quote

Old   February 22, 2008, 04:44
Default Hi Niels, I have much bette
  #13
New Member
 
Jean-Luc Pelerin
Join Date: Mar 2009
Posts: 21
Rep Power: 17
jlpelerin is on a distinguished road
Hi Niels,

I have much better results on smooth pipes with k-omega SST (less than 5%). (It was just a newbie error : y+ really has to be between 30 and 300, as close as possible from 30)

I have started to implement the log law used in Fluent for rough walls and first results are not too bad in some cases... But I still have to work.

Jean-Luc
jlpelerin is offline   Reply With Quote

Old   February 22, 2008, 06:16
Default Hi Jean-Luc Well, that's ho
  #14
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Jean-Luc

Well, that's how it goes, but it is good to hear that the results are as expected. Did you implement the omega condition?

I have read the Hellsten article, and it is short. Thus it does not cover the boundary condition for k using SST. There are three regimes regarding roughness, namely 'hydraulically smooth', 'rough-transitional' and 'completely rough'. For the smooth case the viscous sublayer is present and therefor k=0 for y=0. In the completely rough case, the viscous sublayer is not present. In the near wall area vortices are shed from behind the roughness elements ([1], page 32), thus the turbulence does not go to zero. Experiments have shown that dk/dn is a better approximation. For a discussion of the boundaries see [2]. Regarding the transitional regime your engineering hunch is what you have to rely on
The effect of having dk/dn instead is that k does not go to zero, Thus nu_t becomes different from zero which gives larger bed shear stress since tau/rho = (nu+nu_t)du/dy.

I am not familiar with the log law from Fluent, but you might want to consider the boundary evaluation of tau discussed in [2], as they have been able to use coarser grids using a van Driest profile to evaluate tau.

/ Niels

[1]: (Free notes of turbulence in smooth and rough regimes in both current and waves) http://www.external.mek.dtu.dk/perso...te_30_6_04.pdf

[2]: Numerical and experimental investigation of flow and scour around a circular pile, A. Roulund, B. M. Sumer, J. Fredsoe and J. Michelsen, Journal of Fluid Mechanics, 2005
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   February 28, 2008, 06:26
Default Hi OpenFoamers, I am still
  #15
New Member
 
Jean-Luc Pelerin
Join Date: Mar 2009
Posts: 21
Rep Power: 17
jlpelerin is on a distinguished road
Hi OpenFoamers,

I am still working on pressure losses in rough pipes and I think I am on the right way for the modified rough k-omega SST (Compared to Moody, results are within 4% except for region 4 < Ks+ < 15 where error is about 10%. And I still have to validate for Re greater than 1e7).

But I still have a problem. I have two solutions to get the pressure gradient:
i. I compute a long pipe (enough long for boundary layer to stabilize)
ii. I use a RANS based modified version of channelOodles.
I would like to have a third solution with a cyclic velocity boundary condition between inlet and outlet and just a fixed pressure at outlet and of course an fixed mass flow. Is it possible to have such different boundary conditions for different fields??? I know it is possible in CFX using subdomains... Is there an equivalent in OpenFoam?

Thank you,

Jean-Luc
jlpelerin is offline   Reply With Quote

Old   March 4, 2008, 11:48
Default Hi Jean-Luc First of all, I
  #16
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Jean-Luc

First of all, I would go for (ii). I seems to be the cheapest of the two.
I do not know how channelOodles is working, but the straight forward way would be to add an internal body force and then have cyclic boundaries on both p and U. Then adjust the body force until you have the desired mass flux. This body force will be identically balanced by your wall shear stress. The pressure gradient would in this be zero.
Is that in some way want you are suggesting for your third option?

Best regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   March 4, 2008, 12:47
Default Hi Niels, You are right, ch
  #17
New Member
 
Jean-Luc Pelerin
Join Date: Mar 2009
Posts: 21
Rep Power: 17
jlpelerin is on a distinguished road
Hi Niels,

You are right, channelOodles adds a body force (a constant pressure gradient) to the momentum equation and tries to converge in terms of mass flow. I also thought it would be the fastest method. And it does in some cases. But with more complex geometries and higher Reynolds it becomes incredibly slow.

I may have found an alternative method today : I use directMappedPatch to couple inlet and oulet velocities. It also allows to specify a mean velocity. And the pressure is set up just as it would be in a simple pipe (this will probably have to be changed). It is still work in progress.

BTW : I also started to have a look at low reynolds turbulence models. Mainly because I have difficulties to live with coarse meshes at the wall :-)... I may give up k-omega and focus on these for roughness...

Best regards,

Jean-Luc
jlpelerin is offline   Reply With Quote

Old   March 5, 2008, 08:12
Default Hi Jean-Luc I have had simi
  #18
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Jean-Luc

I have had similar problems with convergence, and I found that when using the correct tuning, something called PID-control actually yielded good results. It is a routine, which considers both the actual residual in the flux, the time derivative in the calculated flux and in integral of the flux over time. Using these informations, a correction to the pressure gradient is found.
There are 4 tuning parameters, and if they are set correctly, then you get a reasonably fast convergence to the correct pressure gradient.

Good luck

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   May 22, 2008, 06:31
Default Hello All, I'm new here, ju
  #19
New Member
 
Bart Boonacker
Join Date: Mar 2009
Posts: 7
Rep Power: 17
bboonacker is on a distinguished road
Hello All,

I'm new here, just started working with OF. So forgive me if I ask some newbie questions, just let me know if it becomes to stupid

I am also trying to calculate the pressure losses in a trapezium shaped duct, and I get reasonably good results (-10%) for a "long" (7m) "small" (0.2m x 0.1m) smooth duct. Still searching for the difference (10% vs 5%).
My other problem is that I need to simulate ducts with a max length of 0.2m and I want to couple the inlet and outlets as well. So I have some questions,

Jean-Luc, do you have the directMappedPatch option working with good results?? At which dimensions?
Are you still using simpleFOAM with kOmegaSST?

Niels, what kind of lengths do you use ? And you are using simpleFOAM with a re-written Wilcox kOmega model to implement the boundary/roughness conditions?

Best regards,

Bart
bboonacker is offline   Reply With Quote

Old   May 22, 2008, 07:02
Default Hi Bart I am sorry to say,
  #20
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Bart

I am sorry to say, that I am not using any of the RANS-models in OpenFOAM. My knowledge is based on a study I did for my master thesis where I used an in-house numerical code and needed to decide upon either k-omega or k-epsilon.

Best regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Reply

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 loss rns CFX 4 February 28, 2008 14:38
total pressure loss!! Thiyagarajandhayalan FLUENT 0 April 18, 2006 02:26
pressure loss Babu FLUENT 1 March 21, 2005 12:05
Pressure loss calculation using CFD Yoshi Main CFD Forum 3 February 7, 2004 12:46
pressure loss olivier FLUENT 3 December 18, 2002 15:09


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