Skip to content

Class to read foam file surface format from disk in a specified location for post-processing (foamSurfaceReader)

Functionality to add/problem to solve

Add class to read foam file surface format from disk in a specified location

Target audience

Those who would like to run post-processing routines on surface data. More specifically, for acoustic analogies, it would be useful to post-process data instead of doing on-the-fly processing. Snapshots of relevant field data stored on user-defined surfaces via sampledSurfaces class can be read at a later time for acoustic analogy calculations.

Proposal

Existing classes have the required ingredients.I believe this entails two steps:

  1. Modification of the foamSurfaceWriter class to include headers in the files. Currently this gives errors when trying to use existing classes to read the files, such as the surfMesh class.
  2. Allow for a user specified location to read the files and specified fields. This should be consistent with the relevant functionObjectDict that was used to create the surface files in the first place. I am not sure, but I believe this can be achieved by modification of constructors of the surfMesh class.

What does success look like, and how can we measure that?

The class should be able to read the surfMesh and associated fields within a post-processing routine.

Links / references

https://www.openfoam.com/documentation/guides/latest/api/classFoam_1_1surfMesh.html

Funding

I have not been successful at finding existing piece of code that accomplishes this task. I do not have funding available for this development.

Edited by Juan Salazar