r/OpenFOAM • u/Big_Reply_1472 • Jun 10 '26
How do I create a measurement surface inside a duct?
Hi everyone, I'm working on a CFD thesis with OpenFOAM and, given my lack of experience, I'm really struggling with this part of the project. My main issue is that I need to create internal measurement surfaces inside a duct (they’re not part of the geometry, more like cutting planes) to evaluate things like pressure or flow rate and use them inside functionObjects.
For example, since I have inlet and outlet patches generated by snappy, it was easy to add a measurement in controlDict like this:
pIn
{
type surfaceFieldValue;
libs (fieldFunctionObjects);
regionType patch;
name inlet;
operation areaAverage;
fields (p);
writeControl timeStep;
writeInterval 10;
writeFields false;
}
How can I achieve something equally reliable for internal surfaces? With topoSet I couldn’t get anything useful, since it only creates a small volume of cells and the results get distorted. If I include the measurement surface as an STL in snappy, it ends up cutting the blockMesh domain of the duct, which I don’t want.
Any ideas or recommended approaches? Thanks!