openfoam允许在一段程序建立两个或多个fvMatrix吗?
-
各位好,
试了一下以下代码:fvVectorMatrix DEqn1 ( fvm::laplacian(impKf_, D(), "laplacian(DD,D)") - fvc::laplacian(impKf_, D(), "laplacian(DD,D)") ); fvVectorMatrix DEqn2 ( fvm::laplacian(impKf_, D(), "laplacian(DD,D)") - fvc::laplacian(impKf_, D(), "laplacian(DD,D)") ); Info << "source of DEqn1: " << DEqn1.source() << endl; Info << "source of DEqn2: " << DEqn2.source() << endl;
输出的结果为:
source of DEqn1: 4{(0 0 0)} source of DEqn2: 4((0 0 0) (0 0 0) (0 0 0) (0 -27000 0))
为什么这两个fvMatrix的源项会有不同?初始化的参数都是相同的。
BTW,fvc::laplacian(impKf_, D(), "laplacian(DD,D)")的值为:
dimensions [1 -2 -2 0 0 0 0]; internalField nonuniform List<vector> 4((0 0 0) (0 0 0) (0 0 0) (0 -180000 0)); boundaryField { top { type zeroGradient; } left { type zeroGradient; } right { type zeroGradient; } bottom { type zeroGradient; } front { type empty; } back { type empty; } }