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

Accessing lagrangian data of multiple processors

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

LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2022, 15:37
Default Accessing lagrangian data of multiple processors
New Member
Luis Felipe López
Join Date: Apr 2020
Posts: 7
Rep Power: 4
lf.lopez18 is on a distinguished road

I have a custom solver where I export the information of the Lagrangian parcels into a file. For this, I have the following code:
forAllIter(basicSprayCloud, parcels, pIter)
    sprayVarsFile << pIter().origId() << "\t";
    for (label j=0; j<3; j++)
        sprayVarsFile << pIter().position().component(j) << "\t";
    for (label j=0; j<3; j++)
        sprayVarsFile << pIter().U().component(j) << "\t";
    sprayVarsFile << pIter().d() << "\t" << pIter().T() << "\t" << pIter().rho() << "\t"
        << pIter().nParticle() << "\t" << pIter().Cp() << "\t" << pIter().mu() << "\t" 
        << pIter().sigma() << "\t" << pIter().age() << "\t" << pIter().Xi() << "\t" 
        << mag(pIter().gradXi()) << "\t" << pIter().elecCh() << "\t" 
        << "\n";
where sprayVarsFile is the output file. That code works well for cases with a single processor.

However, for parallelized cases (multiple processors), the program only exports the data of one of the processors, resulting in missing parcels in the output file.

How can I fix this? Is there an alternative that considers the parcels of all the processors?

Best regards,
Luis Lopez.
lf.lopez18 is offline   Reply With Quote


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
[OpenFOAM] How to get the coordinates of velocity data at all cells and at all times vidyadhar ParaView 9 May 20, 2020 21:06
studying a valve case mina.basta OpenFOAM 33 August 30, 2013 05:46
dsmcFoam : writing options : How to keep only field data ? Not Lagrangian elfuertes OpenFOAM Running, Solving & CFD 2 August 19, 2013 06:05
saving Transient/Unsteady data of multiple surface integrals in single file ankur gupta FLUENT 0 February 22, 2012 14:59
Accessing solution data in UDF Ale FLUENT 1 June 12, 2002 01:25

All times are GMT -4. The time now is 20:28.