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 rotating cylinder pressure BC problem (https://www.cfd-online.com/Forums/openfoam-solving/121921-interfoam-rotating-cylinder-pressure-bc-problem.html)

chrisb2244 August 8, 2013 03:05

interFoam rotating cylinder pressure BC problem
 
1 Attachment(s)
Hi,

I'm currently using interFoam to model a rotating cylinder containing mostly water, with air in a small fraction at the top. I initially tried using swak4Foam to create expressions for 0/U on the walls and base of my cylinder making them, for example, (-Rsin(theta), Rcos(theta), 0) for the walls, and similar for the bottom. I have since moved to rotatingWallVelocity in the hope that the wall term would change my problem, but it seems to have made no difference.

When I visualise the results (currently I only have results for a short simulated time, t around 1 second in etc, although am running a 20s duration calculation on a coarser mesh to try track this down), the velocity is set nicely on the boundaries, but then does not diffuse inwards. Instead, the vortex formed in the centre on the axis diffuses velocity outwards.

If anyone has any recommendations (preferably avoiding redesigning my mesh, but if that is necessary then so be it), I would very much appreciate your help.

My BC files are below

p.s.
Looking at my BC files again, I realise it may appear as though there is a hole in my bucket... This is not the case, although the mesh was designed to allow me to set one up, probably using a pressureOutlet condition, or something. As it stands, the outlet should (I hope) behave in exactly the same way as the bottom boundary/patch.

************************************************** *********

Code:

object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0;

boundaryField
{
    sides
    {
        type            fixedGradient;
    gradient        uniform 0;
    }

    bottom
    {
        type            fixedGradient;
        gradient        uniform 0;
    }

    outlet
    {
        type            fixedGradient;
        gradient        uniform 0;
    }

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

Code:

  object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    sides
    {
    type    movingWallVelocity;
    axis    (0 0 1);
    origin    (0 0 0);
    omega    1;
    value    uniform (0 0 0);
    }
   
  bottom 
    {
    type    movingWallVelocity;
    axis    (0 0 1);
    origin    (0 0 0);
    omega    1;
    value    uniform (0 0 0);
    }

    outlet
    {
    type    movingWallVelocity;
    axis    (0 0 1);
    origin    (0 0 0);
    omega    1;
    value    uniform (0 0 0);
    }

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


chrisb2244 August 12, 2013 01:37

I now have results for a endTime=60 seconds. The velocity is in fact seeming to diffuse outwards from the centre on the surface, and then downwards through my cylinder. I still don't see why the walls are not causing a velocity to diffuse inwards from the walls.

My surface tension is being ignored using a zeroGradient BC on alpha1 as in the damBreak tutorial - is this a bad choice for my problem?

Any help is much appreciated.


All times are GMT -4. The time now is 13:41.