|
[Sponsors] |
[OpenFOAM] Integrate Variables is not consistent |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 25, 2023, 10:01 |
Integrate Variables is not consistent
|
#1 |
New Member
A. Alminnawi
Join Date: Jul 2023
Posts: 9
Rep Power: 3 |
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 |
|
July 26, 2023, 05:52 |
|
#2 |
Senior Member
|
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 |
|
July 26, 2023, 06:11 |
|
#3 |
Member
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 93
Rep Power: 17 |
Set the Attribute to 'Cell Data' instead of 'Point Data'.
|
|
July 27, 2023, 06:54 |
Found the issue
|
#4 |
New Member
A. Alminnawi
Join Date: Jul 2023
Posts: 9
Rep Power: 3 |
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 |
|
July 27, 2023, 07:32 |
|
#5 |
Senior Member
|
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 |
|
August 16, 2023, 06:59 |
|
#6 |
New Member
A. Alminnawi
Join Date: Jul 2023
Posts: 9
Rep Power: 3 |
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 |
|
August 21, 2023, 06:20 |
|
#7 |
Senior Member
|
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 |
|
August 21, 2023, 06:41 |
|
#8 |
New Member
A. Alminnawi
Join Date: Jul 2023
Posts: 9
Rep Power: 3 |
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" |
|
August 21, 2023, 08:21 |
|
#9 |
Senior Member
|
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 |
|
|
|
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 |