CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Outlet pressure boundary condition in interFoam (http://www.cfd-online.com/Forums/openfoam-solving/120350-outlet-pressure-boundary-condition-interfoam.html)

arnau1985 July 4, 2013 18:25

Outlet pressure boundary condition in interFoam
 
1 Attachment(s)
I am running an interFoam case with inlet and outlet and I don't know how to define the pressure (p_rgh) boundary condition in the outlet. I tried to use the same as the patch "sky" in the damBreak tutorial, but I got a physical no-sense (see attached screenshot).

I also tried several solutions, such as that of this link and several of CFD-online, but my simulations either didn't run or diverged after a few iterations. I know it's some tiny detail I'm missing, but I don't know what to do. I also tried a "zeroGradient" type of boundary condition for pressure and "fixedValue" of zero, but it didn't work.

Thank you very much!

Artur July 9, 2013 11:27

You didn't say exactly what your simulation is and the picture didn't help me much.

I use LTSInterFoam for ship hydrodynamic calculations and typically go for zeroGradient or fixedValue uniform 0 for the dynamic pressure term at the outlet. I suppose you could also use something like inletOutlet too.

arnau1985 July 10, 2013 04:19

Details on "Outlet pressure boundary condition in interFoam"
 
1 Attachment(s)
Hi Artur,

You're right, I gave very scarce information. I've attached a new picture with some more details on the pressure boundary conditions (henceforth B.C.) of my simulations.

As regards the outlet, as you suggested, I've used a zeroGradient as well as a fixedValue uniform 0 and it didn't work. I also copied the B.C. settings of the "atmosphere" patch in damBreak (inletOutlet type in "boundary" and totalPressure for "p_rgh") and I always get the same result.

However, I've recently observed that at higher inlet velocities, the jet leaves the domain though the right-hand outlet instead of through the bottom and everything works perfectly. I've also run the damBreak case changing one of the side walls to an outlet B.C. and this "spurious" bubbles didn't appear either. Is it possible that this problem only arises when the outlet is horizontal (i.e. perpendicular to the gravity direction)? Maybe it's due to the use of "p_rgh" (gravity corrected pressure) instead of "p".

Thank you very much for your help.

Regards,

Arnau.

Artur July 10, 2013 04:30

Ok, I see what you mean now. Unfortunately I don't know much about gravity driven flow simulations as I use interFoam only to calculate the free surface of moving ships so hopefully someone more experienced will have a look at your post. In the meantime, your mesh seems fairly coarse in the outlet region, have you tried refining it a bit to see if it makes a difference?

P.S. I don't think that the horizontal orientation of the outlet should make any difference because it seems like it should be (by enlarge) perpendicular to the flow of the jet.

Phicau July 10, 2013 04:43

Hi Arnau,

I think the problem may be caused by the bottom outlet, as I guess it is located below Z = 0 plane.

Try making all your outlet patchs be located in the first quadrant (x,y,z>0) and use the same BCs as for the atmosphere and let us know if it gets better.

Best,

Pablo

arnau1985 July 10, 2013 08:26

@Artur:

Maybe you're right about the mesh, I haven't had the time to try more refined meshes (I'm running some simulations as I write). However, the damBreak case run perfectly with a coarser mesh and with an outlet instead of one of the side walls, as I described in my previous post.

@Pablo:

You're right, the outlet was below the Z=0 plane. Indeed, in previous simulations I've observed that everything started going bad when the jet crossed this plane (that sounds kind of esoteric, doesn't it?). Nevertheless, I've run the same simulation as you said: in the first quadrant and with the same BC as the atmosphere but I still get the same result (I've attached a video). I'm trying finer meshes to see what happens, I'll let you know about the results.

Video: https://www.dropbox.com/s/corgjwhem1...let_as_sky.avi

BTW, these are the dictionaries of my outlet patch:

Code:

// boundary

        outlet
        {
            type            wall;
        }

// U

    outlet
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }


// alpha1, k, epsilon

    outlet
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }


// p_rgh

    outlet
    {
        type            totalPressure;
        p0              uniform 0;
        U              U;
        phi            phi;
        rho            rho;
        psi            none;
        gamma          1;
        value          uniform 0;
    }

Thank you very much for your help!

Best,


Arnau.

Artur July 10, 2013 08:37

I noticed you defined the outlet as a wall in your boundary file. Maybe try changing it to patch? On the video it appears as if the flow is not passing through the outlet so perhaps this is the reason.

Phicau July 10, 2013 08:48

Hi,

try this:

Code:

// alpha1

    outlet
    {
        type            inletOutlet;
        inletValue      0;
        value          $internalField;
    }


arnau1985 July 10, 2013 10:28

@Artur:

I used "wall" as B.C. because is the type to which the patch "atmosphere" belongs. I also tried the generic "patch" and I got the same result.

@Pablo:

Since my alpha1 "internalField" is assigned "uniform 0", what you suggest is what I have been trying.

Any idea? This is exhausting... I'll let you know what happens with the finer-mesh simulations.

Best,

Arnau.

arnau1985 July 11, 2013 03:16

Here are the results with a finer mesh and the problem persists:

https://www.dropbox.com/s/t8ekfxdm20...resolution.avi

I've zipped the entire simulated case (before running), in case somebody wanted to check it out:

https://www.dropbox.com/s/fnc8nuu1iwp4h5e/dam.zip

I don't know what else I should try...

Phicau July 11, 2013 03:28

Well, actually in this case you provided the bottom outlet is actually included in patch "wall" instead of being part of "outlet"...

arnau1985 July 11, 2013 03:46

Yes, Pablo, this is the last case I run, but as I told you I tried with "patch" as well. Anyway, the patch "atmosphere" in damBreak is defined as "wall", that's why this was my first option.

Phicau July 11, 2013 03:54

1 Attachment(s)
What I mean is that the bottom portion you intend to use as an outlet is actually a part of the boundary called "wall" instead of the one called "outlet" (disregarding if they are either a patch or a wall type), so the boundary conditions of "wall" apply instead of the boundary conditions of "outlet". See the attached picture ("wall" in red and "outlet" in blue)

Missileman July 11, 2013 03:57

Random question
 
Hi, I'm new to this forum. I'm trying to create a new post but I can't find the "New Post" or "New Thread" button. Help?

arnau1985 July 11, 2013 04:02

Yes, since I thought the horizontal outlet may have been the cause of my troubles, I tried to define as outlet only the vertical patches (again, I tried both cases, but the one I uploaded was the last one). Anyway, the result is the same: the water keeps on blocking at the outlet.

Thanks for your time, Pablo! :)

Artur July 11, 2013 04:02

Quote:

Originally Posted by Missileman (Post 439102)
Hi, I'm new to this forum. I'm trying to create a new post but I can't find the "New Post" or "New Thread" button. Help?

Here, below the sub-forum list:

http://www.cfd-online.com/Forums/openfoam/

Missileman July 11, 2013 04:05

Quote:

Originally Posted by Artur (Post 439105)
Here, below the sub-forum list:

http://www.cfd-online.com/Forums/openfoam/

Many thanks!

Artur July 11, 2013 04:12

Quote:

Originally Posted by arnau1985 (Post 439104)
Yes, since I thought the horizontal outlet may have been the cause of my troubles, I tried to define as outlet only the vertical patches (again, I tried both cases, but the one I uploaded was the last one). Anyway, the result is the same: the water keeps on blocking at the outlet.

Thanks for your time, Pablo! :)

