CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

openfoam - monitor flow value on internal surface

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 4 Post By ufocfd

LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2019, 11:36
Default openfoam - monitor flow value on internal surface
Join Date: Jun 2012
Posts: 55
Rep Power: 10
ufocfd is on a distinguished road
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.

name midradsurf;
type surfaceFieldValue;
libs ("");

writeControl timeStep;
writeInterval 1;
writeFields false;
log true;

operation average; //areaAverage, average, max, min
fields (U);
regionType sampledSurface;
surfaceFormat stl;

type sampledTriSurfaceMesh;
surface midradsurf.stl; // <<<<<<< stl file
source cells;
interpolate true;

ufocfd is offline   Reply With Quote

Old   November 19, 2020, 12:15
Join Date: Sep 2017
Posts: 50
Rep Power: 5
gian93 is on a distinguished road
it seems not to work with field phi .. it generates a warning like this :
HTML Code:
surfaceFieldValue massFlowatTurbinlet write:
--> FOAM Warning :
    From function Foam::label Foam::functionObjects::fieldValues::surfaceFieldValue::writeAll(const vectorField&, const Foam::Field<Type>&, const Foam::meshedSurf&) [with WeightType = double; Foam::label = int; Foam::vectorField = Foam::Field<Foam::Vector<double> >]
    in file fieldValues/surfaceFieldValue/surfaceFieldValueTemplates.C at line 358
    Requested field phi not found in database and not processed

>> solution: sampledSurface not available for surface fields

Last edited by gian93; November 19, 2020 at 12:41. Reason: solution: not available for surface fields
gian93 is offline   Reply With Quote


sampledsurface, sampledtrisurfacemesh, simplefoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 12:12
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 OpenFOAM Announcements from Other Sources 0 September 14, 2016 04:19
[Commercial meshers] Fluent Mesh to OpenFoam: Internal Surface has to be a wall sebastian OpenFOAM Meshing & Mesh Conversion 6 October 21, 2010 05:36
[Gmsh] boundaries with gmshToFoam‏ ouafa OpenFOAM Meshing & Mesh Conversion 7 May 21, 2010 13:43

All times are GMT -4. The time now is 10:35.