|
[Sponsors] |
openfoam - monitor flow value on internal surface |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
ufocfd
Join Date: Jun 2012
Posts: 55
Rep Power: 10 ![]() |
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; } } |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
giovanni
Join Date: Sep 2017
Posts: 50
Rep Power: 5 ![]() |
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 |
|
![]() |
![]() |
![]() |
Tags |
sampledsurface, sampledtrisurfacemesh, simplefoam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |