CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   buoyantBoussineqPimpleFoam Gravity Current (https://www.cfd-online.com/Forums/openfoam/198283-buoyantboussineqpimplefoam-gravity-current.html)

Bish February 1, 2018 09:36

buoyantBoussineqPimpleFoam Gravity Current
 
3 Attachment(s)
Hi All,

I am trying to simulate a gravity current within a simple long tank.
I have a small amount of sea water (1060 kg/m^3) behind a lock on the left and the rest of the tank filled with normal water (1000 kg/m^3).
I am using buoyantBoussineqPimpleFoam with a temperature difference to model the difference in density which works out to be 20K for the sea water and 300K for the water. I am using setFields to set the temperature difference and I have attached a picture of the initial temperature conditions.

I am trying model with the lock is removed instantaneously but I fear that my boundary conditions are incorrect.

The left, bottom and right walls are all using the relevant wall functions.
I have the top as an inletoutlet (atmospheric) boundary conditions.

Below are the main variable initial conditions:

Code:

0/T.orig

dimensions      [0 0 0 1 0 0 0];

internalField  uniform 300;

boundaryField
{
    floor1
    {
        type            zeroGradient;
    }
    ceiling1
    {
        type            zeroGradient;
    }
    floor2
    {
        type            zeroGradient;
    }
    ceiling2
    {
        type            zeroGradient;
    }
    leftWall
    {
        //type            zeroGradient;
        type            fixedValue;
        value          uniform 20;
    }
    rightWall
    {
        type            zeroGradient;
        //type            fixedValue;
        //value          uniform 300;
    }
    frontAndBack
    {
        type            empty;
    }
}

0/U

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

internalField  uniform (0 0 0);

boundaryField
{
    floor1
    {
        type            noSlip;
    }

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

    floor2
    {
        type            noSlip;
    }

    ceiling2
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
   
    leftWall
    {
        type dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    floor1
    {
        type            calculated;
        value          $internalField;
    }

    ceiling1
    {
        type            calculated;
        value          $internalField;
    }

    floor2
    {
        type            calculated;
        value          $internalField;
    }

    ceiling2
    {
        type            calculated;
        value          $internalField;
    }
   
    leftWall
    {
        type            calculated;
        value          $internalField;
    }

    rightWall
    {
        type            calculated;
        value          $internalField;
    }

    frontAndBack
    {
        type            empty;
    }
}dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    floor1
    {
        type            calculated;
        value          $internalField;
    }

    ceiling1
    {
        type            calculated;
        value          $internalField;
    }

    floor2
    {
        type            calculated;
        value          $internalField;
    }

    ceiling2
    {
        type            calculated;
        value          $internalField;
    }
   
    leftWall
    {
        type            calculated;
        value          $internalField;
    }

    rightWall
    {
        type            calculated;
        value          $internalField;
    }

    frontAndBack
    {
        type            empty;
    }
}dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    floor1
    {
        type            calculated;
        value          $internalField;
    }

    ceiling1
    {
        type            calculated;
        value          $internalField;
    }

    floor2
    {
        type            calculated;
        value          $internalField;
    }

    ceiling2
    {
        type            calculated;
        value          $internalField;
    }
   
    leftWall
    {
        type            calculated;
        value          $internalField;
    }

    rightWall
    {
        type            calculated;
        value          $internalField;
    }

    frontAndBack
    {
        type            empty;
    }
}


          noSlip;
    }

    rightWall
    {
        type            noSlip;
    }

    frontAndBack
    {
    type        empty;
    }dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    floor1
    {
        type            calculated;
        value          $internalField;
    }

    ceiling1
    {
        type            calculated;
        value          $internalField;
    }

    floor2
    {
        type            calculated;
        value          $internalField;
    }

    ceiling2
    {
        type            calculated;
        value          $internalField;
    }
   
    leftWall
    {
        type            calculated;
        value          $internalField;
    }

    rightWall
    {
        type            calculated;
        value          $internalField;
    }

    frontAndBack
    {
        type            empty;
    }
}

}

0/p

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

internalField  uniform 0;

boundaryField
{
    floor1
    {
        type            calculated;
        value          $internalField;
    }

    ceiling1
    {
        type            calculated;
        value          $internalField;
    }

    floor2
    {
        type            calculated;
        value          $internalField;
    }

    ceiling2
    {
        type            calculated;
        value          $internalField;
    }
   
    leftWall
    {
        type            calculated;
        value          $internalField;
    }

    rightWall
    {
        type            calculated;
        value          $internalField;
    }

    frontAndBack
    {
        type            empty;
    }
}

I have attached a temperature result which does not seem correct to me which is the first recorded time step. The velocity result looks correct but could be misleading.

Any help would be much appreciated.

Thanks,
Bish


All times are GMT -4. The time now is 18:03.