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

Sudden contration

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2018, 14:59
Default
  #21
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Please provide your Test case as well as the empirical equation and the limits of the equation.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 9, 2018, 15:43
Default
  #22
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
You should avoid excesive cell volume jumps close to the wall. In my experience introducing some rounding at the edges of the contraction reduces the pressure loss. What are realistic radii achieved in the production?
mAlletto is offline   Reply With Quote

Old   October 10, 2018, 03:58
Default
  #23
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 8
MrAndersDk is on a distinguished road
Hello

my files are here. I've tried many different grids and schemes but all seems to reproduce roughly the same result. It could be I should try a small rounding of the transition and corners to make the geometry more realistic.

Contration.zip

The empirical relation comes from the book Pipe Flow - A practical and Comprehensive guide by Rennels and Hudson. It is given by

dp = \frac{1}{2} \rho v^2 K_2

where v is the velocity in the small part of the pipe. K_2 is the loss constant, which for a diameter ratio of 0.5 is roughly 0.5. This formula also agrees well with this webpage calculator:

http://www.pressure-drop.mobi/0303.html

I've estimated k and epsilon from the following page

http://ichrome.com/blogs/archives/342

and also tried other formulas. I've also tried running the simulation without wall functions and used the zero gradient boundary condition.
Tobi likes this.
MrAndersDk is offline   Reply With Quote

Old   October 10, 2018, 05:53
Default
  #24
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Well, after your equation it is clear that you can satisfy your results based on Bernoulli. However, I will check the case today in the evening and will report back.

Edit. The geometry is missing.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 10, 2018, 08:06
Default
  #25
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 8
MrAndersDk is on a distinguished road
Here is a link to all the files:

https://drive.google.com/file/d/11-w...ew?usp=sharing



My problem is that K_2 should be around 0.5, but my simulation corresponds to more like K_2 = 1.5.

I really appreciate you taking your time to help
MrAndersDk is offline   Reply With Quote

Old   October 10, 2018, 16:52
Default
  #26
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,


I should do other things than investigating in that case. However, I made it, and the result is as follow:

  • Diameter inlet 0.08 m
  • Diameter outlet 0.04 m
  • Velocity inlet 0.5 m/s
  • Velocity outlet (unknown)
Based on mass conservation, we can simply say \dot V_1 = \dot V_2 (density is constant). Therefore, the velocity at the outlet can be estimated to be around 2 m/s (~ Re=80000). So the flow field is very turbulent.

Also, we can take the Bernoulli equation that states:

p_1 + \frac{1}{2} \rho |\textbf{U}_1|^2 = p_2 + \frac{1}{2} \rho |\textbf{U}_2|^2

We know:
  • velocity inlet (1) is 0.05 m/s
  • velocity outlet (2) is 2 m/s
  • pressure outlet (2) is 0 [Pa/density] (simulation / incompressible)
    Keep in mind there is no pressure of 0 Pa. We can assume to set 1000hPa at the outlet which does not influence the numerics
Therefore, the outlet pressure can be calculated to be:

p_2 = p_1 + \frac{1}{2} \rho |\textbf{U}_1|^2 - \frac{1}{2} \rho |\textbf{U}_2|^2

This is equal to 98125 Pa. The difference is 1875 Pa (= 18.75 mbar). In that calculation, we do not have any dissipation effects caused by vortexes/turbulences. Thus, as we already know that the Reynolds number is high, dissipation effects take place, and the pressure drop will rise. Therefore, the \Delta p should be higher than 18 mbar and not lower.

I changed your mesh completely and made the simulation with almost 80% fewer cells. Based on the high Reynolds number, the steady-state simulation cannot be reached (fluctuations). In your fine mesh, it has to be much worse. However, the average value of the pressure at the outlet is:
Code:
Executing functionObjects
surfaceFieldValue patchAverage(name=inlet,p) write:
    areaAverage(inlet) of p = 3.22968
The inlet patch is set to 0 so the difference in pressure \Delta p is 3.22968 Pa / kg / m^3. After multiplying with the density of the fluid, we get around 3229 Pa of pressure difference which corresponds to 32 mbar. This correlates to the above-given remarks; at least that it has to be higher. The equation you showed is correct but can you specify why K should be 0.5? In my opinion, you can use the equation only from inlet to the compression (pipe 1) - pressure loss inside that pipe - and after that inside the second pipe. As you should know, the K values include the length and diameter of the pipe as well as the roughness of the pipe (friction).

Assuming the pipe to be very smooth, we might use the simple formulation of Blasius:

\lambda = \frac{0.3164}{Re^{0.25}}

The following calculation is related to the case attached.



