jaheyns / CfdOF

Computational Fluid Dynamics (CFD) for FreeCAD based on OpenFOAM solver
GNU Lesser General Public License v3.0
442 stars 84 forks source link

Read patch data #142

Closed finnBsch closed 1 year ago

finnBsch commented 1 year ago

Hi, I am currently postprocessing the generated data with Python for my needs. I would like to extract the following information about the patches that make the case:

Such that after I can reconstruct the map in terms of walls and inlets/outlets. Is that possible? Best regards!

oliveroxtoby commented 1 year ago

Something like the following python code should do it:

from CfdOF import CfdTools
bg = CfdTools.getCfdBoundaryGroup(CfdTools.getActiveAnalysis())
for b in bg:
    print(b.Label, b.Shape.CenterOfGravity)