Constructs on-the-fly fvOption source. More...
Constructs on-the-fly fvOption source.
The hook functions take the following arguments:
codeCorrect
(
GeometricField<Type, fvPatchField, volMesh>& field
)
codeAddSup
(
fvMatrix<Type}>& eqn,
const label fieldi
)
codeConstrain
(
fvMatrix<Type}>& eqn,
const label fieldi
)
where : field is the name of the field in the fields list eqn is the fvMatrix
energySource
{
type scalarCodedSource;
scalarCodedSourceCoeffs
{
selectionMode all;
fields (h);
name sourceTime;
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;
#};
codeContrain
#{
Pout<< "**codeConstrain**" << endl;
#};
}
}