CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   keyword sourceName is undefined (https://www.cfd-online.com/Forums/openfoam-post-processing/168182-keyword-sourcename-undefined.html)

manoj_nav March 17, 2016 02:53

keyword sourceName is undefined
 
Hi All,

I tried using functionObject to calculate flow-rate through a sufrace. But I am getting following error ,

keyword sourceName is undefined in dictionary "/home/manoj/trial/vent/system/controlDict.functions.new_plane"

Code:

functions
{


    new_plane
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");
        enabled        true;
        outputControl  outputTime;
        log            true;
        valueOutput    true;
        source          sampledSurface;

        sampledSurfaceDict
        {
        type        sampledTriSurfaceMesh;
        surface    opening.stl;
        source      cells;  // What to sample: cells (nearest cell)
                                    // insideCells (only triangles inside cell)
                                    // boundaryFaces (nearest boundary face)
        interpolate true;
        }

        operation      areaAverage;

        fields
        (
            U
        );
    }
}

I get the same error, when I use packaged function objects

Code:

functions
{
  #include "volFlowRateSurface"

}

Please help.

Regards,

Manoj

canopus July 20, 2016 08:34

keyword sourceName is undefined in dictionary
 
Similar error as above for v3.0. Was working fine in 2.4.x
Any help?

Mat_fr July 27, 2016 13:03

Hi,
I had the same error when passing from version 2.3 to 2.4.
You just have to add the line
sourceName MySourceName
in your functions in system/controlDict.
There are some examples in the tutorials.
Best,
Mat


All times are GMT -4. The time now is 21:15.