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 ) codeAddSupRho ( const volScalarField& rho, 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
These are in addition to the usual code entries:
codeInclude | : | include files |
codeOptions | : | compiler line: added to EXE_INC (Make/options) |
codeLibs | : | linker line: added to LIB_LIBS (Make/options) |
localCode | : | c++; local static functions |
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; #}; codeConstrain #{ Pout<< "**codeConstrain**" << endl; #}; } }