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

Pressure problem in Interfoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By olivierG

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 5, 2012, 00:56
Default Pressure problem in Interfoam
  #1
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17
danvica is on a distinguished road
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;
    }
}
u:
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);
    }
}
alpha:
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;
    }
}
Attached Images
File Type: jpg test-u.jpg (33.8 KB, 64 views)
File Type: jpg test-p.jpg (30.2 KB, 52 views)
danvica is offline   Reply With Quote

Old   March 5, 2012, 08:32
Default
  #2
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
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
mizzou likes this.
olivierG is offline   Reply With Quote

Old   March 5, 2012, 09:17
Default
  #3
Member
 
Rob
Join Date: Sep 2011
Posts: 55
Rep Power: 14
robbirobocop is on a distinguished road
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.
robbirobocop is offline   Reply With Quote

Old   March 5, 2012, 10:27
Default
  #4
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17
danvica is on a distinguished road
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.
danvica is offline   Reply With Quote

Old   March 10, 2012, 06:43
Default
  #5
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17
danvica is on a distinguished road
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 06:32. Reason: Update the file. Address modified.
danvica is offline   Reply With Quote

Old   March 13, 2012, 04:51
Default
  #6
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
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.
akidess is offline   Reply With Quote

Old   March 13, 2012, 09:45
Default
  #7
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17
danvica is on a distinguished road
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
danvica is offline   Reply With Quote

Old   March 13, 2012, 10:20
Default
  #8
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 21
MartinB will become famous soon enough
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
Attached Files
File Type: gz pipe_hexMesh_simpleFoam.tar.gz (3.2 KB, 8 views)
MartinB is offline   Reply With Quote

Old   March 13, 2012, 12:40
Default
  #9
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17
danvica is on a distinguished road
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
danvica is offline   Reply With Quote

Old   March 13, 2012, 12:49
Default
  #10
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 21
MartinB will become famous soon enough
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
MartinB is offline   Reply With Quote

Old   March 13, 2012, 13:56
Default
  #11
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17
danvica is on a distinguished road
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.
danvica is offline   Reply With Quote

Old   March 14, 2012, 02:33
Default
  #12
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17
danvica is on a distinguished road
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.
Attached Images
File Type: jpg msimple-k.jpg (24.7 KB, 35 views)
File Type: jpg msimple-p.jpg (23.0 KB, 30 views)
File Type: jpg msh-k.jpg (25.3 KB, 27 views)
File Type: jpg msh-p.jpg (22.2 KB, 26 views)
danvica is offline   Reply With Quote

Old   March 14, 2012, 02:56
Default
  #13
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
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.
Linse 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
Pressure calculation problem maolongliu OpenFOAM 1 August 15, 2010 08:05
problem with pressure force report jvd FLUENT 0 August 3, 2010 02:19
pressure gradient term in low speed flow Atit Koonsrisuk Main CFD Forum 2 January 10, 2002 10:52
A problem on the pressure John Main CFD Forum 6 November 18, 2000 06:41
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 15:00


All times are GMT -4. The time now is 17:57.