CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Example of pdfPlot (

anishtain4 February 23, 2013 13:22

Example of pdfPlot
Dear Foamers,

I think there has been a rare part of you who has been used this utility, but those how did: please let me know how should I do it?

I have found a sample pdfDict in github and copied it to my constant folder, yet still openFoam complains:


keyword type is undefined in dictionary "address"
file: /media/FreeAgentGoFlexDrive/Mahdi/pimple_32x32_albada/constant/pdfDict from line 18 to line 27.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 400.

banana trick does not work here, can anyone give me a guide please?

wyldckat February 23, 2013 18:11

Greetings Mahdi,

:o Interesting... lets see if I can figure it out...
  1. You can find an example in OpenFOAM's source code at:

  2. I've used the tutorial "incompressible/pimpleFoam/TJunction" as reference.
  3. Ran the tutorial:


  4. Placed the "pdfDict" from the location above into the folder "constant".
  5. Ran pdfPlot.
  6. A few errors were detected and the fixed file seems to be:

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                |                                                |
    | \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
    |  \\    /  O peration    | Version:  2.1.x                                |
    |  \\  /    A nd          | Web:                      |
    |    \\/    M anipulation  |                                                |
        version    2.0;
        format      ascii;
        class      dictionary;
        object      pdfDict;
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    // Number of intervals/bins in pdf plot
    nIntervals      20;

    // Number of samples
    nSamples        10000;

    // Type of pdf
    type        RosinRammler;

    // Write data flag
    writeData      true;

    // PDF model coefficients
        minValue        1e-06;
        maxValue        200e-06;
        d              60.0e-06;
        n              0.8;

    // ************************************************************************* //

  7. The results were placed in the folder "pdf":

  8. From what I can understand, the XY values is the actual PDF and the data file is the sample used...

I'll report the bug on the "pdfDict" file in a few moments...
edit: reported as

Best regards,

anishtain4 February 24, 2013 02:49

Unfortunately that did not do the trick for me.
I found out that there is an extra - there and you can find all the types in distributionModel.H, but still I'm getting the same error. Even for the pimple case you just mentioned which depicts something should be wrong with my openFoam not the case setup or pdfDict.
I tried rebuilding it but no point either

wyldckat February 24, 2013 16:13

Hi Mahdi,

I had forgotten to test the previous steps with OpenFOAM 2.1.1. Nonetheless, I've tested them now and it all worked as intended.

Perhaps you modified something directly in OpenFOAM's source code? If you have, then I suggest that you also install OpenFOAM 2.1.x (as a personal installation, not as a global installation ;)) and learn how to use git, which will aid you in keeping track of changes you make to the source code!
Or you can use a personal installation of OpenFOAM 2.1.1 and use git on it... that would work as well.

As for having more than one installation of OpenFOAM on your machine, check this blog post of mine:

Best regards,

All times are GMT -4. The time now is 10:01.