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

Plotting forces with pyFoamPlotRunner.py

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2022, 17:24
Red face Plotting forces with pyFoamPlotRunner.py
  #1
New Member
 
Alfonso Giancola
Join Date: Nov 2021
Posts: 4
Rep Power: 4
alfogianco is on a distinguished road
Hi guys, I am facing troubles plotting the forces with pyFoamPlotRunner.py. I don't know what to write in the customRegexp to extrapolate the values that I need. Here is the output from the log:

forces forces write:
sum of forces:
pressure : (676.417 0 5.76293e-14)
viscous : (0.0234939 0 5.45593e-18)
porous : (0 0 0)

The best would be to plot the sum of x pressure and x viscous and so on.
Thank you in advance!
alfogianco is offline   Reply With Quote

Old   February 1, 2022, 17:53
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Simply built a small bash script that executes gnuplot (or a gnuplot script) which uses the data given in postProcessing/<youFOName>/... Here you have the output already as you want and the script will re-read, e.g., each second or if the file was modified.

5 - 10 Min work.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   February 6, 2022, 08:12
Default
  #3
New Member
 
Alfonso Giancola
Join Date: Nov 2021
Posts: 4
Rep Power: 4
alfogianco is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Simply built a small bash script that executes gnuplot (or a gnuplot script) which uses the data given in postProcessing/<youFOName>/... Here you have the output already as you want and the script will re-read, e.g., each second or if the file was modified.

5 - 10 Min work.
The fact is that I am running the pyFoamPlotRunner.py inside a bash file because I want to automatize all the processing of running a simulation, so unfortunately I do not know if this option is feasible to me. Anyway I will try, thank you
alfogianco is offline   Reply With Quote

Old   February 6, 2022, 16:58
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Of course, you can put a gnuplot command into a bash-shell script. Even if you push it to the background.
__________________
Keep foaming,
Tobias Holzmann
Tobi 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
The CoP Does not exist: Validating Aerodynamic forces through a "line of action" ds4719 Main CFD Forum 14 February 18, 2022 18:05
Convergence problem of OF WUYing OpenFOAM Running, Solving & CFD 2 September 20, 2021 10:09
Plotting final residuals instead of initial ones through pyFoamPlotRunner.py eliocpereira OpenFOAM Running, Solving & CFD 0 February 17, 2019 15:16
Residuals and forces spiraling out of control before failing edomalley1 OpenFOAM Running, Solving & CFD 3 September 7, 2018 10:42
problem with plotting both forces and coeff giammy92 OpenFOAM Post-Processing 2 March 23, 2016 04:25


All times are GMT -4. The time now is 23:17.