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

Best practice for smooth restart in parallel run of OpenFOAM

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 1, 2020, 16:53
Default Best practice for smooth restart in parallel run of OpenFOAM
  #1
New Member
 
Maziar
Join Date: Jul 2019
Posts: 14
Rep Power: 3
yek_irani is on a distinguished road
Hello,

I am performing a simulation with the pimpleFoam solver using OpenFOAM v1912. The calculation is running on several processors. I am wondering what is the best practice for a smooth restart. In system/controlDict I am writing out data in binary format, and the variable startFrom is set to “latestTime”.

My main question is whether it makes a difference if I:

1) reconstruct the data from all "processor" subfolders using reconstructPar, delete the aforementioned data subfolders and then rerun the decomposePar, renumberMesh followed by pimpleFoam. This approach is recommended in this post

OR,

2) leave the data decomposed in the separate processor subfolders and imply invoke pimpleFoam.

Option #2 seems like less work to me.

Thank you for your thoughts.
yek_irani is offline   Reply With Quote

Old   May 1, 2020, 18:57
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 758
Rep Power: 8
HPE is on a distinguished road
Could you explain further what `smooth` restart is?

Otherwise, the second option will be enough to restart whatever computation you have.
HPE is offline   Reply With Quote

Old   May 1, 2020, 20:10
Default
  #3
New Member
 
Maziar
Join Date: Jul 2019
Posts: 14
Rep Power: 3
yek_irani is on a distinguished road
Thank you HPE for your (hopefully "herpes free") response.
"Smooth" to me means minimizing the extent of initial transient blips in the solution achieved thus far.
yek_irani is offline   Reply With Quote

Old   May 2, 2020, 04:59
Default
  #4
Member
 
Thomas Sprich
Join Date: Mar 2015
Posts: 71
Rep Power: 7
Swift is on a distinguished road
Hi,


I agree with HPE and would resume from the previously decomposed state just because it is less work. I haven't verified this, but I don't think that it should make any difference if you resume from a decomposed state or decompose a time step and then resume.


The decomposed result and the reconstructed result both contain the same information, it should not make any difference to how the solution proceeds.



Are you seeing strange results when you resume a solution? Can you plot the residuals?



Regards,
Thomas
Swift is offline   Reply With Quote

Old   May 2, 2020, 13:28
Default
  #5
New Member
 
Maziar
Join Date: Jul 2019
Posts: 14
Rep Power: 3
yek_irani is on a distinguished road
Hello,

Thank you for your response. I haven't compared the two options. My primary intention was to get feedback on what experienced users felt was 'best practice'.

Cheers.
yek_irani is offline   Reply With Quote

Old   May 2, 2020, 17:20
Default
  #6
Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 62
Rep Power: 3
Ship Designer is on a distinguished road
Hi all,

this is not strictly an answer to the original question, but might sitlll be useful.

I've experienced fatal errors after restarting interrupted decomposed cases solved by interFoam. I don't remember the exact error message right now. To correct the problem, I deleted all field files other than those located in "0" from each processor folder, e.g. alphaPhi0.water, phi. After that, interFoam restarted the solution at the latest time without complaints. After restarting the solution, the residuals are not the same as prior to the interuption, but seem to recover after a few time steps.
Ship Designer is offline   Reply With Quote

Old   May 2, 2020, 19:11
Default
  #7
New Member
 
Maziar
Join Date: Jul 2019
Posts: 14
Rep Power: 3
yek_irani is on a distinguished road
Hi Claudio,

How was the job interrupted? I try to use the stopAtWriteNowSignal variable to ensure the time step completes before stopping, as per the description here:
https://openfoam.org/release/2-1-0/r...-write-timing/

Being a bit of a beginner to OpenFOAM, I am somewhat puzzled by the approach or workaround you employed. If you "deleted all field files other than those located in "0" from each processor folder", what solution are you left with to restart from? Did you reconstruct the data before deleting?
yek_irani is offline   Reply With Quote

Old   May 3, 2020, 13:21
Default
  #8
Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 62
Rep Power: 3
Ship Designer is on a distinguished road
Hello Maziar,


I believe in those instances I aborted the calculations manually for some reason. I admit that's probably not the best way to do it. Maybe I should make sure that interFoam ends naturally, like setting endTime to the next ordinary write and let it write all the files properly, like you suggest. Thanks.



By deleting those field files I did, interFoam will restart and continue the solution based on the same files which are initially contained in the 0 directory, i.e. U, p_rgh, alpha.water and any turbulence model fields, but with the values of the solution so far. I'm sure it's not the best way to do it, but given the fatal error I got, it was the only way I found to continue solution without having to waste hours and start over again. It's just a solution to a unique problem you're unlikely to encounter. I apologize if this was off-topic and caused confusion. Nevermind.



Cheers
Ship Designer is offline   Reply With Quote

Reply

Tags
best practice, openfoam 1912, restart

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
Error running openfoam in parallel fede32 OpenFOAM Programming & Development 5 October 4, 2018 17:38
[OpenFOAM] Questions about Paraview to show Parallel run of OpenFOAM padian ParaView 20 September 24, 2018 13:52
Problem in parallel run with OpenFOAM Gitesh P OpenFOAM Running, Solving & CFD 2 June 1, 2014 07:05
parallel Grief: BoundaryFields ok in single CPU but NOT in Parallel JR22 OpenFOAM Running, Solving & CFD 2 April 19, 2013 17:49
Parallel run of OpenFOAM in linux and windows side by side m2montazari OpenFOAM Running, Solving & CFD 5 June 24, 2011 04:26


All times are GMT -4. The time now is 14:46.