Openfoam源项的自动化处理SuSp的疑问


  • 讲师

    各位老师好,我对fvm::SuSp处理源项处理有一些困惑。
    Openfoam中的fvm::SuSp定义为:

    190 template<class Type>
    191 Foam::tmp<Foam::fvMatrix<Type> >
    192 Foam::fvm::SuSp
    193 (
    194     const DimensionedField<scalar, volMesh>& susp,
    195     const GeometricField<Type, fvPatchField, volMesh>& vf
    196 )
    197 {
    198     const fvMesh& mesh = vf.mesh();
    199 
    200     tmp<fvMatrix<Type> > tfvm
    201     (
    202         new fvMatrix<Type>
    203         (
    204             vf,
    205             dimVol*susp.dimensions()*vf.dimensions()
    206         )
    207     );
    208     fvMatrix<Type>& fvm = tfvm();
    209 
    210     fvm.diag() += mesh.V()*max(susp.field(), scalar(0));
    211 
    212     fvm.source() -= mesh.V()*min(susp.field(), scalar(0))
    213         *vf.internalField();
    214 
    215     return tfvm;
    216 }
    

    似乎是在susp.field为正的时候,对变量k的方程将源项化为SpVpk,把SpVp加到fvm.diag()里面去了,当susp.field为负的时候,对变量k的方程将源项化为SuVp,将SuVp加到fvm.source()里面去了。我不太清楚Openfoam是怎么实现下面这样的源项的线化的。
    0_1545980262377_Snipaste_2018-12-28_14-56-47.png
    将源项在上一次课的值处Taylor展开,implicit part 加到fvm.diag()里面,explicit part加到fvm.source()里面去?


  • 教授

    @yfclark 源项的线化主要涉及稳定性和收敛速率,加强系数矩阵的对角占优,具体可参考Patankar教授经典教材《Numerical Heat Transfer and Fluid Flow》的4.2-5节(48-49页)。


  • 教授

    @yfclark

    Jasak PhD thesis, P112:

    In order to improve the solver convergence, it is desirable to increase the diagonal
    dominance of the system. Discretisation of the linear part of the source term, Eqn.
    (3.36), is closely related to this issue. If Sp < 0, its contribution increases diagonal
    dominance and Sp is included into the diagonal. In the case of Sp > 0, diagonal
    dominance would be decreased. It is more effective to include this term into the
    source and update it when the new solution is available. This measure is, however,
    not sufficient to guarantee the diagonal dominance of the matrix.


Log in to reply
 


CFD中文网 | 东岳流体学术 | 东岳流体商业 | 吉ICP备20003622号-1