CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Pipe Junction with interFoam Pressure Bounday Fails (http://www.cfd-online.com/Forums/openfoam/101896-pipe-junction-interfoam-pressure-bounday-fails.html)

mgdenno May 16, 2012 11:58

Pipe Junction with interFoam Pressure Bounday Fails
 
Hello,

I am trying to model the flow of water through a pipe junction box that will split the flow of water between two outlet pipes. The run appears to run smoothly for about 7.2 seconds when suddenly the timestep starts to decrease and eventually the simulation stops. Here is an overview of the setup showing the pipe junction and inlet and outlet locations:

http://dl.dropbox.com/u/6351108/fds/setup_anno.jpg

What makes this different than anything I have done with OF previously is that the outlets are submerged and as such I believe that I need to specify a pressure (based on p-rgh) and alpha1 = 1, however, this seems like it may be contributing to the problem. If I don't specify alpha1 = 1 the outlet pipes just fill with air, which is not correct. I have tried quite a few different combinations of boundary conditions at both the inlet and outlets, but the most recent is:

Inlet:
alpha1 = fixedValue, value uniform 1
p_rgh = buoyantPressure
U = flowRateInletOutletVelocity, flowRate constant 1.61

Atmosphere:
alpha1 = inletOutlet, inletValue uniform 0
p_rgh = totalPressure, p0 uniform 0
U = pressureInletOutletVelocity, uniform (0 0 0)

Outlet 1 and 2:
alpha1 = fixedValue, value uniform 1
p_rgh = totalPressure, p0 uniform 17294
U = pressureInletOutletVelocity, uniform (0 0 0)

The actual alpha1, p_rgh and U files are linked below. They are kind of a mess because of the number of different setups that I have tried.
alpha1
p_rgh
U

Based on these boundary conditions it runs for about 7.2 seconds then crashes. If I change the Outlet BC as follows it runs fine but of course it is not correct for my case:

Edit1: These BC run without crashing but there is no flow out of the outlets, so I guess it is not ok.

Outlet 1 and 2:
alpha1 = inletOutlet, inletValue uniform 0
p_rgh = inletOutlet, inletValue uniform 0
U = inletOutlet, inletValue uniform (0 0 0)

My fvSchemes and fvSolutions are as follows:
fvSchemes
fvSolution

My mesh was generated using snappyHexMesh based on a couple of STL files generated using salome. CheckMesh says that the mesh is OK.

I am using the interFoam solver version 2.1.0 for this case. I am currently just running laminar flow but am planning to include turbulence at some point after I get it running.

Using setFields I set the initial conditions to have the pipes be full but not have water over the splitter as shown in the t=0 image:

http://dl.dropbox.com/u/6351108/fds/t%3D0.jpg

After 7.2 seconds, just before it fails, it looks like this:

http://dl.dropbox.com/u/6351108/fds/t%3D7.2.jpg

Anyone have ideas on how I can maintain the pressure outlet condition but prevent it from crashing?

I have searched the forums extensively; it looks like a number of people are having issues with pressure boundaries in interFoam. It has been suggested that there is an issue with PIMPLE and that the PISO works better. This is one solution that I am pursuing by compiling and using OF 1.7.1, however, I have not been able get it compiled (I am working on this issue in different thread) That said, if there is a solution that doesn't involve PISO I would be preferable.

Thanks,

MD

mgdenno May 16, 2012 23:10

1 Attachment(s)
A little bit of new information. I ran it again with the following outlet boundaries, however, instead if initializing the outlet pipes as full at t=0 I started them as empty and only the inlet pipe full.

Outlet 1 and 2:
alpha1 = inletOutlet, inletValue uniform 0
p_rgh = inletOutlet, inletValue uniform 0
U = inletOutlet, inletValue uniform (0 0 0)

The result is that as soon as the water reaches the outlet it crashes. It seems like water (alpha1=1) is not being allowed to pass through the outlet boundary.

Picture attached showing outlet2 just before it crashes.

Phicau May 17, 2012 02:42

Hi

try this:

p_rgh
Code:

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

U
Code:

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

alpha1
Code:

    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }

It should work now.

mgdenno May 17, 2012 11:50

Phicau,

Thank you for your suggestion. It seems to work well for the free outflow case.

Any BC suggestions for simulating the condition where the boundary is submerged?

MD

Phicau May 17, 2012 12:15

Hi

I think those will work too. Did it crush with them?

mgdenno May 17, 2012 12:35

I believe that when I increased the totalPressure to account for the depth of water at the outlet it crashed. I think I also had alpha1 set to a fixedValue = 1, which may have been the problem. I will try it again and this time only change the totalPressure, and will report back the results.

Maybe for alpha1 I should set the inletValue to be = 1 such that any inflow would be "water" and not "air". Thoughts?

mgdenno May 17, 2012 20:59

Phicau,

Thanks for your suggestions. It is running and the results look reasonable so far. I really thought that I had tried those BC but I guess I hadn't with the current mesh. I also set the alpha1 inletOutlet inletValue=1 for the outlet1 and outlet2. I am not sure if this was needed, but I think I might have had a problem with the outlet pulling in air before. If I have a chance I will run it with the inletValue set to 0 and see what happens.

MD

Phicau May 18, 2012 03:43

Sorry that I copied the atmosphere settings without realizing that yours were pipes.

That sounds reasonable, inletValue=1 will introduce water if in-flux velocities appear. I guess this is not the expected behaviour, but can certainly happen specially in the first moments.

Regards

giack April 5, 2013 09:39

Hi to all,
I have a problem with the setting of the boundary condition in a similar problem.
My case is summarized as follow:
at the initial time t=0 the right wall of a closed tube completely filled with liquid is removed, allowing the liquid to exit the domain and, at the same time, allowing the gas to enter.
I set the BC in this way:
left wall: "p" zero gradient "U" fixed value (0,0,0) "alpha1" fixed value 1
pipe wall: "p" zero gradient "U" fixed value (0,0,0) "alpha1" zero gradient
right wall (outlet): "p" total pressure "U" pressureInletOutletVelocity "alpha1" inletOutlet
but I obtain unphysical result

Where is the error?Someone have an idea to set BC for this case?
thank to all


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