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

[OpenFOAM] How to save area-weighted OR mass-weighted Parameters from paraview

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By vineet_bhola

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 19, 2015, 09:12
Default How to save area-weighted OR mass-weighted Parameters from paraview
  #1
Member
 
Vineet Bhola
Join Date: Jun 2015
Location: Chemnitz, Germany
Posts: 49
Rep Power: 10
vineet_bhola is on a distinguished road
Hi Guys,
I want to find out average values of Temperature, velocity etc of fluid crossing through inlet/outlet patches (or even any patch for that matter). But as I have used addLayers through Snappyhexmesh, I cannot directly take the mean value of these Parameters after "save data" command because different cells have different areas and thus different weightage.
Is there any option to choose individual face areas alongwith the traditional Parameters like T,P,U,k etc. while saving data from paraview.
OR if there is any preexisting filters for that?

Thanks
Vineet
Luttappy likes this.
vineet_bhola is offline   Reply With Quote

Old   November 20, 2015, 04:16
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Vineet,

If you look to "cell data" in spreadsheet view there should also be an area for a slice or a patch. This is the area for each face of your patch. When I want an average I usualy use the integrate variables filter and than a calculator filter. The integrated area of the patch is than a variable for the calculator, so you have:

\overline{\phi} = \frac{\int \phi dA}{\int dA}

Regards,
Tom
tomf is offline   Reply With Quote

Old   November 20, 2015, 05:16
Default
  #3
Member
 
Vineet Bhola
Join Date: Jun 2015
Location: Chemnitz, Germany
Posts: 49
Rep Power: 10
vineet_bhola is on a distinguished road
Thanks a lot Tom,
It works as I wanted for area-weighted average. Although I don't see 'Area' field before integration in Spreadsheet view, I can see it only after I integrate the variables.
I still have some Problem with mass-weighted average. So in case I have varying densities across different faces of the patch, I also need to incorporate density into Integration. But integrate variable filter doesn't give this Option of taking two variables at a time.
For example for mass-weighted average I would rather need the formula to be :

Code:
Mass-weighted average = Integration (variable*density*dA) / Integration (density*dA)
PHP Code:
 \overline{\phi m}=\frac{\int \phi \rho dA}{\int \rho dA
where \rho is density.
P.S. I don't know how to add Special characters as a formula

Is that possible with filters?

Thanks,
Vineet
vineet_bhola is offline   Reply With Quote

Old   November 20, 2015, 05:27
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Vineet,

The formula can be created using [math ] [\ math] blocks instead of the PHP that you used. The integrate variable filter integrates all the variables that are present. So if you need the mass average you would first need a calculator rho*phi and than do the integration. After that you can do another calculator filter just dividing by the integrated rho this time.

Regards,
Tom
tomf is offline   Reply With Quote

Old   November 20, 2015, 05:31
Default
  #5
Member
 
Vineet Bhola
Join Date: Jun 2015
Location: Chemnitz, Germany
Posts: 49
Rep Power: 10
vineet_bhola is on a distinguished road
awesome...that sounds perfect...thanks once again.
vineet_bhola 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
Match Pressure Inlet/Outlet Boundary Condition Mass Flow Rate MSchneid Fluent UDF and Scheme Programming 3 February 23, 2019 06:00
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
Area Weighted Average for a specific zone salman156 FLUENT 0 December 8, 2013 06:06
[OpenFOAM] Save Video of the simulation done in ParaView akku ParaView 1 July 3, 2013 04:28
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 21:41


All times are GMT -4. The time now is 00:22.