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/)
-   -   Interfoam boundary setup problem tank with dip tube in tank (https://www.cfd-online.com/Forums/openfoam-solving/244542-interfoam-boundary-setup-problem-tank-dip-tube-tank.html)

Dano62 August 14, 2022 13:10

Interfoam boundary setup problem tank with dip tube in tank
 
2 Attachment(s)
I am trying to model flow through a vented dip tube into a tank, and I'm currently having difficulty setting stable boundary conditions. Then tank has liquid feeding through a dip tube which is vented back to the tank. The tank is maintained at a constant level through a level controller, and I've set prgh to correspond with this height. I'm using interfoam with local timestepping to first solve for an average free surface.

The liquid level stays appropriately stable, and the liquid flow appears to develop properly but the air velocity field explodes. I suspect that there's some sort of feedback loop developing between the outlet and air inlet causing issues.

I've attached images summarizing the setup and main issue for reference as included my U and p_rgh setup below.

The figure with contours is a simulation stopped early. The blue crop is velocities exceeding 10m/s of air, while the green crop shows the current liquid levels. The air velocity through the air inlet should be near negligible instead of consistently accelerating. It ranges from 10m/s to 80m/s at the time of this image.

The issue I'm having is in properly specifying the inletAir conditions, or possibly the outlet conditions. It seems no matter what I specify the system becomes unstable and the velocity of air through the inlet continuously increases. I've moved the air inlet away from the vent line, increased mesh refinement of the vent, and tried a variety of boundary conditions for the inlet and outlet but always seem to have stability issues.

The U and p_rgh conditions currently match those in the waterChannel tutorial.

Any help at all would be much appreciated. Thanks!

U:
Code:

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    inletAcid
    {
        type                flowRateInletVelocity;
        volumetricFlowRate  constant 0.278931;
    }

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

    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value          $internalField;
    }

    "walls.*"
    {
        type            noSlip;
    }
}

p_rgh:
Code:

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    inletAcid
    {
        type            fixedFluxPressure;
        value          uniform -64948;
    }

    inletAir
    {
        type            totalPressure;
        p0              uniform -64948;
    }

    outlet
    {
        type            fixedFluxPressure;
        value          uniform -64948;
    }

    "walls.*"
    {
        type            fixedFluxPressure;
        value          uniform -64948;
    }
}


Dano62 August 23, 2022 11:50

I found a working solution to this, so I'll post here in case anyone is looking for a reference later.

In the model, air was consistently accelerating from the air inlet through the combined air/liquid outlet. It's essentially a pressure-pressure boundary condition pairing with negligible line losses. The solution was to split the outlet region into a dedicated liquid outlet below the free surface and walls. The air inlet then acted as an atmospheric vent and the only air opening in the system.

I redefined the p_rgh pressure at the air inlet to a totalPressure of 0, and set the new liquid outlet P_rgh to a fixedValue of -64948 which corresponds to the static head of liquid surface beneath the origin.

The end result was a consistent free surface at the elevation I expected, and the air inlet acting as an atmospheric vent. The downside is that I've introduced an artificial wall into the model, but it's far enough away from my area of interest to not be a significant problem.

EricS September 13, 2022 05:07

Hi Daniel, I'm facing a similar issue and I'd like to solve it in the same way. Could I ask you how were you able to split the outlet patch in two? Because it's a flat patch so I don't really know how to divide it in two.


Thank you in advance :)

Dano62 September 13, 2022 14:50

I modified the geometry to have a dedicated outlet that was removed from my area of interest. I built the geometry in Salome, so I made the change there. You can also split a face in Salome, which may help you in modifying your geometry too if you just want to split an existing face. Be sure to allow free standing edges in snappyHexMesh if you do this and are using SHM.

EricS September 14, 2022 05:51

Ok thank you, I was struggling to make it in snappy. In your way it looks much easier! :)


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