CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Pressure problem in Interfoam (https://www.cfd-online.com/Forums/openfoam-solving/98164-pressure-problem-interfoam.html)

danvica March 5, 2012 00:56

Pressure problem in Interfoam
 
2 Attachment(s)
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;
    }
}


olivierG March 5, 2012 08:32

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

robbirobocop March 5, 2012 09:17

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.

danvica March 5, 2012 10:27

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. :D

danvica March 10, 2012 06:43

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

akidess March 13, 2012 04:51

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.

danvica March 13, 2012 09:45

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

MartinB March 13, 2012 10:20

1 Attachment(s)
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

danvica March 13, 2012 12:40

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

MartinB March 13, 2012 12:49

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

danvica March 13, 2012 13:56

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 March 14, 2012 02:33

4 Attachment(s)
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.

Linse March 14, 2012 02:56

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.


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