Openfoam,多相Interfoam,非恒定入口

Openfoam, multiphaseInterfoam, non-constant inlet

我 运行 multiphaseInterfoam,我遇到了入口不稳定的问题(我希望它是恒定的。)

这是我的 alpha 文件\

/--------------------------------- C++ -----------------------------------\

FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object alpha.air; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField { //- Set patchGroups for constraint patches #includeEtc "caseDicts/setConstraintTypes"

inlet
{
    type            alphaContactAngle;
    thetaProperties
    (
        ( freshWater air ) 90 0 0 0
        ( saltWater air ) 90 0 0 0
        ( freshWater saltWater ) 90 0 0 0
    );
    value           uniform 0;
}

outlet

{
    type            alphaContactAngle;
    thetaProperties
    (
        ( freshWater air ) 90 0 0 0
        ( saltWater air ) 90 0 0 0
        ( freshWater saltWater ) 90 0 0 0
    );
    value           uniform 0;

}

    atmosphere
{
    type            inletOutlet;
    inletValue      uniform 1;
    value           uniform 1;
}


barge
{
    type            alphaContactAngle;
    thetaProperties
    (
        ( freshWater air ) 90 0 0 0
        ( saltWater air ) 90 0 0 0
        ( freshWater saltWater ) 90 0 0 0
    );
    value           uniform 0;
} }

alpha.freshwater:

/--------------------------------- C++ -----------------------------------\

FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object alpha.freshWater; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField { //- Set patchGroups for constraint patches #includeEtc "caseDicts/setConstraintTypes"

inlet
{
    type            fixedValue;
    value           $internalField;
}

outlet
{
    type            variableHeightFlowRate;
    lowerBound      0;
    upperBound      1;
    value           $internalField;
}

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

barge
{
    type            zeroGradient;
} }

alpha.saltWater

FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object alpha.saltWater; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField { //- Set patchGroups for constraint patches #includeEtc "caseDicts/setConstraintTypes"

inlet
{
    type            fixedValue;
    value           $internalField;
}

outlet
{
    type            variableHeightFlowRate;
    lowerBound      0;
    upperBound      1;
    value           $internalField;
}

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

barge
{
    type            zeroGradient;
} }

// ************************************************************************* //

阿尔法

/--------------------------------- C++ -----------------------------------\

FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object alphas; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField { //- Set patchGroups for constraint patches #includeEtc "caseDicts/setConstraintTypes"

inlet
{
    type            fixedValue;
    value           $internalField;
}

outlet
{
    type            variableHeightFlowRate;
    lowerBound      0;
    upperBound      1;
    value           $internalField;
}

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

barge
{
    type            zeroGradient;
} }

// ************************************************************************* //

上面给出了时间步长 1 的以下想要的流体分布

enter image description here

然而,经过几次上述变化,同样在入口处:

enter image description here

我真的不明白上面alpha.air中使用的contactAngle函数。我试过以下 alpha.air

/--------------------------------- C++ -----------------------------------\

FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object alpha.air; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField { //- Set patchGroups for constraint patches #includeEtc "caseDicts/setConstraintTypes"

inlet
{
    type            fixedValue;
    value           $internalField;
}

outlet
{
    type            variableHeightFlowRate;
    lowerBound      0;
    upperBound      1;
    value           $internalField;
}

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

barge
{
    type            zeroGradient;
} }

// ************************************************************************* //

在上面的 alpha.air 中,我收到一条很长的错误消息,其中包含被解释为互联网链接的内容,因此不允许我在此处发布它们。错误信息可以在this link to the CDF-online forum上看到,我也在那里问过这个问题。

有没有人知道如何修改上述文件以使入口处的 alpha 分布恒定?

上一版alpa.air我从"internalField uniform 0"改成了"internalField uniform 1",现在入口不变。我认为 internalFIeld 值必须等于 setFieldsDict 中设置的默认值。