|
[Sponsors] |
Plotting a result while a simulation is running |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 26, 2022, 07:41 |
Plotting a result while a simulation is running
|
#1 |
Senior Member
mohammad
Join Date: Dec 2010
Location: UK
Posts: 245
Rep Power: 16 |
Hi everyone,
I know that PyFoamPlotRunner shows the residuals while a file is running. However, I'm trying to plot the AreaAverage of pressure at the inlet of a domain while the simulating is running. I have calculated the surface average within the "controlDict" by: inletAvePressure { type surfaceFieldValue; libs (fieldFunctionObjects); enabled yes; writeControl timeStep; writeInterval 1; log yes; writeFields no; regionType patch; name inlet; operation areaAverage; weightField phi; fields ( p ); } Could anybody let me know how to plot this value during the run? Best, |
|
May 30, 2022, 09:48 |
|
#2 |
Senior Member
|
Hi Mohammad,
If you run on any modern version of OpenFOAM this will probably work from the command line: Code:
foamMonitor postProcessing/inletAvePressure/0/surfaceFieldValue.dat Code:
foamMonitor -h Running in the background can be useful. Hope this helps, Best Regards, Tom |
|
May 30, 2022, 10:42 |
|
#3 | |
Senior Member
mohammad
Join Date: Dec 2010
Location: UK
Posts: 245
Rep Power: 16 |
Quote:
For future readers: I was also able to use the "gnuplot" in a new terminal to read the results from the "log" file. Best |
||
May 31, 2022, 09:13 |
|
#4 |
New Member
Join Date: Dec 2019
Posts: 13
Rep Power: 6 |
Hi mohammad,
Another thing you can do, if you're using PyFoam, is to create a file called "customRegexp" in the run directory, containing a regular expression to parse the log for the quantity you want to plot. PyFoamPlotRunner will pick up the regular expression automatically and plot your result live alongside the residuals. Best regards, Vivio |
|
Tags |
plotting result, simultaneous, while running |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Workbench] Current result file may not contain requested result data | zhizhuo | ANSYS Meshing & Geometry | 0 | December 13, 2017 05:18 |
Can not get correct result in inducer simulation by pimpleDyMFoam | zxzx | OpenFOAM Running, Solving & CFD | 1 | February 19, 2017 03:43 |
Different Result between FLUENT and CFD Post | free.man | FLUENT | 0 | February 10, 2017 00:20 |
How to display the whole result of a periodic model via one period result? | dixylo | FLUENT | 2 | February 23, 2012 05:11 |
Read Result Files or User Defined Result | Aquilaris | ANSYS | 0 | February 9, 2011 06:25 |