How to read and store face values (OpenFOAM)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to read and store face values (OpenFOAM)

Bosshard Christoph HSLU T&A

Hi

To analyze a flow, I need to read in a surfaceScalarField from OpenFOAM. An
example is OpenFOAM/tutorials/incompressible/icoFoam/cavity/cavity/0.1$/phi.
This is a field that is defined on the faces (opposed to point values and cell
values). vtkOpenFOAMReader does not read in this field, so I have to write new
code for this purpose. My question is: Is there any possibility to store this
field in vtk? I cannot use the point or cell values.  For this example, the
velocity U (cell) contains 400 values, the coordinates (point) 882 values, but
the phi field (face) 760 values. Any help would be much appreciated.
Christoph


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: How to read and store face values (OpenFOAM)

VTK - Users mailing list
VTK doesn't have solid built in support for this.

The prevailing strategy for data that is not strictly aligned on points or cells is to make a field data array and then add to the cells/points an index array that points into the field array. The indexing can make use of standard face and edge ordering for cases where a single cell requires multiple values. Gauss Points (https://www.vtk.org/Wiki/images/7/78/VTK-Quadrature-Point-Design-Doc.pdf) and XDMF's FiniteElementFunctions are examples.

Note that the approach tends to lead to custom filters that know how to work with these "non-standard" data arrays.

David E DeMarle
Kitware, Inc.
Principal Engineer


On Mon, Jan 7, 2019 at 1:22 PM Bosshard Christoph HSLU T&A <[hidden email]> wrote:

Hi

To analyze a flow, I need to read in a surfaceScalarField from OpenFOAM. An
example is OpenFOAM/tutorials/incompressible/icoFoam/cavity/cavity/0.1$/phi.
This is a field that is defined on the faces (opposed to point values and cell
values). vtkOpenFOAMReader does not read in this field, so I have to write new
code for this purpose. My question is: Is there any possibility to store this
field in vtk? I cannot use the point or cell values.  For this example, the
velocity U (cell) contains 400 values, the coordinates (point) 882 values, but
the phi field (face) 760 values. Any help would be much appreciated.
Christoph

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers