CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Example of pdfPlot (https://www.cfd-online.com/Forums/openfoam/113631-example-pdfplot.html)

anishtain4 February 23, 2013 12: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:

Code:

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 17: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:
    Code:

    $FOAM_APP/utilities/postProcessing/miscellaneous/pdfPlot/pdfDict
  2. I've used the tutorial "incompressible/pimpleFoam/TJunction" as reference.
  3. Ran the tutorial:
    Code:

    blockMesh
    pimpleFoam

  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:
    Code:

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                |                                                |
    | \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
    |  \\    /  O peration    | Version:  2.1.x                                |
    |  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
    |    \\/    M anipulation  |                                                |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        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
    RosinRammlerDistribution
    {
        minValue        1e-06;
        maxValue        200e-06;
        d              60.0e-06;
        n              0.8;
    }

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

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

    RosinRammler.data
    RosinRammler.xy

  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 http://www.openfoam.org/mantisbt/view.php?id=754

Best regards,
Bruno

anishtain4 February 24, 2013 01: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 15: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: http://www.cfd-online.com/Forums/blo...vironment.html

Best regards,
Bruno

gned July 5, 2018 07:06

But the pdf of which variable ?
 
Ok wyldcat, but of which field variable this pdfPlot does the pdf in postpro? and how to specify a different variable in OF5?


All times are GMT -4. The time now is 09:02.