|
[Sponsors] |
October 19, 2015, 12:13 |
Deeper access to sprayCloud data?
|
#1 |
Member
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13 |
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. |
|
October 21, 2015, 10:32 |
|
#2 |
Member
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13 |
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); |
|
|
|
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 |