CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   The initial condition for alpha (https://www.cfd-online.com/Forums/openfoam-pre-processing/145344-initial-condition-alpha.html)

zhxter December 3, 2014 06:16

The initial condition for alpha
 
Dear Foamers,
Now I am trying to simulate waves using OpenFOAM.

And I have one question about the initial condition for alpha(the volume fraction)

In the 0 folder, the alpha is set as follows,
dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"

movingWall
{
type zeroGradient;
}

rightWall
{
type zeroGradient;
}

bottom
{
type zeroGradient;
}

atmosphere
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}

defaultFaces
{
type empty;
}
}

// ************************************************** *********************** //
The atmosphere boundary is set as inletOulet. And I look for the user guide and find that "inletOutlet" Swithes U and p between fixedValue and zeroGradient depending on direction of U . But I still don't quite understand the meaning? can anyone help me???

Phicau December 3, 2014 06:46

Hi Xiantao,

inletOutlet is zero gradient if flow is outwards to the domain, and fixed value (equal to inletValue) otherwise.

This means that if inletValue = 0, then water and air are able to flow outside your domain through the atmosphere, but if pressure requires an entering flux, then it will only be air (alpha = 0).

Best,

Pablo

zhxter December 4, 2014 00:40

Hi, Pablo

Since there are two types of data(inletValue and value) to specify for the "inletOutlet" boundary type.

You mean, if inletValue=0, then water and air are able to flow out the domain through the atmosphere boundary. inletValue corresponds to "fixedValue".

How about the second type of data "value"?? does it correspond to "zeroGradient"??

Hope to receive your reply.

Best,
Xiantao

Phicau December 4, 2014 02:33

Hi Xiantao,

"value" is not used by OpenFOAM, it is just needed to load the case in ParaView. Sometimes when you don't specify the "value" and ParaView does not know the boundary condition it fails to load the field or crashes.

The very first time step the correct "value" is calculated by OpenFOAM.

Best,

Pablo


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