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

Deeper access to sprayCloud data?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 19, 2015, 12:13
Default Deeper access to sprayCloud data?
  #1
Member
 
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13
heksel8i is on a distinguished road
Hey!

I would like to create a postprocessing script for lagrangian data and I have been trying to look for examples (like particleTracks or lagrangianMap) but they use the PassiveParticle approach which won't reveal example diameter, age etc. information. So this far I have implemented the following and the question is :

How can I access the parcels of the SparyCloud, which I have?

Code this far:
Code:

 Info<< "Read lagrangian data"<< endl;


        fileNameList cloudDirs
        (
            readDir
            (
                runTime.timePath()/cloud::prefix,
                fileName::DIRECTORY
            )
        );

        forAll(cloudDirs, cloudI)
        {
            // Search for list of lagrangian objects for this time
            IOobjectList objects
            (
                mesh,
                runTime.timeName(),
                cloud::prefix/cloudDirs[cloudI]
            );

            //This is the way to access the IOobject
            IOobject*  diametersOwn = objects.lookup("d");

     
/*
// SHOULD IT BE SOMETHING LIKE THIS???

            Cloud<basicSprayCloud> Parcels
            (
                mesh,
                cloudDirs[cloudI],
                false
            );
            Info << Parcels.d() << endl;
            
*/

Thanks in advance.
heksel8i is offline   Reply With Quote

Old   October 21, 2015, 10:32
Default
  #2
Member
 
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13
heksel8i is on a distinguished road
To reply myself and others having this problem in the future: One can proceed in the following way:



Code:
        Info<< "Read lagrangian data"<< endl;

        fileNameList cloudDirs
        (
            readDir
            (
                runTime.timePath()/cloud::prefix,
                fileName::DIRECTORY
            )
        );


        forAll(cloudDirs, cloudI)
        {
            // Search for list of lagrangian objects for this time
            IOobjectList objects
            (
                mesh,
                runTime.timeName(),
                cloud::prefix/cloudDirs[cloudI]
            );

            //accessing to the particle data, example diameter
            const scalarField& d = readParticleField<scalar>("d", objects);
heksel8i 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
DPM, access particle data - number of tries wsaac Fluent UDF and Scheme Programming 1 July 31, 2018 02:40
How to setup a simple OpenFOAM cluster? TommiPLaiho OpenFOAM Installation 3 October 27, 2013 15:15
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
Near-wall node data access Silmaril CFX 3 March 8, 2012 22:17
access cell data SePe OpenFOAM Post-Processing 4 December 7, 2011 10:47


All times are GMT -4. The time now is 06:03.