|
[Sponsors] |
March 5, 2012, 01:56 |
Pressure problem in Interfoam
|
#1 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
I'm testing a simple case using Interfoam.
The geometry is a 8mm diam. pipe with a lenght of 300mm The inlet U is 5m/s, resulting in 15l/min flow rate. The inlet fluid (water) is reaching the other end of the pipe after 60ms, correct. The problem is in the pressure field. The inlet p is way too low, just 3600Pa. At the company we have a water testing workbench that we use to measure taps flow rate. The get such a flow rate in a pipe this size we have to set a pressure in the order of 0.5bar / 50000Pa. I don't have experience in CFD, maybe it's because we just miss the turbolence part of the flow ? Anyone can help me ? Thanks. Here are the set up: p_rgh: Code:
dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type buoyantPressure; value uniform 0; } outlet { type fixedValue; value uniform 0; } /*outlet { type totalPressure; p0 uniform 0; U U; phi phi; rho rho; psi none; gamma 1; value uniform 0; } */ defaultFaces { type buoyantPressure; value uniform 0; } } Code:
internalField uniform (0 0 0); boundaryField { outlet { type pressureInletOutletVelocity; value uniform (0 0 0); } inlet { type fixedValue; value uniform (0 0 -5.0); } defaultFaces { type fixedValue; value uniform (0 0 0); } } Code:
internalField uniform 0; boundaryField { inlet { type fixedValue; value uniform 1; } /*outlet { type inletOutlet; inletValue uniform 0; value uniform 0; }*/ outlet { type zeroGradient; } defaultFaces { type zeroGradient; } } |
|
March 5, 2012, 09:32 |
|
#2 |
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18 |
hello,
I don't understand what you try to do... InterFoam is for multiphase flow ... and you try to simulate a pipe full of water ? Take a look at simpleFoam instead ? And yes, with water at 5m/s in a 8mm diam pipe you get turbulent flow. Try k-omega SST. If you set think correctelly, you should get less than 5% error. O.T.: if you don"t have CFD experience, and just want to know pressure loss in pipe, there is good tabulated formula, you will get good result ... and O.F is not friendly with "no CFD experience user", i.e not push a button and it works. but you can learn a lot. regards, olivier |
|
March 5, 2012, 10:17 |
|
#3 |
Member
Rob
Join Date: Sep 2011
Posts: 55
Rep Power: 15 |
Well, even with less knowledge of CFD it should not be too complicated to set up a simple case
But it should be considered what olivier said. Do you just want to simulate one phase that is water in your case? Because then I would recommend simpleFoam as well... The turbulence model that would be appropriate for your case is k-omega-SST as already mentioned by olivier. You should also provide a picture of your mesh because a mesh that is too coarse might provide you a high deviation as well. A few months ago I tested around with laminar and turbulent flow in pipes and compared it to solutions I got with ANSYS. And by using finer grids the deviation of results of both programs diminished. |
|
March 5, 2012, 11:27 |
|
#4 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
I expected such a reply . I deserve it.
Actually I'm interested in multiphase (water/air) transient inside valves. Due to my inexperience I had problem setting the boundary conditions, so I decided to start with a simple case. The picture I attached was shot at the end of the simulation, when the water already reached the end of the pipe. By the way, using totalPressure instead of fixedValue as BC for the outlet causes a crash in the sim more or less when the water is at the middle of the pipe. Any hint ? However, I'll repeat the cases adding turbolence and/or using a finer mesh. Thanks for the hints. P.S. But I would really like the "push a button and it works" idea. |
|
March 10, 2012, 07:43 |
|
#5 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
I wrote a simple guideline regarding my case.
The main idea is to have a pratical starting point for solving two-phases transient turbolent cases. First of all: it's far from complete. I'd really appreciate if someone could give it a look and comment it. This is the link: http://www.box.com/s/5f45b9c6a8cda47a9d62 The goal is to (later) include everything (meshing tool, parallel computation, etc.). I don't want to write an academic paper (well, I would like but I don't have the background to do it). Just a pratical reference for my own use first. Thanks, Daniele Last edited by danvica; March 17, 2012 at 07:32. Reason: Update the file. Address modified. |
|
March 13, 2012, 05:51 |
|
#6 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Daniele, you should consider switching to a hexahedral mesh - typically you will get a more accurate result faster.
It is admirable that you took the time to compile a guide and share it with others. I recommend you run a spell-check though, and then perhaps upload it to the wiki.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
March 13, 2012, 10:45 |
|
#7 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
Thanks akidess,
You're right. I'm just testing snappyhexmesh. I'll update the guide with hex meshing. And you're right concerning the spell-check too . Daniele |
|
March 13, 2012, 11:20 |
|
#8 |
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22 |
Hi Daniele,
here is a blockMesh based hex mesh. Tested with simpleFoam and OpenFOAM 2.0.x (start the Allrun script with "sh Allrun"), but you should be able to port it to interFoam easily. Martin |
|
March 13, 2012, 13:40 |
|
#9 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
Thanks Martin,
I'll try it. BTW, is there a reason for the k BC to have the inlet at 0.094 m^2/s^2 but the walls (defaultFaces) defined using kqRWallFunction with a value of 0.375 ? I think this value is just an initial guess, isn't it ? Daniele |
|
March 13, 2012, 13:49 |
|
#10 |
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22 |
Hi Daniele,
indeed, my definition of k BC for defaultFaces is just a typo. I simply took your values from the PDF document without deeper investigations. The essential of my post is the blockMeshDict ;-) Martin |
|
March 13, 2012, 14:56 |
|
#11 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
Thanks for the help Martin and sorry for my simple questions.
I cannot execute your script immediately because I use windows compiled version of OpenFoam 2.0 by BlueCAPE. It seems good at the moment but there're some differences in the paralleling execution. Not many actually but there are. Above all is the decompositionMethod: It misses the scotch method that probably is the best one. I'll open another thread for this and run your example sequential. Thanks again. |
|
March 14, 2012, 03:33 |
|
#12 |
Senior Member
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17 |
Martin,
here are the results comparing mine and your case. There are some differences but I need your help to explain them, maybe it's just a display range issue. Thanks. |
|
March 14, 2012, 03:56 |
|
#13 |
Senior Member
|
What I can suggest to both of you:
Try to use an already developed flow profile at the inlet. With simpleFoam and an uniform inlet I had pressure drops that were 20% off on a 1m-10cm tube with an air flow velocity of 25 m/s. The inlet profile really makes an important difference! One possibility to use developed profiles is by using swak4Foam's groovyBC-function. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure calculation problem | maolongliu | OpenFOAM | 1 | August 15, 2010 09:05 |
problem with pressure force report | jvd | FLUENT | 0 | August 3, 2010 03:19 |
pressure gradient term in low speed flow | Atit Koonsrisuk | Main CFD Forum | 2 | January 10, 2002 11:52 |
A problem on the pressure | John | Main CFD Forum | 6 | November 18, 2000 07:41 |
Hydrostatic pressure in 2-phase flow modeling (long) | DS & HB | Main CFD Forum | 0 | January 8, 2000 16:00 |