H2在求解器中如何表示/如何在求解器中输出H2的参数?
-
各位前辈们好:
我在YEqn.H 中定义了所有组分的一个反应速率forAll(Y, i) { ROP_[i].field() = -(reaction->R(Y[i])()).source(); }
在求解时能正常输出:
但是当我直接定义 H2的反应速率:
ROP_[H2].field() = -(reaction->R(Y[H2])()).source();
编译的时候就报错:
/home/zhu/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude/GeometricField.C:188:1: note: candidate expects 4 arguments, 1 provided In file included from AMRreactingLMFoam.C:51:0: createFields.H:287:13: error: expected unqualified-id before ‘(’ token thermo. (reaction->R(Y[1])()).source()() ^ In file included from AMRreactingLMFoam.C:153:0: YEqn.H:30:14: error: ‘H2’ was not declared in this scope ROP_[H2].field() = -(reaction->R(Y[H2])()).source(); ^ In file included from AMRreactingLMFoam.C:54:0: /home/zhu/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable] scalar maxDeltaT =
显示H2没有定义,请问各位前辈在求解器中如何表示H2?