CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

Field average in Paraview

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 3, 2014, 12:59
Default Field average in Paraview
  #1
Member
 
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 3
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, 49 views)
File Type: jpg 2.jpg (34.3 KB, 33 views)
wzx1989221 is offline   Reply With Quote

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

Kind regards,
Tony
wzx1989221 is offline   Reply With Quote

Old   April 13, 2014, 14:21
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,504
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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: Get data from Calculator filter in python script
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
wyldckat is online now   Reply With Quote

Old   April 13, 2014, 14:40
Default
  #4
Member
 
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 3
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

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paraview Vector Field simone Marras ParaView 2 April 3, 2013 06:34
How to average field data over y-direction zxj160 EnSight 15 November 29, 2012 18:54
Creating an average line in paraView kayoneex OpenFOAM Paraview & paraFoam 10 October 26, 2010 05:23
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41
To compute Average flowfield with oodles flying OpenFOAM Running, Solving & CFD 3 May 5, 2009 08:46


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