|
[Sponsors] |
Monitoring flow rate on patch in OpenFOAM v2012 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 28, 2021, 06:29 |
Monitoring flow rate on patch in OpenFOAM v2012
|
#1 |
New Member
Oliver Herz
Join Date: Jun 2021
Posts: 3
Rep Power: 4 |
Hello,
after a 6 year break, I currently have an OpenFOAM project again. For this I use the latest version v2012. Unfortunately, the keywords have changed over time. I have a model with 4 outlets (out1, out2, out3, out4) I would like to monitor the volume flow [m³/s] or mass flow [kg/s] on these during the simulation. Solver: simpleFoam Can someone give me an example of the function in the controlDict? My old spelling no longer works. Best wishes O.Herz |
|
June 28, 2021, 11:27 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 670
Rep Power: 14 |
The fieldFunction that you are after is surfaceFieldValue, I think (https://www.openfoam.com/documentati...ieldValue.html). Here's an example of its use for a case where I wanted the massflow-weighted average values of two scalars on a patch called outlet:
Code:
functions { surfaceFieldValue1 { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); enabled yes; writeControl writeTime; log yes; writeFields no; regionType patch; name outlet; operation weightedAverage; weightField phi; fields ( H2O T ); } } |
|
June 29, 2021, 03:29 |
|
#3 |
New Member
Oliver Herz
Join Date: Jun 2021
Posts: 3
Rep Power: 4 |
Hello,
thanky you very much. It works! Best Regards O.Herz |
|
September 7, 2023, 13:04 |
How do I write this to a file?
|
#4 |
New Member
Avi
Join Date: Jul 2023
Posts: 2
Rep Power: 0 |
How do I write this to a file, say flowrate.txt?
Thanks! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[openSmoke] libOpenSMOKE | Tobi | OpenFOAM Community Contributions | 562 | January 25, 2023 09:21 |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 14:24 |
Pressure Outlet Targeted Mass Flow Rate | LuckyTran | FLUENT | 1 | November 23, 2016 10:40 |
[GAMBIT] periodic faces not matching | Aadhavan | ANSYS Meshing & Geometry | 6 | August 31, 2013 11:25 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 06:51 |