Pipe #1 (from the inlet to compression)

  • Length is 0.3 m
  • Diameter 0.08 m
  • Velocity 0.5 m/s
  • Re = 40000
  • Lambda = 0.022372
K_1 = \lambda_1 \frac{l_1}{d_1} = 0.0223728 \frac{0.3}{0.08} = 0.084

The pressure lose within the first pipe section is:

\Delta p_1 = \frac{1}{2}\rho v_1^2 K_1 = 10.48 Pa



Pipe #2 (from compression to outlet)

  • Length is 0.5 m
  • Diameter 0.04 m
  • Velocity 2 m/s
  • Re = 80000
  • Lambda = 0.0188132

K_2 = \lambda_2 \frac{l_2}{d_2} = 0.0188132 \frac{0.5}{0.04} = 0.23516

The pressure loose within the second pipe section is:

\Delta p_2 = \frac{1}{2}\rho v_2^2 K_2 = 470.33 Pa



Thus, the pressure loose based on the roughness inside the pipe is around 480 Pa.

The 480 Pa are based on the pipe system and its length. As already stated, based on Bernoulli we will get an automatic pressure drop which is around 1875 Pa.So we end up in total with 23 mbar pressure loose. I guess - but I am not sure - that the K value, respectively the \lambda value takes care of turbulence dissipation inside the pipe too (becasue the Reynolds number is included). So as you can see from the K values calculated based on Blasius, we get complete different ranges for the pressure drop in the two pipe sections. I would trust that the pressure drop is around 30 mbar here.

I already spend 3 hours for that topic now and to make it a fundamental work, you should:
  • Choose a roughness of your pipe
  • Estimate the lambda value for each pipe section
  • Estimate the K value of each pipe section
  • Use Bernoulli to get the pressure drop based on continuity
  • Add the estimated pipe-pressure drops
  • Recalculate with OpenFOAM and appropriate nut wall functions (roughness)
  • Compare the results
  • Realize that it fits well but not 100 %

Keep in mind that the pressure drop in the CFD simulation is more complicated as one might think at the beginning. Friction at the pipe wall (nut wall function), dissipation due to turbulence and recirculation, and bla blub even though this example is very simple, it demonstrates the complexity of fluid dynamics and the knowledge one should have to be really good within that topic.

Hopefully your question is solved now.
By the way. As you might realize, that the mesh sizes are entirely different (mine has around 20.000 cells) the results are more or less in the same area ~ 30 mbar. There would be other things I would like to say, such as the turbulence resolution, RANS, ... but well - I go to bed now. By the way, I got 30 mbar pressure drop via laminar calculation too.




Case Download OpenFOAM Foundation 6.x
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 10, 2018, 18:29
Default
  #27
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 8
MrAndersDk is on a distinguished road
Tobias you are too kind, I've never expected you to do all that. I'm amazed by this communitys, will to help me, even though I know almost nothing, and asks stupid questions. Not just you Tobias but all who have contributed to my question. I could understand from your first post, that you are doing all of this for free, even though it is actually your profession, and you didn't have to. I've made a small contribution to your cause, because people like you are invaluable for open source projects to survive.

Now back to my question . I've actually also ran the simulation on a much coarser grid and did it laminar, and got the same result roughly as you point out. The reason I kept refining my grid was because of my ignorance, and that people pointed out it could be my resolution of the grid around the wall that was not good enough.

Now I actually see that I was actually so blinded by all this CFD, that I forgot the most fundamental phsyics, and lost sight at was I was actually calculating in OpenFOAM.

