|
[Sponsors] |
[OpenFOAM] Integrating a custom variable over a line |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 29, 2016, 12:57 |
Integrating a custom variable over a line
|
#1 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15 |
Dear Fellows
I have defined a custom variable as , where is the component of velocity in x direction and is the bulk charge density. My domain is a simple 2D rectangle. Now I want to calculate the integral ,where L is the height of the channel, on different x positions. I read previous threads. Some of them were mentioning patchIntegrate, However this utility calculates the integration on outlet and inlet, whereas I need this integral on different x positions in my domain. Attached, please take a look at my domain and coordinates alongwith a distribution of the custom variable . Regards Last edited by babakflame; November 29, 2016 at 15:05. |
|
November 29, 2016, 15:08 |
Integrate Variables filter in ParaView
|
#2 |
New Member
Maryam
Join Date: Dec 2015
Posts: 13
Rep Power: 10 |
Have you tried the "Integrate Variables" filter in ParaView? You can slice your domain at different locations and then find the integral over each slice with this filter.
|
|
November 29, 2016, 15:43 |
|
#3 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15 |
Hey Maryam,
Thanks for your reply. Actually I had seen integrate variable filter and had used it. It gives me just a value that I assume its over the surface of the slice i.e. it gives me . However, what I want is the integral over vertical lines not on whole surface of a slice. I have attached a screen shot of my paraview with using integrateVariable Filter. Any further hint is appreciated. Regards |
|
November 29, 2016, 16:09 |
|
#4 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15 |
||
November 30, 2016, 17:30 |
|
#5 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi bobi,
The app is not showing the equations correct but your steps should lead to what you need. Using slices to generate a line an then integrate this one, should lead to the required integral. Maybe a simple test case should give you the proof. However, keep in mind that you introduce interpolation errors. Cheers
__________________
Keep foaming, Tobias Holzmann |
|
November 30, 2016, 20:43 |
|
#6 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15 |
Thanks Tobi
Do you know any other filter that can be used for integration along one line? I am thinking of a snippet for doing it inside the code. I will add that snippet soon. Regards |
|
December 1, 2016, 22:51 |
|
#7 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15 |
Dear Fellows
I will put this information here, It might be useful for others in future about integrateVariable filter. If you want to use integrateVariable filter for integrating over a line, construct that line through consecutive slices, and then use integrateVariable filter. I compared the values from integrateVariable filter with a custom method. I think this filter performs well. @Tobi: I compared values from plot_over_line (with sufficient numbers) against integrateVariable filter. They were comparable. Regards |
|
October 11, 2017, 08:41 |
|
#8 |
New Member
Samarendra Panda
Join Date: Jun 2017
Posts: 8
Rep Power: 8 |
how to use integrate variable filter in paraview?
|
|
October 11, 2017, 08:57 |
|
#9 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
The easiest way is just to apply it on your domain but it depend what you would like to do. I suggest you to have a look here: https://www.paraview.org/paraview-guide/
__________________
Keep foaming, Tobias Holzmann |
|
May 19, 2019, 19:45 |
|
#10 |
Senior Member
Brett
Join Date: May 2013
Posts: 212
Rep Power: 13 |
Hey guys.
Im a bit confused on the maths behind integrate variables. If I just have a simple duct, flow from left to right, and I put a slice perpendicular to the flow, then apply integrate variables am I getting: Integral over surface (U.dA)/A. So the area weighted average velocity essentially? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 04:18 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 09:56 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 09:14 |
Problems of Duns Codes! | Martin J | Main CFD Forum | 8 | August 14, 2003 23:19 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 20:09 |