|
[Sponsors] |
How does the operation in surfaceFieldValue exactly work? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 19, 2023, 12:14 |
How does the operation in surfaceFieldValue exactly work?
|
#1 |
New Member
Turhan
Join Date: Sep 2022
Posts: 16
Rep Power: 4 |
Dear all,
I'm running a code that shows a flow through a pipeline In order to see what the mass flow is through the pipe I've written the following code: MassFlow { type surfaceFieldValue; libs (fieldFunctionObjects); enabled true; writeControl writeTime; log true; writeFields false; regionType patch; name inlet; operation average; fields ( phi U p ); } Here I've written average at the operation. But what is it exactly taking the average of? Is it summing the phi, U and p on each point of the patch I've chosen? Or is it averaging the variables at each timestep? To compare results, I had rerunned the simulation with "operation none;" instead, but that gave me a blank page. |
|
January 19, 2023, 13:02 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
Your current definition is computing the average value of all faces on your patch for Phi, U and p. More details here: https://www.openfoam.com/documentati...ieldValue.html If you want to compute the flowrate you should use operation sum on phi (which is the flux on each face of the patch). Regards, Yann |
|
February 21, 2023, 11:00 |
|
#3 | |
New Member
Turhan
Join Date: Sep 2022
Posts: 16
Rep Power: 4 |
Quote:
So for the total flow rate it makes sense to sum the flow rate through all faces. But would that not mean that for data such as the pressure and velocity I should get the average value of all faces in order to know what velocity/pressure occurs at the patch? |
||
February 21, 2023, 11:17 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Yes exactly, if you want to know the average velocity or average pressure on your patch you can use average or areaAverage.
For the flowrate you can use sum(phi) since phi is the local flux at the face. If you are using an incompressible solver, you will get a volume flow rate. If you are using a compressible solver you will get a mass flow rate. You can also compute areaNormalIntegrate(U) which will also give a volume flow rate. I hope this helps. Yann |
|
Tags |
post process, surfacefieldvalue |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
RuntimeControl with surfaceFieldValue (v2012) | simrego | OpenFOAM Post-Processing | 3 | April 23, 2021 16:11 |
OpenFoam "Permission denied" and "command not found" problems. | iyidaniel@yahoo.co.uk | OpenFOAM Running, Solving & CFD | 11 | January 2, 2018 07:47 |
Does CX_Interpret_String work in parallel? | 86lolo | Fluent UDF and Scheme Programming | 2 | June 30, 2014 05:36 |
Companies that lease software & hardware for cloud-based work? | Catthan | ANSYS | 0 | June 18, 2014 11:53 |
Do all CFD analysts have to do some hands-on work except PhDs? | e13drd | Main CFD Forum | 2 | March 17, 2014 15:56 |