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/)
-   -   Problem with pressure boundary conditions (http://www.cfd-online.com/Forums/openfoam-solving/119649-problem-pressure-boundary-conditions.html)

GunGur June 20, 2013 21:31

Problem with pressure boundary conditions
 
1 Attachment(s)
Greatings to everyone.
I hope someone can help me with a problem.
I have been learning to use openFoam for past couple of weeks so I could use it for a bit of analyzing of Smagorinsky model, which is topic of my thesis.
I have run already a couple simple tests like lid driven cavity flow, flow over an obstacle and so on, mainly simple 2D test problems.
My mentor sugested i try to model a blood flow through bifurcation with an aneurysm.
So i have basicly three pipes, of different diameters, one inlet, two outlets, that are connected at a junction and one of the pipes has a widening. The fluid is assumed to be incompressible Newtonian fluid.
At first try I have setup the case in a way that i prescribe time-varying Pouiselle velocity profile on inlet, fixedValue pressure and zeroGradient velocity on outlet.
So far so good, I solved the case with IcoFoam and with pimpleFoam with Smagorinsky model for comparisson.
Then my mentor suggested I try to prescribe time-varying pressure on inlet and fixedValue pressure on outlets. Thats where the trouble begins.
Again i try to solve it with icoFoam first. I used the folowing initial-B.C.:
Code:


0/p
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{

    inlet         
    {
        type            uniformFixedValue;
    uniformValue    tableFile;
    tableFileCoeffs
    {
        fileName    "pressuredrop.txt";
        outOfBounds    repeat;
    }
    }

    outlet1         
    {
                type            fixedValue;
            value          uniform 0;
   
    }
 

    outlet2       
    {
            type            fixedValue;
            value          uniform 0;
       
    }
    walls
    {
        type            zeroGradient;
    }

    UpDown
    {
        type            empty;
    }
}

// ************************************************************************* //

and following 0/U

Code:


0/U
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{
    inlet     
      {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
        }
   
      outlet1   
        {
        type            zeroGradient;
        }

        outlet2 
        {
        type            zeroGradient;
   
     
        }

    walls
    {
        type    fixedValue;
        value    uniform (0 0 0);
    }

    UpDown
    {
        type    empty;
    }
}

// ************************************************************************* //

No matter how small deltaT i use, sollution blows up at aproxx t = 0.206. When i look at the results just before blowup i can see that velocity tends to grow to physicaly impossible proportions, and it happens mainly in a small part of the inlet. Now I'm not sure is this due to icoFoam-s limitations, or due to bad mesh, or maybe bad choice of boundary conditions.
When i change inlet in 0/U to:
Code:

inlet     
      {
        type            pressureInletUniformVelocity;
        value          uniform (0 0 0);
      }

the simulaton runs it's course whitout a problem because, that inlet condition "irons" the velocity so it never get the chance to blow up anywhere. Unfortunatly that constraint is unphysical.

I would think it's icoFoam thats causing the trouble but i'm not sure because very similar case with pulsating Pouiselle profile works like a charm.
I would think that it's the mesh but mesh looks ok and pasess checkMesh with reasonable results, screenshot is attached below
So i'm thinking it's boundary conditions, since the whole trouble starts at inlet.

I have tried using different B.C for velocity on outlet too, ( InletOutlet ) but to no avail. I have also tried to use different, nCorrection, nNonOrthCorr and so on but nothing helped.

Sorry if it's a stupid question, I'm very new to OF :)

Thanks in advance for any advice


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