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

Example of pdfPlot

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2013, 12:22
Default Example of pdfPlot
  #1
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
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?
anishtain4 is offline   Reply With Quote

Old   February 23, 2013, 17:11
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Mahdi,

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
__________________

Last edited by wyldckat; February 23, 2013 at 17:18. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   February 24, 2013, 01:49
Default
  #3
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18
anishtain4 is on a distinguished road
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
anishtain4 is offline   Reply With Quote

Old   February 24, 2013, 15:13
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   July 5, 2018, 07:06
Default But the pdf of which variable ?
  #5
New Member
 
gned
Join Date: Oct 2012
Posts: 18
Rep Power: 13
gned is on a distinguished road
Ok wyldcat, but of which field variable this pdfPlot does the pdf in postpro? and how to specify a different variable in OF5?
gned is offline   Reply With Quote

Reply


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
pdfPlot , probability density funktion , pdf , pdfDictionary heavy_user OpenFOAM Post-Processing 2 October 15, 2010 08:06


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