CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Deeper access to sprayCloud data? (https://www.cfd-online.com/Forums/openfoam-post-processing/161162-deeper-access-spraycloud-data.html)

heksel8i October 19, 2015 12:13

Deeper access to sprayCloud data?
 
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 October 21, 2015 10:32

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);



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