So just to recap, and test my understanding (please correct me if I'm wrong, or confirm my understanding).

If we call the first segment (large pipe) for 1 and the last segment for 2, then the following equation must be satisfied:

p_1 + \frac{1}{2} \rho v_1^2 - \Delta p = p_2 + \frac{1}{2} \rho v_2^2

where \Delta p is the static pressure loss due to the contraction (neglecting the pipe friction loss, because it is expected to be minor compared to the contraction). It is this \Delta p my formula is actually calculating, and not p_1 - p_2 as I stupidly have done. So isolating \Delta p in my formula above i get

\Delta p = p_1 - p_2 + \frac{1}{2} \rho (v_1^2 - v_2^2)

inserting the values from the simulation for p_1 and p_2 and the velocities v_1 = 0.5 and v_2 = 2.0 I get

\Delta p = 30 mbar - 0 mbar + \frac{1}{2} \rho (0.5^2 - 2.0^2) = 11 mbar

This is acceptable close to the 8 mbar estimated from the empiric formulas, taking into account that such empiric formulas is also very uncertain. Maybe one could easily argue that the 3 mbar, that the simulation overestimates \Delta p stems from the surface friction which my formula doesn't take into account.

So to recap further, I'm an idiot . However, even though I did something stupid, all of your input has pushed me further, and my understanding of OpenFOAM has somewhat increased.

So how should I proceed to become better at CFD (not at OpenFOAM. I think I'm actually convinced that I can learn OpenFOAM by videos, tutorials and this forum. Even though I find it difficult to understand how to make qualified decisions on grids, schemes and so on, this problem has convinced me that my focus probably not should be so much on OpenFOAMs quirky details). Is it possible to get better at CFD without courses or a full education? I've found books on general CFD by Wilcox, Munson, Anderson, etc. is that the way to go?

I have a PhD in other areas of physics (yeah I know, who would have thought so...), and have taking math and c++ on a high level, so I'm quite proficient in learning new complex skills, and think I have a solid foundation. But I'm unsure of the right path to becoming proficient in CFD. Any advice or guidance in this area, is much appreciated.


by the way. I'm also going to bed now, but I will dissect your solution Tobias tomorrow, to steal any ideas of how you set it up.
Tobi likes this.
MrAndersDk is offline   Reply With Quote

Old   October 11, 2018, 03:00
Default
  #28
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,
first of all, thank you for the kind words and your feedback & recap. Based on my lack of knowledge and almost rusty fluid dynamics lecture, I remember some equation you mention (Bernoulli + dp), but I cannot find my material right now. However, a short search gave me the following link (http://www.thermopedia.com/content/659/) where a comparison/equation is provided to calculate the pressure drop (it seems to be a bit different to yours) for cases we are looking at. One thing is clear at all: The sudden jump in terms of the pipe diameter should give a pressure drop based on viscous shearing/friction \Delta p.

Summing up. I refreshed my knowledge of the topic and might do some further investigations with the roughness of a pipe, respectively the nut wall functions - roughness (if there is any time). However, as I realized, there are still plenty of knowledge gaps I should reconsider to investigate some day.

To your question of CFD information. I read a few books such as Bird et al. (Transport Phenomena), Wilcox (Turbulence), Ferziger et al. (Numerical ...), Moukalled et al., the Ph.D. thesis of Jasak Hrvjoe or Philipp Cardiff and many more. Personally, some literature was harder to read, others more straightforward. A summary of different books/papers/thesis is given in my book (still free on research gate). However, considering my book, there are still a lot of things to improve, and it might be somehow written in a 'different' way - I don´t know.
The good thing nowadays is, that there is plenty of information out for CFD in general and OpenFOAM. E.g., the wiki.openfoam.com site or the courses of Chalmers

As I am not intelligent and smart as other genius people out there, I always have to derive the equations on my own. After that, commonly I get the point - but not always , and in some cases, I struggle to figure it out at all. Therefore, picking up your statement 'I am an idiot' does not hold and is disproved.


To get an overview of the influence of numerical schemes you can check out my voluntary part of my website voluntary.holzmann-cfd.de. However, this is just an overview
__________________
Keep foaming,
Tobias Holzmann

Last edited by Tobi; October 11, 2018 at 04:21.
Tobi is offline   Reply With Quote

Old   October 11, 2018, 03:20
Default
  #29
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 8
MrAndersDk is on a distinguished road
thanks for the reply.

I think the equation you linked to are the same as mine, rewritting for mass flow instead of velocity, and expressing v_1 through v_2 using the area ratios (constant volume flow).
MrAndersDk is offline   Reply With Quote

Old   October 11, 2018, 04:21
Default
  #30
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Okay, I was not sure because of the more complex formulation. As you said, K is around 0.5, I expected it is the S value of the equation, and thus, the C value is somehow missing. However, a simple calculation of the formula will give the answer.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 11, 2018, 04:23
Default
  #31
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 8
MrAndersDk is on a distinguished road
I actually think they write that S is the area ratio of the two pipe section. C is K or at least closely related to it.
MrAndersDk is offline   Reply With Quote

Reply


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
[ANSYS Meshing] pipe with different diameters (steady and sudden expansion) Raiz ANSYS Meshing & Geometry 0 October 12, 2015 07:18
Interface between a stator-rotor with sudden change in flowpath of the turbine mitra22 CFX 2 May 19, 2015 05:07
how to apply an sudden displacement or Force of a cylinder with solid solver? allenfieldin OpenFOAM Running, Solving & CFD 11 February 15, 2015 21:37
Sudden crash caused by k-epsilon vainilreb OpenFOAM Running, Solving & CFD 23 August 20, 2013 16:09
sudden perturbations adarsh Main CFD Forum 0 June 11, 2002 13:08


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