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

[OpenFOAM] Field average in Paraview

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 1 Post By wzx1989221
  • 3 Post By wyldckat
  • 3 Post By VIJAYA KUMAR
  • 2 Post By kemin

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 3, 2014, 13:59
Default Field average in Paraview
  #1
Member
 
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 12
wzx1989221 is on a distinguished road
Hi All,


Recently I have been playing with field average in Paraview but I got some problems. Basically I am doing pipe flow simulation in OpenFOAM and I want to achieve both axial average and circumferential average.


First thing is I want to get a 2D averaged slice to represent the 3D field, like compressing the pipe into a single plane. My idea is to get multiple slices and then take the average of them so that I can obtain a 2D plane (fig 1). Is there any way to do that in Paraview?


Second is I want to get the mean velocity profile of the pipe. I created a calculator for radius (i.e. distances from the wall) and then applied contour based on the radius variable I created. By doing this I can get a circular slice at a specific radius every time. After that I applied integrate variable for the circular slice in order to get mean velocity at that radius. The thing is I need much data at different radius, so I need to integrate variable on different circular slices. However, when I use 'new range' to get multiple circular slices (fig 2) and apply integrate variable, I will only get one value for all the slices. My question is how can I get a list of integrated values for each sampled slice with creating all the slices at once?


Hope anyone can give me a hint. Thank you very much.


Kind regards,
Tony
Attached Images
File Type: jpg 1.jpg (79.6 KB, 419 views)
File Type: jpg 2.jpg (34.3 KB, 322 views)
Luttappy likes this.
wzx1989221 is offline   Reply With Quote

Old   April 4, 2014, 12:09
Default
  #2
Member
 
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 12
wzx1989221 is on a distinguished road
Anyone has any hints?

Kind regards,
Tony
wzx1989221 is offline   Reply With Quote

Old   April 13, 2014, 15:21
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Tony,

I've finally managed to give a quick look into this and there isn't anything ready to be used out-of-the-box in ParaView for this. At least not that I'm aware of.

The best I can figure out for the first problem, you'll have to do something like this:
  1. Use the slice filter with multiple offset locations, defined in the range entry (which you already seem familiar with).
  2. The use the filter "Transform" and set the scale to 0 for the axis in question.
  3. Then you'll have to use the "Programmable Filter", to parse through all cells and/or points that are located in the same place, add them up and then divide by the total count per each repeated location. Some references from which to get ideas for it:


For the second problem, you'll have to rely on using a custom filter:
  1. Create a single slice and apply all of the necessary filters you need for it, such as the calculator and the integrator.
  2. Select all items of the list of filters used (Slice+Integrate Variables+etc...) and go to the menu "Tools -> Create Custom Filter".
  3. Configure it accordingly and you now have a single filter that does all of the steps you need for each slice.
  4. Then use the "Tools -> Start Trace" feature to see how to create a script that later automates the process of applying your custom filter several times, once per slice.
    Reference for ideas for creating the N slices: http://www.cfd-online.com/Forums/par...on-script.html
Well, after having the second problem fixed, perhaps the first one can be re-engineered along the same concept of the second one.

Good luck! Best regards,
Bruno
amolrajan, Luttappy and DDDaali like this.
__________________
wyldckat is offline   Reply With Quote

Old   April 13, 2014, 15:40
Default
  #4
Member
 
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 12
wzx1989221 is on a distinguished road
Dear Bruno,

Thank you very much for the detailed information. I will have a go and see whether I can figure it out.

Best regards,
Tony
wzx1989221 is offline   Reply With Quote

Old   April 9, 2017, 03:51
Default
  #5
Member
 
subhankar
Join Date: May 2016
Posts: 36
Rep Power: 10
SUBHANKAR is on a distinguished road
Hello everyone,

I have simulated flow past a cylinder and now i want to get time average pressure and skin friction co-efficient in the entire flow domain for a certain time interval. What should i do? any suggestion is highly appreciated...

Thanks and regards
Subhankar
SUBHANKAR is offline   Reply With Quote

Old   May 20, 2018, 04:30
Default
  #6
New Member
 
Vijaya Kumar. G
Join Date: Jun 2016
Location: Chennai, India & Aachen, Germany
Posts: 20
Rep Power: 10
VIJAYA KUMAR is on a distinguished road
I would like to add the suggestion given by Bruno. I did exactly the same as he said, except I used the 'postProcess' function 'surfaces' for generating the slices as a vtk file. Then I used them in paraview.

A rough idea would be.
1) Generate the vtk files of slices using the 'surfaces' post process functionality available in OpenFOAM.


2) Use 'Transform' function in paraview to rotate the datasets at different angles to the Theta = 0 degrees ( Z = 0 ) plane.


3) Use 'ResampleWithDataset' filter to sample the values of rotated dataset with the base dataset ( Theta = 0 ).


4) Average.


This involves a lot of circus and so I am attaching here a pdf of the procedure.


The process is hectic if you are taking slices for every 5 degrees. I would recommend anyone to automate this with the use of Python trace in paraview, Bash scripting and pvpython to run the python scripts generated by Python trace.






Regards
VIJAYA KUMAR. G
PhD Research Scholar
Dept. of Applied Mechanics
IIT Madras
Email: vjykmr44@gmail.com
Attached Files
File Type: pdf CircumferentialAveraging.pdf (85.0 KB, 287 views)
VIJAYA KUMAR is offline   Reply With Quote

Old   March 3, 2019, 09:40
Default for circumferential averaged quantity
  #7
New Member
 
kemin ali
Join Date: Mar 2015
Location: london
Posts: 13
Rep Power: 11
kemin is on a distinguished road
an example to get circumferential averaged stream-wise velocity of a jet


1. cut a slice


parameters:
- slice type: plane
- slice origin and normal axis


2. cut a circular and plot circumferential averaged quantity using "plot over intersection curve' filter





slice type: sphere
- sphere origin: save as plane slice
- sphere radius: user -defined value


example x and y axis value - x : arch length
- y: U_x


see my personal blog link
fumiya and amolrajan like this.
kemin 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
[OpenFOAM] Creating an average line in paraView kayoneex ParaView 14 September 21, 2020 08:46
[OpenFOAM] Paraview does not display \<name\>:alpha1 field blebon ParaView 1 September 10, 2020 09:56
IntegrateVariables in paraview to get a average flow velocity Qihao OpenFOAM 15 October 30, 2019 19:55
Field Average Over a Dynamic Mesh tecmul OpenFOAM Running, Solving & CFD 2 April 24, 2019 05:30
[General] Paraview Vector Field simone Marras ParaView 2 April 3, 2013 07:34


All times are GMT -4. The time now is 07:36.