@allanZhong 2年过去了。。。是需要乘以体积。例如我刚写了个科氏力源项:
nergySource
{
type coded;
selectionMode all;
field U;
codeInclude
#{
#};
codeAddSup
#{
Pout<< "**codeAddSup**" << endl;
const volVectorField& U = eqn.psi();
vectorField& USource = eqn.source();
vector omega(0, 0, 5e-5);
const DimensionedField<scalar, volMesh>& V = mesh().V();
USource += (2.0*omega)^U*V;
#};
codeAddRhoSup
#{
Pout<< "**codeAddRhoSup**" << endl;
#};
codeAddAlphaRhoSup
#{
Pout<< "**codeAddAlphaRhoSup**" << endl;
#};
}