CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] How to annotate functionObjects in ParaView?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2020, 09:42
Question How to annotate functionObjects in ParaView?
  #1
New Member
 
Tobias Kienzler
Join Date: Mar 2020
Posts: 13
Rep Power: 6
zommuter is on a distinguished road
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);
    }
}
into my controllDict to obtain a uniform/functionObjects/functionObjectProperties file for each time step containing the force. But I cannot find any option in ParaView to actually use those uniform values for an annotation or plot over time. I'm also out of ideas which Python Annotation Expressions to try, since that seems to expect an array as input instead of using a uniform value.


Can anyone help me?


Best regards
Tobias
zommuter is offline   Reply With Quote

Old   September 14, 2020, 10:12
Default
  #2
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 143
Rep Power: 20
JNSN is on a distinguished road
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
You can then plot the data of the csv-file e.g. with the plotData Filter.


Hope this helps,
Jan
JNSN is offline   Reply With Quote

Old   September 23, 2020, 10:39
Default
  #3
New Member
 
Tobias Kienzler
Join Date: Mar 2020
Posts: 13
Rep Power: 6
zommuter is on a distinguished road
Hi Jan, I'll give it a shot, thanks! I wish there were a way to directly read the existing data into ParaView though...
zommuter is offline   Reply With Quote

Old   September 23, 2020, 11:22
Default
  #4
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 143
Rep Power: 20
JNSN is on a distinguished road
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
JNSN is offline   Reply With Quote

Reply

Tags
annotation, openfoam, paraview, uniform constant


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
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


All times are GMT -4. The time now is 21:32.