CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How to add additional header / libs to an codedSource

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   May 15, 2021, 07:32
Default How to add additional header / libs to an codedSource
  #1
Member
 
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 14
Siassei is on a distinguished road
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?
Siassei is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Condensation as an additional variable Clark Griswold CFX 2 April 21, 2012 07:20
[snappyHexMesh] Add additional boundary layers to complex stl surface tobijingles OpenFOAM Meshing & Mesh Conversion 1 October 26, 2011 10:45
Add additional scalar to turbulence model john_w OpenFOAM 1 December 23, 2010 12:45
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55
how to add header file shanu FLUENT 1 February 14, 2006 09:00


All times are GMT -4. The time now is 23:55.