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

outputting averaged quantities to a text file in parallel execution

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2013, 17:08
Default outputting averaged quantities to a text file in parallel execution
  #1
Member
 
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 15
zhengzh5 is on a distinguished road
Hi,

I am currently working with OpenFOAM-2.0.x, and trying to do some engine simulations. I want to calculate average quantities such as meanPressure, meanTemperature at every time step and output them to, say, summaryLog file.

In serial execution, I have

totalV = sum(mesh.V().field());
sumMass = fvc::domainIntegrate(rho).value();
pPistonMean = fvc::domainIntegrate(p).value()/totalV;
aveT = fvc::domainIntegrate(rho*Tu).value()/sumMass;
summaryLog << pPistonMean << " "<<aveT <<endl;

and things seem to work fine. But when I try to run the code in parallel with 4 processors, the output doesn't make sense to me anymore.

For instance, all 4 summaryLog files (1 per processor) will show the same sumMass when the mass contained in each decomposed domain should be different since the domain size varies a lot between processors. (I use scotch for domain decomposition) My questions are:

1. if each processor stores their own copy of mesh and internal fields such as, pressure, temperature, density.
2. when writing data to a text file, does each processor output the individual data it's holding, or does a certain processor does the task for all 4 processors.

Any help is appreciated. thanks a lot!

J.
zhengzh5 is offline   Reply With Quote

Reply


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
wmake compiling new solver mksca OpenFOAM Programming & Development 14 June 22, 2018 06:29
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 15:16


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