|
[Sponsors] |
View paraFoam fields while running? (or else restarting?) |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Patti Michelle Sheaffer
Join Date: Sep 2018
Posts: 55
Rep Power: 7 ![]() |
Hello Everyone: I'm learning OF on a small infiniband cluster, and my reactingFoam runs are quite long - I was wondering if there's a way to use paraFoam to view intermediate fields during the run (to look for spatial convergence) or else an easy way to stop the run then restart the run if spatial convergence is not complete.
I'm using an ./Allrun script: Code:
#!/bin/sh cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ # Application name application=$(getApplication) echo $application rm -f 0/T cp 0/T.orig 0/T runApplication chemkinToFoam \ chemkin/grimech30.dat chemkin/thermo30.dat chemkin/transportProperties \ constant/reactionsGRI constant/thermo.compressibleGasGRI runApplication blockMesh runApplication setFields runApplication decomposePar -force runParallel $application runApplication reconstructPar Patricia |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12 ![]() |
Hi,
- You may want to probe some field values in the field of interest as a function of time/iteration or monitoring residuals instead of visually assesing the convergence by looking at flow quantities, which would be a bit tedious, and misleading. - Having said that, you can use sample and/or runTimePostProcessing utilities to output various cross-sections as VTK format, and visualise them while the case running. - You can also execute paraFoam/ParaView on a running case as far as the time directories that you visualise are not deleted (e.g. by purgeWrite). Hope these would give some indicators.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
Member
Patti Michelle Sheaffer
Join Date: Sep 2018
Posts: 55
Rep Power: 7 ![]() |
Thank you very much, HPE - This gives me some ideas to look at. It seemed to me this would be an easy thing to find with an interwebs search, but it turned out not.
I think it best (most comprehensive?) to be able to restart any run in the event that it didn't run long enough, but I haven't yet found how to do that for an arbitrary run. I probably don't know what term to use (in OF jargon) for a restart run, so searches aren't working yet. Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12 ![]() |
- Note also that you can view the decomposed fields in ParaView without reconstructing them by using OpenFOAM's reconstructPar or redistributePar, if that was the pain.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
![]() |
![]() |
![]() |
![]() |
#5 | |
Member
Patti Michelle Sheaffer
Join Date: Sep 2018
Posts: 55
Rep Power: 7 ![]() |
Quote:
Wow! Great! That worked really well. My runs take hours - but I just opened another terminal and ran reconstructPar, and then could use paraFoam to view the progress of the solution. I didn't realize that would work w/o interfering with runParallel. Excellent!! Thank you. ![]() |
||
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12 ![]() |
- Yes you can do that as well. But what I meant: you dont even need to execute reconstructPar. A parallel and running case can be visualised directly: Just before hit the 'Apply' button, one of the settings can be selected from the left panel. When I open my computer, I will try to upload a screenshot (writing via my phone now).
Good luck.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 711
Rep Power: 14 ![]() |
pattim - HPE means that on later versions of paraView there is an option to read directly from the decomposed data files instead of the reconstructed files. When you open up the case in paraview, and before you hit Apply to accept, check in the Properties pane on the left, above the Mesh Regions part and just below the Skip Zero Time check box. There may be some drop down menu options there, including "Case Type" at the top - if so, then change from the default "Reconstructed case" to "Decomposed Case".
Note, I don't have this feature on my old linux paraview 5.4 build, but it is there on my Win10 paraview 5.8.1 build, so it is likely to be a recent addition. i.e. you may need to update your paraview installation to use this feature. |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12 ![]() |
Thank you very much Tobermory - and my apologies for writing in somewhat unclear manner - I usually write smt via my phone - that's why it happens.
Thank you!
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 711
Rep Power: 14 ![]() |
No problem HPE - your post was clear and helpful, it's just that I only tripped across this option by mistake, recently, when I installed paraView on my Win10 PC ... I hadn't realised that I need to update my linux installation to catch up! It's possible that the OP may be in the same boat.
|
|
![]() |
![]() |
![]() |
![]() |
#10 |
Member
Patti Michelle Sheaffer
Join Date: Sep 2018
Posts: 55
Rep Power: 7 ![]() |
Thank you everyone - this is working very well for me. As an additional question - my computer crashed after working 12 hours on a solution (see first post for how I ran it). Is there a way to restart reactingFoam after a system crash or else when one must implement after safely halting with Alt-PrintScr-R-E-I-S-U-B?
Thank You!! |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 711
Rep Power: 14 ![]() |
Yes - sure you can, providing that you wrote out some intermediate solutions. In your controlDict file, change the startFrom line to:
Code:
startFrom latestTime; Code:
#!/bin/sh cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ # Application name application=$(getApplication) echo $application # You should not need the following lines #rm -f 0/T #cp 0/T.orig 0/T #runApplication chemkinToFoam \ chemkin/grimech30.dat chemkin/thermo30.dat #chemkin/transportProperties \ constant/reactionsGRI constant/thermo.compressibleGasGRI #runApplication blockMesh #runApplication setFields #shouldd not need this either since the intermediate save will still be there in decomposed state #runApplication decomposePar -force #the -append flag adds to your previous run log, which is useful; else use a -overwrite flag runParallel -append $application runApplication -append reconstructPar |
|
![]() |
![]() |
![]() |
![]() |
#12 | |
Member
Patti Michelle Sheaffer
Join Date: Sep 2018
Posts: 55
Rep Power: 7 ![]() |
Thank you very much
![]() Thanks!! Patricia Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#13 | |
Member
Patti Michelle Sheaffer
Join Date: Sep 2018
Posts: 55
Rep Power: 7 ![]() |
Running reconstructPar followed by paraFoam works well, but I noticed some odd behavior. The U and T files don't always get reset to small text files in the "0" directory, even after issuing ./Allclean - they look like they contain binary information. I'm wondering if this is a 'bug' triggered by either viewing a non-reconstructPar'd solution or else something else I'm doing wrong (like not having all the cells add up to a mass fraction = 1.00)? It appears OF is run by a lot of scriptlets ("tools," etc.) and maybe one of these crashes while leaving the solver running just fine? (just guessing here!!)
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#14 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 711
Rep Power: 14 ![]() |
Excellent - I am glad that worked for you. For the 0/ folder contents, remember I did comment out the lines
Code:
#rm -f 0/T #cp 0/T.orig 0/T Agreed about the script files - getting your head around how to use those effectively can make your life a whole lot easier. |
|
![]() |
![]() |
![]() |
![]() |
#15 | |
Member
Patti Michelle Sheaffer
Join Date: Sep 2018
Posts: 55
Rep Power: 7 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
Tags |
intermediate fields, restarting |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] paraFoam Fatal Error upon run | Gallienus | OpenFOAM Installation | 2 | April 14, 2020 19:23 |
[OpenFOAM] ParaFoam - Aborted (core dumped) | Rasmusiwersen | ParaView | 0 | October 15, 2019 02:40 |
[OpenFOAM.org] Mac OS X 10.11 and OpenFOAM 3.0: Error when running ParaFoam with "command not found" | hua | OpenFOAM Installation | 9 | February 10, 2016 23:45 |
PostChannel | maka | OpenFOAM Post-Processing | 5 | July 22, 2009 09:15 |
[OpenFOAM] paraFoam, problem loading 'volume fields' | bigphil | ParaView | 0 | April 29, 2009 09:36 |