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

writeInterval wrong

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2018, 04:43
Default writeInterval wrong
  #1
Senior Member
 
Daniel Witte
Join Date: Nov 2011
Posts: 148
Rep Power: 14
danny123 is on a distinguished road
Hello,

I have a problem with my OF 2.3.x application in interFoam. I have altered that solver such that in case of a wrong calculation (e.g. divergence), the calculation is cancelled and I return back in back in time to restart using some other settings (e.g. smaller time step). This works ok so far. First, I store my time position:

Code:
        time_start = runTime.timeOutputValue();
        time_start_i = runTime.timeIndex();
The fields (U, p, alpha1 etc.) have to be stored too. If the calculation goes bust, I can retrieve the time and return back where I have been when things were still ok:

Code:
                // return back to previous time step

                runTime.setTime
                ( 
                    time_start,
                    time_start_i
                );

                // decrease time step a little

                runTime.setDeltaT (8e-1*runTime.deltaTValue(),false);
                deltaTadj = runTime.deltaTValue();
The code works so far, but, for reasons I do not understand the value writeInterval in controlDict gets altered (around tripples, but maybe a coincidence). Can somebody help me to correct this?

Regards,

Daniel
danny123 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
simpleFoam - wrong results? Zibi OpenFOAM Running, Solving & CFD 26 October 9, 2020 12:21
writeControl writing every time step despire writeInterval specifying otherwise kaszt OpenFOAM Running, Solving & CFD 5 May 28, 2020 17:47
IcoFoam with variable time step not writing every writeInterval wildfire230 OpenFOAM Running, Solving & CFD 1 July 31, 2013 17:49
Wrong oriented faces due to opposite face bends? Arnoldinho OpenFOAM 5 August 16, 2012 05:00
help: results depend on writeInterval ckoch OpenFOAM 2 September 1, 2010 18:42


All times are GMT -4. The time now is 05:43.