CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

openfoam - monitor flow value on internal surface

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 6 Post By ufocfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2019, 11:36
Default openfoam - monitor flow value on internal surface
  #1
Senior Member
 
Giles Richardson
Join Date: Jun 2012
Location: Cambs UK
Posts: 102
Rep Power: 14
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.

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;
}

}
ufocfd is offline   Reply With Quote

Old   November 19, 2020, 12:15
Default
  #2
Member
 
giovanni
Join Date: Sep 2017
Posts: 50
Rep Power: 9
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
why?

>> 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

Old   October 10, 2022, 15:54
Default monitor flow value on internal surface
  #3
New Member
 
Join Date: Aug 2019
Posts: 19
Rep Power: 7
Didu is on a distinguished road
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.
Didu is offline   Reply With Quote

Old   October 11, 2022, 23:34
Default
  #4
Member
 
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 14
LongGe is on a distinguished road
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.
__________________
Our Work: https://www.idaj.co.jp/product/ennovacfd/openfoam_gui/
Powered by Ennova : https://ennova-cfd.com/
Ennova's Channel Partners : http://www.wolfdynamics.com/
LongGe is offline   Reply With Quote

Reply

Tags
sampledsurface, sampledtrisurfacemesh, simplefoam


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 cfd.direct 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 12:10.