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

Deeper access to sprayCloud data?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 19, 2015, 12:13
Default Deeper access to sprayCloud data?
  #1
Member
 
hekseli
Join Date: Mar 2013
Posts: 47
Rep Power: 5
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: 47
Rep Power: 5
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

Thread Tools
Display Modes

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 On
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 0 September 9, 2014 09:07
How to setup a simple OpenFOAM cluster? TommiPLaiho OpenFOAM Installation 3 October 27, 2013 16: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 23:17
access cell data SePe OpenFOAM Post-Processing 4 December 7, 2011 11:47


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