CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Lagrangian Data extract from sprayFoam e.g. with swak4Foam

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

Like Tree1Likes
  • 1 Post By mokard

LinkBack Thread Tools Search this Thread Display Modes
Old   January 2, 2018, 17:19
Default Lagrangian Data extract from sprayFoam e.g. with swak4Foam
New Member
Join Date: Jan 2018
Posts: 2
Rep Power: 0
mokard is on a distinguished road
Hey Guys,
i actually have a problem extracting the lagrangian data out of an simulation with the sprayFoam solver.
For other i already use swak4Foam 0.4.4 and pyFoam 6.8.1 at Openfoam 5.x ........
Sampling lagrangian data
for sprayCloud
i wanted to do get the size distribution of the particles on a slice (e.g. i would say cuttingplane is the method here).
Also the velocity and so on is also from interest.
I checked out the swak4foam examples for lagrangian data extraction, but badly there is a problem with the type of sprayCloud which is used by the sprayFoam solver.
the controlDict with the functionobject looks like this with the libs.
libs (

cloudPosition {
        type swakExpression;
        outputControlMode timeStep;
        expression "pos()";
        accumulations (
        verbose true;

        valueType cloud;
        cloudName sprayCloud;
    cloudWeights {
        expression "weight()";
        //   alternateCloudType Cloud<basicKinematicParcel;
         cloudVelocityDifference {
        expression "U-fluidPhase(U)";
        interpolationSchemes {
            U cellPoint;
and the error message from the terminal comes here

swak4Foam: Setting default mesh
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 675
    Caught FatalError 
Unknown  cloud type Cloud<basicSprayParcel> (cloud: Cloud<basicSprayParcel>) 
Consider setting the parameter 'alternateCloudType' in "/home/op50-ub14045-amd64/OpenFOAM/op50-ub14045-amd64-5.0/run/posttest_calculations_func_2_7/system/controlDict.functions.cloudPosition" to a valid type

Valid cloudType are :

The main problem is the cloud type which the sprayFoam solver uses.
This is the "basicSprayParcel" but this one can't be used with swak4Foam.
Does anyone know a possibility to extract the data from the cloud .... a solution without paraview seems to be better.
Another way of doing that is also welcome.

Thanks for an answer.
foamiste likes this.
mokard is offline   Reply With Quote

Old   January 11, 2018, 12:07
Senior Member
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
Hello, I am trying to do the same actually (extracting data concerning the lagrangian sprayCloud) but I dom't know how can I do it.

I tried to install swak4Foam for it doesn't compile correctly, how did you install it? knowing that I am using the development version of OpenFoam OF-dev.

I added your code to my controlDict, the simulation runs correctly without giving any errors and neither any results concerning what i am demanding, It acts like not accessing to the code added in controlDict.

Please if you find something concerning the data extraction make me know.

Best regards

Last edited by foamiste; January 11, 2018 at 12:43. Reason: Update
foamiste is offline   Reply With Quote

Old   January 16, 2018, 03:44
New Member
Join Date: Jan 2018
Posts: 2
Rep Power: 0
mokard is on a distinguished road
Hey foamiste,

the functionobject code you see there is from
Bernhard Gschaiders examples in the example dir in swak4foam source.
Another user had a similar problem .... you can see the post here
Sampling lagrangian data
Badly all those automatic postprocessing was not successfull, but you can extract the particle data manually from paraview.
To extract the particel data you have to do this
Sampling lagrangian data

because i did not want to do something on the sourcecode i exported the lagrangian data manually from paraview.
After that i processed all the data by some scilab scripts i wrote in the recent days.
For example the diameter distribution in a plane and the average velocity of these particles and so on .....
As i could see you wanted to have all particles in an annulus -> a scilab script did this job for me.
Scilab is a free alternative to Matlab.
so i did a workaround in this case.
mokard is offline   Reply With Quote


lagrangian, particles, swak4foam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 07:31
time averaging lagrangian data from dsmcFoam hester OpenFOAM Post-Processing 2 June 7, 2017 07:20
extract data from graphs in paraView (paraFoam) vitorspadetoventurin OpenFOAM Post-Processing 1 November 24, 2014 02:39
How to extract data from a specific layer of the grids? ripperjack OpenFOAM Post-Processing 1 October 29, 2014 08:57
Extract Values from ensight formatted data Fabian EnSight 8 September 13, 2005 13:14

All times are GMT -4. The time now is 01:44.