openfoam - monitor flow value on internal surface
Im posting this because it took me a while to set up correctly, so maybe it will be useful to others. It monitors the flow and logs the results.
I needed to monitor the average velocity at a plane within the mesh (not a patch or boundary condition), so I was able to use an STL file to specify the plane location (just a flat plate), using sampledTriSurfaceMesh. I used the code below which is added to the controlDict file - you can change the operation to average, areaAverage,min,max etc. Note the STL file need to be completely within the mesh domain, or you will get warning messages. surfaceFieldValue1 { name midradsurf; type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); writeControl timeStep; writeInterval 1; writeFields false; log true; operation average; //areaAverage, average, max, min fields (U); regionType sampledSurface; surfaceFormat stl; sampledSurfaceDict { type sampledTriSurfaceMesh; surface midradsurf.stl; // <<<<<<< stl file source cells; interpolate true; } } |
it seems not to work with field phi .. it generates a warning like this :
HTML Code:
surfaceFieldValue massFlowatTurbinlet write: >> solution: sampledSurface not available for surface fields |
monitor flow value on internal surface
Dear foamers,
I came across this thread and it's exactly what I'm looking for, my case is a simple pipe with a constant cross-section and I need to analyze the mass flow in the middle, I tried some solutions presented in this topic, however, none resulted in success, does anyone know why? I have noticed that the command change in version 2112... Mainly, I have to analyze the flow behaviour (mass flow rate) in the middle of the total pipe length, my initial idea was to generate a plane, create a patch and run the following command "postProcess -func" flowRatePatch(name=middle)" however, this resulted in a big challenge. |
Hi ALL,
There is a very good example in OpenFOAM tutorials as "OpenFOAM/OpenFOAM-v2012/tutorials/compressible/rhoSimpleFoam/squareBend". This tutorial describes how to sample various cross sections. Of course, examples of flow rate sampling are also provided. |
All times are GMT -4. The time now is 12:20. |