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

Changing writeInterval on the fly doesn work in parallel runs

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2014, 17:48
Default Changing writeInterval on the fly doesn work in parallel runs
  #1
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12
ssss is on a distinguished road
Hi,

I'm using OF210 and I implemented an automatic change the writeInterval depending on the time of the simulation. Here is the implementation in the solver :

Code:
int main(){
...
IOdictionary controlDict(IOobject("controlDict", runTime.system(),mesh,IOobject::MUST_READ,IOobject ::AUTO_WRITE));
...
while (runTime.loop()){
...
    if(runTime.value()>=0.05){
        Info<<"I enter"<<endl;
        controlDict.set("writeInterval",0.05);
        controlDict.Foam::regIOobject::write();
    }
...
}
}
It works as I expect during serial runs, the controlDict changes and the changes are notified right to the solver.

But once I make a parallel run, the controlDict which is in every /case/processor*/system/ changes, but the one in the case/system/ doesn't change, and I don't know why, but he uses the writeInterval which is in the main case folder.

Here is my controlDict:

Code:
startFrom       startTime;
startTime       0;
stopAt          endTime;
endTime         700;
deltaT          0.0005;
writeControl    adjustableRunTime;
writeInterval   0.01;
purgeWrite      0;
writeFormat     ascii;
writePrecision  6;
writeCompression off;
timeFormat      general;
timePrecision   6;

runTimeModifiable true;

maxCo           0.7;

adjustTimeStep yes; // Or no

maxDeltaT 1;
Anyone has an idea on how to fix this?

Thank you very much.
ssss is offline   Reply With Quote

Old   March 16, 2016, 06:06
Default
  #2
Member
 
Brugiere Olivier
Join Date: Mar 2009
Posts: 34
Rep Power: 17
brugiere_olivier is on a distinguished road
Hello everyone,

I have the same problem with version OF240. Does someone has an idea to fixe the problem?

thank you in advance
brugiere_olivier is offline   Reply With Quote

Old   September 25, 2017, 15:22
Default
  #3
New Member
 
Join Date: Mar 2016
Posts: 17
Rep Power: 10
dupeng is on a distinguished road
Hi, Have you solve this problem? I have this problem too recently and don't have a solution. Thanks.
dupeng is offline   Reply With Quote

Old   September 26, 2017, 01:43
Default
  #4
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
It may be that that doesn't work. In parallel, the calculating task has to be splitted into tasks for each processor. Changing the control dict would lead to a compilation of the result so far an a new splitting. I don't think that this is implemented.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   September 26, 2017, 04:01
Default
  #5
New Member
 
Join Date: Mar 2016
Posts: 17
Rep Power: 10
dupeng is on a distinguished road
Thanks. I found another soluting using the timeactivatedfileupdate function object to copy and replace the controlDict reaching a specified time. It works great for serial simulations. But for parallel simulations, it only regIOobject for the first time. The controlDict is replaced after that but the changes are not updated. Very strange. I am using OpenFoam 3.0.
dupeng is offline   Reply With Quote

Reply

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
RBF motion solver does not work well in parallel lakeat OpenFOAM Bugs 3 August 8, 2013 06:50
Could SU2_V2.0.2 work properly with continuous_adjoint.py script in parallel mode? Tommy Chen SU2 Shape Design 1 April 18, 2013 14:06
LTSReactingParcelFoam doesn't work in parallel Chrisi1984 OpenFOAM Running, Solving & CFD 4 August 6, 2012 04:08
OpenFOAM 2.0.0. and 2.0.1 doesn't work in parallel mode rv82 OpenFOAM Running, Solving & CFD 3 October 3, 2011 11:47
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 16:45


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