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

[OpenFOAM] Integrate Variables is not consistent

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By tomf
  • 1 Post By tomf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 25, 2023, 10:01
Default Integrate Variables is not consistent
  #1
New Member
 
A. Alminnawi
Join Date: Jul 2023
Posts: 9
Rep Power: 3
Alminnawi is on a distinguished road
Hello everyone,

I have some results of an OpenFoam simulation that I did and I wanted to calculate the flow rate over the inlet using Paraview.

Paraview gave me U_Magnitude which is the velocity so I used Extract Block to get the area of the inlet then I used Integrate Variables to calculate the flow rate. It's pretty straightforward.

Then I just decided to see what would happen if I assigned a variable called magU to calculate the magnitude of the velocity (which is precisely the same as U_Magnitude created by Paraview) and I did the same process to get the flow rate but this time it gave me a totally different answer.

I tried it with the outlet it did the same and I tried it with different models and different simulations and it also did the same.
What is the difference between them and which one is the actual flow rate that I should look into? I did not expect any difference between them especially since every U_Magnitude equals every magU.

Thank you in advance
Attached Images
File Type: jpg magU.jpg (76.7 KB, 19 views)
Alminnawi is offline   Reply With Quote

Old   July 26, 2023, 05:52
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
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, I think you should use the cell data for the calculator and the integrate variables. I would expect that to be more consistent. Not sure where the difference is coming from however it seems quite large.

I would wonder what happens if you use the cell data, but at least that should not involve any interpolation.

Finally I think for the flow rate you would need the surface normal velocity, not the magnitude, although this could be the same for your inlet if it is oriented along the x- y- or z-direction.

Hope this helps,
Tom
tomf is offline   Reply With Quote

Old   July 26, 2023, 06:11
Default
  #3
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 93
Rep Power: 17
sylvester is on a distinguished road
Set the Attribute to 'Cell Data' instead of 'Point Data'.
Attached Images
File Type: jpg CellData.jpg (71.4 KB, 14 views)
sylvester is offline   Reply With Quote

Old   July 27, 2023, 06:54
Default Found the issue
  #4
New Member
 
A. Alminnawi
Join Date: Jul 2023
Posts: 9
Rep Power: 3
Alminnawi is on a distinguished road
Hi tomf and sylvester, thanks for your input.

I figured out the issue. I didn't notice it before but calculating magU and then integrating it would do exactly that while using U_Magnitude from Paraview actually integrates U_x, U_y, and U_z and then calculates the magnitude. Basically, it is an issue of the sequence of operation.

note: Setting the Attribute to 'Cell Data' instead of 'Point Data' still gave different values but I would like to know why you are suggesting to use 'Cell Data' instead.

Cheers,
Al
Alminnawi is offline   Reply With Quote

Old   July 27, 2023, 07:32
Default
  #5
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
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 Al,

Good that you figured out the issue and thanks for reporting it.

The main reason for using cell data is that the cell data on a patch/face is what OpenFOAM uses for the flux into or out of a cell, the point data has some interpolation from ParaView on the call data. If looking for flow rates I always check the cell data, just to make sure the interpolation does not introduce inconsistencies.

Cheers,
Tom
Alminnawi likes this.
tomf is offline   Reply With Quote

Old   August 16, 2023, 06:59
Default
  #6
New Member
 
A. Alminnawi
Join Date: Jul 2023
Posts: 9
Rep Power: 3
Alminnawi is on a distinguished road
Hi tomf,

for Integrate Variables, I was able to choose "Cell Data" instead of "Point Data" but when I plot over time, only "Raw Data" actually gives values while the other options are empty.
Is that correct in your opinion?

thanks,
Al
Alminnawi is offline   Reply With Quote

Old   August 21, 2023, 06:20
Default
  #7
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
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 Al,

Did you make sure all of the filters in your pipeline are referencing the cell data? Because you need to ensure consistency to make things work.

Cheers,
Tom
tomf is offline   Reply With Quote

Old   August 21, 2023, 06:41
Default
  #8
New Member
 
A. Alminnawi
Join Date: Jul 2023
Posts: 9
Rep Power: 3
Alminnawi is on a distinguished road
Hi Tom,

Can you explain what you mean by filters? I started recently using OpenFoam with Paraview.
I am not sure if you are familiar with OpenFoam but if you are, in which folder are the filters (0, constants, or system)?
In the system folder I have blockMeshDict, controlDict, decomposeParDict, fvSchemes, fvSolution, snappyHexMeshDict, and surfaceFeaturesDict

non of them have "filters" or "point/cell data"
Alminnawi is offline   Reply With Quote

Old   August 21, 2023, 08:21
Default
  #9
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
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 Al,

I was referring to the filters in ParaView. For instance, extractBlock is a filter as is intergrateVariables. You build your pipeline with sources (the OpenFOAMReader) and then apply filters to that source.

OpenFOAM only knows cellData, ParaView applies interpolation to get pointData.

Hope this helps,
Tom
Alminnawi likes this.
tomf 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
Method to set environment variables for linking ANSYS Fluent 19.1 and visual studio 1 renrenxiong ANSYS 0 November 13, 2019 08:17
SU2 violates the lower bound of the FFD design variables cfdjetman SU2 4 October 2, 2019 17:15
[General] Integrate variables feature Rotidpor ParaView 4 May 30, 2019 12:59
Some variables not loading in Tecplot nick.l.thomas Tecplot 1 October 25, 2018 18:48
PHI file structure Eugene Phoenics 9 November 2, 2001 23:00


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