采用OpenFoam中的fvOptions
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
momentumSource
{
    type            meanVelocityForce;
    selectionMode   all;
    fields          (U);
    Ubar            (1.180923569513201 0 0);//Reb = 3162;
}
 
进行如下设置,可以大致设定流动的平均速度。
 对此,我在进行槽道流仿真时,进行了验证。对比了中间截面的平均速度和出口截面的平均速度,发现它们几乎一致
 
 这个fvOptions影响的是方程中的源项,类似重力项,通过调整体积力的大小来设定速度的大小。


















