|
[Sponsors] |
November 21, 2022, 07:29 |
weighted average for OpenFoam9
|
#1 |
New Member
Ali Saei
Join Date: Dec 2021
Posts: 2
Rep Power: 0 |
Hi Foamers,
I want to calculate the weighted average of a field in openfoam 9, but I realised that as opposed to the other version (e.g. openfoam 6 https://cpp.openfoam.org/v6/classFoa...ieldValue.html), there is no option for weightedAverage in surfaceFieldValue (https://cpp.openfoam.org/v9/classFoa...ieldValue.html). Any suggestion how can I calculate it for OpenFoam9? Cheers |
|
November 21, 2022, 08:52 |
|
#2 | ||
New Member
Juan Pablo Carbajal
Join Date: Jun 2021
Posts: 23
Rep Power: 5 |
Any news on this? weightedSum also disappeared from OpenFoam v10. It was the easiest way to compute flows of a given phase in interFoam.
I tried areaIntegrate and areaAverage, but not getting the desired result. Here an example that aims at computing the flow of water across a surface Quote:
Before I could achieve this with weightedSum, using alpha.water as weighting field. How to do this in OF10? Update: Looking at the docs here: https://cpp.openfoam.org/v10/classFo...e.html#details I find that this seems to achieve the intended calculation Quote:
Last edited by kakila; November 21, 2022 at 10:00. Reason: update |
|||
November 21, 2022, 13:32 |
|
#3 | |
Senior Member
Join Date: Oct 2017
Posts: 133
Rep Power: 9 |
Quote:
|
||
November 21, 2022, 13:35 |
|
#4 |
New Member
Ali Saei
Join Date: Dec 2021
Posts: 2
Rep Power: 0 |
Thank you both for your help. Clear!
|
|
February 22, 2023, 06:40 |
|
#5 | |
New Member
Join Date: Jun 2022
Posts: 4
Rep Power: 4 |
Quote:
surfaceFieldValue2 { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeControl writeTime; writeFields true; surfaceFormat none; regionType faceZone; name flowrate2; operation sum; weightField alpha.water; fields (phi); } but the following error occurs: [2] --> FOAM FATAL ERROR: [2] surfaceFieldValue surfaceFieldValue1: faceZone(flowrate1): Unable to process internal faces for volume field alpha.water Do you know how to solve it |
||
July 3, 2023, 15:11 |
|
#6 | |
Senior Member
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9 |
Quote:
Check: faceZoneAverage function object does not work with field U,p etc. |
||
Tags |
openfoam 9, surfacefieldvalue, weighted average |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
y+ and u+ values with low-Re RANS turbulence models: utility + testcase | florian_krause | OpenFOAM | 114 | August 23, 2023 06:37 |
How to evaluate mass weighted average in Ansys CFD post processing | SugarOnichan | FLUENT | 1 | February 11, 2022 02:54 |
Converging Diverging Nozzle with dbnsTurbFoam | Saleh Abuhanieh | OpenFOAM Running, Solving & CFD | 4 | December 13, 2019 11:26 |
Near wall treatment in k-omega SST | Arnoldinho | OpenFOAM Running, Solving & CFD | 38 | March 8, 2017 14:48 |
area weighted average or mass weighted average | sa har | Main CFD Forum | 0 | January 5, 2016 14:16 |