|
[Sponsors] |
September 23, 2013, 01:13 |
How to implement regionSizeDistribution
|
#1 |
New Member
Join Date: Sep 2013
Posts: 5
Rep Power: 12 |
Hi,
I have completed an analysis using twoPhaseEulerFoam solver and have some results files. My case is similar to the tutorial bubblecolumn case where bubble flows up to the outlet at the top of the domain. I want to get a plot of the droplet size distribution at the outlet. I have found that there is a function called 'regionSizeDistribution' and there is an example showing the inputs and outputs of the function, however where and how do I implement this function? ie. do I copy, for example, this function: regionSizeDistribution1 { type regionSizeDistribution; functionObjectLibs ("libfieldFunctionObjects.so"); ... field alpha; patches (outlet); threshold 0.4; fields (p U); nBins 100; maxDiameter 0.5e-4; minDiameter 0; setFormat gnuplot; } into the controldict file and then re-run the solver again at the time I want? Thank you in advance, Tong |
|
October 12, 2013, 01:22 |
|
#2 |
New Member
Join Date: Sep 2013
Posts: 5
Rep Power: 12 |
please, any help will be great.
|
|
October 14, 2013, 04:39 |
regionSizeDistribution plot
|
#3 |
New Member
Join Date: Sep 2013
Posts: 5
Rep Power: 12 |
Hi,
I had successfully ran the regionSizeDistribtion function in controlDict for my case which is suppose to plot a histogram of droplet sizes vs frequency they occur on a specified patch. After running the case, two new files appear in the latest time file: alpha1_background and alpha1_liquidCore. However, there was no histogram to be found anywhere. I was just wondering how does the output for regionSizeDistribution work? Where does the histogram saved to? Regards, Tong |
|
November 9, 2013, 14:09 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Greetings Tong,
I got your private message and I'll answer here on the forum, since more people can take advantage of this. I've tested this on the tutorial "multiphase/twoPhaseEulerFoam/bubbleColumn" and used the following "system/controDict": Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application twoPhaseEulerFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 20; deltaT 0.002; writeControl runTime; writeInterval 0.5; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep no; maxCo 0.5; maxDeltaT 1; functions { fieldAverage1 { type fieldAverage; functionObjectLibs ( "libfieldFunctionObjects.so" ); outputControl outputTime; fields ( U1 { mean on; prime2Mean off; base time; } U2 { mean on; prime2Mean off; base time; } alpha1 { mean on; prime2Mean off; base time; } p { mean on; prime2Mean off; base time; } ); } regionSizeDistribution1 { type regionSizeDistribution; functionObjectLibs ("libfieldFunctionObjects.so"); outputControl outputTime; field alpha1; patches (inlet); threshold 0.5; fields (p U); nBins 100; maxDiameter 0.5; setFormat gnuplot; } } // ************************************************************************* // Code:
regionSizeDistribution1 { type regionSizeDistribution; functionObjectLibs ("libfieldFunctionObjects.so"); outputControl outputTime; field alpha1; patches (inlet); threshold 0.5; fields (p U); nBins 100; maxDiameter 0.5; setFormat gnuplot; } Inside each one of those time folders you'll find Gnuplot scripts, which can be executed by giving them to the gnuplot command, e.g.: Code:
gnuplot postProcessing/regionSizeDistribution1/0.5/diameter_count.gplt Best regards, Bruno
__________________
|
|
May 13, 2014, 07:24 |
|
#5 |
New Member
Join Date: Sep 2013
Posts: 5
Rep Power: 12 |
Hi,
Are max and min diameter set to meters or millimeters by default? Thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implement constant heat flux boundary condition | new_at_this | Main CFD Forum | 2 | April 6, 2012 23:35 |
Problems to implement a coordinate change | mateusps | OpenFOAM | 3 | September 22, 2011 13:20 |
How to implement vorticity calculations | mortain | Main CFD Forum | 0 | July 1, 2010 13:26 |
How to implement implicit TVD limiter? | Kmlin | Main CFD Forum | 3 | March 28, 2010 08:52 |
implement tangential boundary condition in simple | jhuang | Main CFD Forum | 4 | July 10, 2006 04:01 |