|
[Sponsors] |
[OpenFOAM] How to annotate functionObjects in ParaView? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 10, 2020, 09:42 |
How to annotate functionObjects in ParaView?
|
#1 |
New Member
Tobias Kienzler
Join Date: Mar 2020
Posts: 13
Rep Power: 6 |
Greetings!
I've put Code:
functions { forces_impeller { type forces; libs ("libforces.so"); writeControl writeTime; writeFiels no; patches (impeller); rho rhoInf; rhoInf 1e3; CofR (0 0 0); } } Can anyone help me? Best regards Tobias |
|
September 14, 2020, 10:12 |
|
#2 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 143
Rep Power: 20 |
Hi Tobias,
the forces functionObject gernerates time series data of the pressure, viscouse and prorous forces. The data is stored in postProcessing/../forces_impeller.dat (in your case) text files. The output format is an OpenFOAM specific format using brackets to enclose the forces and moments. To plot these data in ParaView you first need to convert the format it in order to ensure ParaView understands correctly. I think easiest is to convert to comma separated (csv) format and remove the comments. Using bash this could be done e.g.: Code:
tail +4 forces_impeller.dat |tr -d '()' |awk 'BEGIN {OFS=","} {$1=$1}1' > forces_impeller.csv Hope this helps, Jan |
|
September 23, 2020, 10:39 |
|
#3 |
New Member
Tobias Kienzler
Join Date: Mar 2020
Posts: 13
Rep Power: 6 |
Hi Jan, I'll give it a shot, thanks! I wish there were a way to directly read the existing data into ParaView though...
|
|
September 23, 2020, 11:22 |
|
#4 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 143
Rep Power: 20 |
Hi Tobias,
just to be curious, is it really necessary to plot the time series in paraview? There are a lot good tools to plot time series, gnuplot etc... However, if you are a little bit familiar with python, you may also create a python marco, which does the file conversion. Then you do not need to do this every time in the bash Best, Jan |
|
Tags |
annotation, openfoam, paraview, uniform constant |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to annotate functionObjects in ParaView? | zommuter | OpenFOAM Post-Processing | 1 | September 10, 2020 09:44 |
[OpenFOAM] Paraview 5.0.1: no option to scale or shift Annotate Time filter | adhiraj | ParaView | 2 | March 10, 2020 11:38 |
[OpenFOAM] Paraview does not display objects (functionObjects) | Proportion | ParaView | 0 | October 16, 2017 09:26 |
[OpenFOAM] Paraview annotate time | Aravind_Krish | ParaView | 4 | August 19, 2016 09:05 |
paraFoam reader for OpenFOAM 1.6 | smart | OpenFOAM Installation | 13 | November 16, 2009 22:41 |