# buoyantBoussineqPimpleFoam Gravity Current

 Register Blogs Members List Search Today's Posts Mark Forums Read

February 1, 2018, 10:36
buoyantBoussineqPimpleFoam Gravity Current
#1
New Member

Join Date: Jul 2016
Posts: 3
Rep Power: 4
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
{
}
ceiling1
{
}
floor2
{
}
ceiling2
{
}
leftWall
{
type            fixedValue;
value           uniform 20;
}
rightWall
{
//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
Attached Images
 Screenshot from 2018-02-01 14-30-29.jpg (21.8 KB, 4 views) Screenshot from 2018-02-01 14-31-37.jpg (21.9 KB, 4 views) Screenshot from 2018-02-01 14-31-58.jpg (25.3 KB, 3 views)

 Tags gravity current