- generally OK to miss for easily evaluated functions, but highly misleading with expressions (where the evaluate may be invalid during construction).
60 lines
1.5 KiB
C++
60 lines
1.5 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
| ========= | |
|
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
| \\ / O peration | Version: v2012 |
|
|
| \\ / A nd | Website: www.openfoam.com |
|
|
| \\/ M anipulation | |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
version 2.0;
|
|
format ascii;
|
|
class volScalarField;
|
|
object alpha.water;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
dimensions [0 0 0 0 0 0 0];
|
|
|
|
internalField uniform 1;
|
|
|
|
boundaryField
|
|
{
|
|
inlet
|
|
{
|
|
type uniformFixedValue;
|
|
value $internalField;
|
|
uniformValue
|
|
{
|
|
type expression;
|
|
|
|
// arg() and time() are identical here
|
|
expression #{ time() <= 1 ? 1 : 0 #};
|
|
}
|
|
}
|
|
|
|
outlet
|
|
{
|
|
type inletOutlet;
|
|
inletValue uniform 0;
|
|
value uniform 0;
|
|
}
|
|
|
|
walls
|
|
{
|
|
type zeroGradient;
|
|
}
|
|
|
|
base
|
|
{
|
|
type zeroGradient;
|
|
}
|
|
|
|
defaultFaces
|
|
{
|
|
type empty;
|
|
}
|
|
}
|
|
|
|
// ************************************************************************* //
|