energySource
{
type scalarCodedSource;
active yes;
name sourceTime;
scalarCodedSourceCoeffs
{
selectionMode all;
fields (h);
codeInclude
#{
#};
codeCorrect
#{
Pout<< "**codeCorrect**" << endl;
#};
codeAddSup
#{
const Time& time = mesh().time();
const scalarField& V = mesh_.V();
scalarField& heSource = eqn.source();
heSource -= 0.1*sqr(time.value())*V;
#};
codeSetValue
#{
Pout<< "**codeSetValue**" << endl;
#};
}
sourceTimeCoeffs
{
$scalarCodedSourceCoeffs;
}
}
请问这个fvOptions文件中能否实现加热源,热源随着自己定义的标量场呈函数变化呢?