|
[Sponsors] |
November 25, 2020, 11:27 |
cuttingPlane weightedAreaAverage
|
#1 |
Member
Javier Vinuales
Join Date: May 2016
Posts: 42
Rep Power: 9 |
Hi everyone,
I am using OpenFOAM v2006. I need to calculate the mass flow average at different cross-sections of a duct. I was thinking to use a cuttingPlane to do so. How can I do it? I tried to use the following but function object but I got an error: Code:
tempX1Average { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); writeControl writeTime; fields (T); writeFields no; // yes | no regionType sampledSurface; name test; sampledSurfaceDict { type cuttingPlane; planeType pointAndNormal; pointAndNormalDict { basePoint (0 0 0); normalVector (1 0 0); } } operation weightedAreaAverage; weightField phi; } --> FOAM FATAL IO ERROR: Cannot use weighted operation 'weightedAreaAverage' for sampledSurface Is there a way to calculate a mass flow average temparature at a cutting plane? |
|
November 26, 2020, 03:17 |
|
#2 |
Member
Javier Vinuales
Join Date: May 2016
Posts: 42
Rep Power: 9 |
Currently, I am using patch averages, but that means that I need to create separate bodies and create interface patches between them where I can take the readings. This adds a lot of complexity to my meshing process. It would be much easier if I could just take the readings from cutting planes...
This is the function object that I am currently using and works perfectly with patches... I just need this but with a cutting plane! Code:
name x_2; fields (T); operation weightedAreaAverage; weightField phi; #includeEtc "caseDicts/postProcessing/surfaceFieldValue/patch.cfg" |
|
November 26, 2020, 12:20 |
|
#3 |
Senior Member
Join Date: Jul 2019
Posts: 148
Rep Power: 6 |
Hi,
I am not an expert, but you can do that with paraview. You can generate a macro that has a sequential order of the applied filters to calculate the weighted average. Check the below thread, post#7: How to calculate depth averages in ParaView Also, I am unsure if the below function object would assist you (I have not used it): https://github.com/ZmengXu/conditionalAverage Hope that helps. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sampling air passing through multiple windows | b.simpson | OpenFOAM Post-Processing | 3 | September 4, 2020 08:07 |
Sampling fields values passing through multiple windows | b.simpson | OpenFOAM Post-Processing | 0 | May 1, 2020 11:14 |
cuttingPlane with cyclic BC | Xulia | OpenFOAM Post-Processing | 1 | April 26, 2016 07:27 |
export calculated variable with cuttingPlane | Eloise | OpenFOAM Post-Processing | 0 | June 16, 2014 10:59 |
How to plot variable (alpha1) on cuttingPlane (runtime postprocessing) | pythag0ra5 | OpenFOAM Post-Processing | 1 | September 26, 2013 08:46 |