OpenFoam张量取值运算
-
我的部分代码是这样的
volTensorField gradU("gradU", fvc::grad(U)); scalarField parU1 = gradU.xz(); scalarField parU2 = gradU.zz();
我想取速度梯度中的某两个量,可是出现了这样的错误
TEqn.H:4:35: error: ‘Foam::volTensorField {aka class Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>}’ has no member named ‘xz’ scalarField parU1 = gradU.xz(); ^ TEqn.H:5:35: error: ‘Foam::volTensorField {aka class Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>}’ has no member named ‘zz’ scalarField parU2 = gradU.zz(); ^
大神们帮我看看这是为什么呢?该怎么改呢?