@东岳 谢谢,我也觉得这个方程很简单,这段代码放到icoFoam里面没有出现过问题。但是放在两种液体混合求解器中就不行了。我感觉边界条件没有问题,流体从一侧流入,另一侧流出。
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      T;
}
dimensions      [0 0 0 1 0 0 0];
internalField   uniform 293;
    inlet
    {
        type            groovyBC;
        valueExpression "(pos().y>1) ? (295):(293)"; 			
    }
    outlet
    {
        type            zeroGradient;	
    }
    freeSurface
    {
        type            zeroGradient;
    }
    bottom
    {
        type            fixedValue;
        value           293;			
    }
    front
    {
        type            symmetryPlane;	
    }
    back
    {
        type            symmetryPlane;		
    }
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
dimensions      [0 1 -1 0 0 0 0];
internalField   uniform (1 0 0); 
boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform (1 0 0);
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value           $internalField;		
    }
    freeSurface
    {
        type            pressureInletOutletParSlipVelocity;
        value           uniform (1 0 0);
    }
    bottom
    {
        type            fixedValue;
        value           uniform (0 0 0);			
    }
    front
    {
        type            symmetryPlane;		
    }
    back
    {
        type            symmetryPlane;	
    }
}