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

Monitoring boundaries in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlmostSurelyRob

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2013, 07:28
Default Monitoring boundaries in OpenFOAM
  #1
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22
AlmostSurelyRob will become famous soon enough
Dear Users and Developers,

it is possible in OpenFOAM to set up a monitoring boundary? I am trying to do some runtime post-processing. I would be satisifed with one of the two solutions

1) Calculate a surface integral on a given set of faces
2) Interpolate field values for a set of faces

According to this link
http://www.openfoam.com/features/run...processing.php
my request would be satisifed by either fieldValue and surfaceInterpolateFields.

Using setSet I have already defined the correct face sets and confirmed their validity with paraview. I am only interested in phase indicator field from a VOF simulation.

First problem: fieldValue doesn't appear to be implemented or registered.

Code:
Unknown function type fieldValue

Valid functions are : 

14
(
cellSource
faceSource
fieldAverage
fieldCoordinateSystemTransform
fieldMinMax
nearWallFields
patchProbes
probes
readFields
regionSizeDistribution
sets
streamLine
surfaceInterpolateFields
surfaces
)
Second problem surfaceInterpolate defined in the following way in controlDict


Code:
functions
{

  monitoring1
  {
    type            fieldValue;
    functionObjectLibs ( "libfieldFunctionObjects.so" );
    outputControl   timeStep;
    patches monitoringSurface1;
    fields ((alpha1 alpha1Near));
  }
}
produces output that does not match my exectations. What is actually alpha1Near? How do I tell surfacInterpolate that I only want interoplation on a surface given by a faceSet that resides in constant/polyMesh/sets?

Could anyone explain to me what is the correct syntax for defining this function and how could I use it to achieve my goal?

In the worst case I would like to point out that the above website needs updating (fieldValue absent?). Please do let me know if you understand how it is supposed to work.
AlmostSurelyRob is offline   Reply With Quote

Old   April 23, 2013, 07:45
Default cuttingPlane doesn't work with periodic?
  #2
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22
AlmostSurelyRob will become famous soon enough
I've just discovered that cuttingPlane could do what I want from interpolateSurfaceFields, but alas it crashes with my periodic domain producing no output at all. It's strange because the plane does not pass through a periodic patch.

Code:
functions
{

  cuttingPlane
  {
    type            surfaces;
    functionObjectLibs ("libsampling.so");
    outputControl   timeStep;

    surfaceFormat   vtk;
    fields          (alpha1);

    interpolationScheme cellPoint;

    surfaces
      (
       monitoring1
       {
       type            cuttingPlane;
       planeType       pointAndNormal;
       pointAndNormalDict
       {
       basePoint       (0 0 0.6);
       normalVector    (0 0 1);
       }
       interpolate     true;
       }
      );
  }

}
and the error

Code:
Unhandled coupledPolyPatch type cyclic

    From function isoSurface::collocatedFaces(const coupledPolyPatch&) const
    in file sampledSurface/isoSurface/isoSurface.C at line 97.

FOAM aborting
is that normal?

Also I don't know if VTK will be any useful. I just want to take a signal out of it which will be the integrated volume fraction. Will I be able to do it efficiently with plenty of VTK files?
AlmostSurelyRob is offline   Reply With Quote

Old   April 23, 2013, 09:06
Default
  #3
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22
AlmostSurelyRob will become famous soon enough
Praise be to swak4Foam developers!

Using this link
http://www.cfd-online.com/Forums/ope...e-average.html
I figured out that this piece of code in my controlDict
Code:
libs (
"libOpenFOAM.so"
"libsimpleSwakFunctionObjects.so" 
"libswakFunctionObjects.so"
);

functions
{
  liquidHoldup1
  {
    type            swakExpression;
    valueType       surface;
    surfaceName monitoringBoundary1;
    surface {
            type plane;
            basePoint       (0 0 0.6);
            normalVector    (0 0 1);
            interpolate false;
        }
    functionObjectLibs ("libsampling.so");
    outputControl   timeStep;

    zoneName monitoringZone1;
    accumulations ( min);
    expression "sum((1-alpha1)*area())/sum(area())";
    verbose true;
  }
}
dooes the job for point 1 of my querry. I am still cuious to learn how to do point 2.
venturi likes this.
AlmostSurelyRob is offline   Reply With Quote

Old   April 23, 2013, 14:11
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by AlmostSurelyRob View Post
Praise be to swak4Foam developers!

Using this link
http://www.cfd-online.com/Forums/ope...e-average.html
I figured out that this piece of code in my controlDict

<code snipped>

does the job for point 1 of my querry. I am still cuious to learn how to do point 2.
That would be "Interpolate field values for a set of faces"? With "set of faces" you mean a faceSet or a faceZone? As you already bit the bullet and installed swak I can offer you this: swakExpressions that work on faceSets or faceZones have an option "autoInterpolate". If you set the to true and use the name of a field that is defined on the cells in your expression the field is automatically interpolated onto the faces and used for the calculation. Other option would be to use an expressionField-functionObject that generates (for instance) a field pOnFaces from the expression "interpolate(p)" and use that with one of the stock function objects
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply


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
Memory protection in OpenFOAM / combinig with FORTRAN botp OpenFOAM Programming & Development 2 February 15, 2016 12:25
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 05:36
[Gmsh] gmsh 2.6.0 conversion to OpenFoam 160 rosswin OpenFOAM Meshing & Mesh Conversion 0 March 5, 2013 07:34
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52
Cross-compiling OpenFOAM 1.6 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 7 January 19, 2010 15:39


All times are GMT -4. The time now is 12:46.