|
[Sponsors] |
[PyFoam] Plotting values (e.g. residuals) from all iterations with pyFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 10, 2014, 08:52 |
Plotting values (e.g. residuals) from all iterations with pyFoam
|
#1 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
I'm wondering if it is possible to have pyFoam plot residuals (or other values) during each iteration step. So far, I have only found out how to plot the values once each time step (depending on the accumulation property in customRegexp).
Alternatively, I can modify the solver so it prints time steps instead of iteration numbers, but this is not really a proper solution. I know there are various other methods for plotting residuals, I'd just prefer to have one solution that works for all cases. |
|
November 10, 2014, 18:20 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
If you mean "I have multiple instances of solving psi per timestep and want to visualize them all": online plotting won't work. But you can write out files (from the help of pyFoamPlotRunner.py) Code:
Data files ---------- How data files are written --single-data-files-only Don't create consecutive data files 'value', 'value_2', 'value_3' etc but put all the data into a single file --write-files Writes the parsed data to files - all the same time? Doesn't look good and gives no indication of progress (that is what single-data-files will give you) - distribute evenly between this and next time? Problem is that from "outside" (and that is from where PyFoam looks) there is no way to tell how many iterations there are going to be
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
November 11, 2014, 03:54 |
|
#3 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
In my case I'm talking about PIMPLE/PISO loop.
You're right about the axis of course, but I think in such a case a simple counter would suffice. Using gnuplot, one could probably go more advaned, draw vertical lines and such, but I don't think this is really needed. It would also be useful if it was possible to specify the regular expression of the loop iteration log file output manually. This way, plotting iterations of custom loops would also be possible. |
|
November 11, 2014, 06:38 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I won't do it in online plotting because the algorithm that collects data for that and "coarsens" it (to make sure that runs with thousands of timesteps don't use all the CPU just for plotting) assumes that there is only one data item for each timestep I'm not quite sure what you mean with "specify manually". Of course you can target the output of the linear solver with your own customRegexp too. Or do you mean something else? Two things that MIGHT help you there are "phases" (see the ReleaseNotes) or modifying in the configuration SolverOutput/timeregexp but I'll stay as vague with the answer as you are in your question
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
November 11, 2014, 11:35 |
|
#5 | |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
Quote:
I didn't know about the configuration file before, thanks for pointing me to it! |
||
November 11, 2014, 12:13 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Maximum number of iterations exceeded chtmultiregionsimpleFoam | Moncef | OpenFOAM Running, Solving & CFD | 28 | July 13, 2020 15:26 |
Problem with chtMultiregionFoam radiation boundary condition | baran_foam | OpenFOAM Running, Solving & CFD | 10 | December 17, 2019 18:36 |
Unstabil Simulation with chtMultiRegionFoam | mbay101 | OpenFOAM Running, Solving & CFD | 13 | December 28, 2013 14:12 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 14:58 |
Error while running rhoPisoFoam.. | nileshjrane | OpenFOAM Running, Solving & CFD | 8 | August 26, 2010 13:50 |