CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Have only process 0 write data

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2015, 10:15
Default Have only process 0 write data
  #1
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Hi Foamers,

In my calculation using pisoFoam solver, I need to write a variable at each time step. This is done through adding the following line to pisoFoam solver:

Code:
word patchName = "inlet";
label patchID = mesh.boundary().findPatchID(patchName);    
   
  IOField<vector> U2
(
    IOobject
    (
        "U",
        mesh.time().constant(),
        "boundaryData/inlet"/runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::NO_WRITE
    ),
    U.boundaryField()[ patchID ]
);

U2.write();
This block makes the solver to write the velocity boundary data for inlet bc.
The number of time steps is very huge! So many many files are generated.

The problem is that when I decompose my case to run in parallel mode, every process generates its own files while I only want process 0 to write data into file. Now this is my question:

How can I have only process 0 to write data into files and exclude the other processes?!

Thanks
Syavash
syavash is offline   Reply With Quote

Old   November 3, 2015, 07:05
Default
  #2
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
No body wants to help??!
syavash 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
how to write case and data with DEFINE_EXECUTE_AT_END macfly Fluent UDF and Scheme Programming 9 November 15, 2018 01:46
How to setup a simple OpenFOAM cluster? TommiPLaiho OpenFOAM Installation 3 October 27, 2013 16:15
How to post process transient data harshasrini STAR-CCM+ 2 July 30, 2013 14:57
post process to get an arbitrary face data oniboy Siemens 2 February 28, 2008 23:12
write transient data of plane Fabian CFX 2 June 27, 2005 03:38


All times are GMT -4. The time now is 10:17.