Have you tried pure zeroGradient BC at the outlet for alpha1? From the description given here:

http://www.cfd-online.com/Forums/ope...letoutlet.html

I thought that maybe if your outflow is not strong enough it will not actually leave the domain? This would tie in with what you said earlier that with increased inlet velocity the problem disappears. Just a thought...

thibault_pringuey November 26, 2013 09:57

BC located at z=0 => rho*g*h = 0
 
Hello Arnau,

I am sort of looking at the similar issues. As you suggested, I believe that the issue related to the setting of a static pressure BC with p_rgh.

Have you tried setting your outlet BC to z=0 such that by setting fixed value of p_rgh = p_outlet_static + rho*g*0 = p_outlet_static?

Anyway, have you solved your problem?

Regards,


Thibault

arnau1985 November 26, 2013 11:00

1 Attachment(s)
Hi Thibault,

I solved the problem to a certain extent. What I did is the following: I realized that supercritical flow outlets in OpenFOAM behave as expected as long as there is no flow separation (I got the idea from this tutorial). So I replaced the spill of my model with a descending slope (see attached picture), set all the variables at the outlet to zeroGradient (except for pressure, which I set to buoyantPressure) and everything ran smoothly.

I am still trying to do all this in a more elegant way without spills, slopes and so on: just directly imposing a given water depth and a hydrostatic pressure profile at the outlet. I will try to keep you informed of my findings.

Good luck!

Arnau.


All times are GMT -4. The time now is 10:55.