Siassei |
May 15, 2021 07:32 |
How to add additional header / libs to an codedSource
Hello,
I will use an scalarCodedSource in an fvOptions with access to turbulence model functions as the example.
Code:
options
{
sourceTerm1
{
type scalarCodedSource;
selectionMode cellSet;
cellSet myCellSetForSourceTerm1;
fields (h);
name source1;
codeInclude
#{
#include "fvCFD.H"
#include "fvc.H"
//#include "fluidThermo.H"
//#include "compressibleTurbulenceModel.H"
//#include "turbulentTransportModel.H"
#};
codeCorrect
#{
#};
codeAddSup
#{
// get fields
const scalarField& volume = mesh_.V();
const volScalarField& cellT = mesh_.lookupObject<volScalarField> ("T");
const volVectorField& cellU = mesh_.lookupObject<volVectorField> ("U");
//const dictionary& transportProperties = db().lookupObject<IOdictionary> ("transportProperties");
const dictionary& transportProperties = mesh_.lookupObject<IOdictionary> ("transportProperties");
const compressible::turbulenceModel& turbModel = mesh_.lookupObject<compressible::turbulenceModel> (turbulenceModel::propertiesName);
const fluidThermo& thermo = mesh_.lookupObject<fluidThermo> (basicThermo::dictName);
#};
codeConstrain
#{
#};
}
}
The compilation (by calling the solver) leads into the errors
Quote:
error: ‘compressible’ does not name a type
error: ‘fluidThermo’ does not name a type
error: ‘thermo’ was not declared in this scope
...
|
How I can add the information for the additional include path, headers and libs?
|