CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] Defining separate objects as a region in an STL file at once (https://www.cfd-online.com/Forums/openfoam-meshing/252129-defining-separate-objects-region-stl-file-once.html)

scfd September 29, 2023 01:36

Defining separate objects as a region in an STL file at once
 
1 Attachment(s)
Hi,

I'm seeking a way to define regions for multiple bodies within a single STL file simultaneously. When I mesh geometries like the one shown in fig-1 using snappyHexMesh, I encounter difficulties in defining inner coordinates (locationsInMesh). When there are a large number of objects (more than 100) that need to be defined, manually writing coordinates becomes frustrating because I have to identify the inner coordinates for each separate object in the STL file before adding them to the snappy dictionary. When I provide only one coordinate, it creates a region exclusively for that specific object or part.
Code:

locationsInMesh
(
        ((x0 y0 z0) fluid_region)
        //--------------------------//
        (( x1 y1 z1) solid_region_1)
        .
        .
        (( xn yn zn) solid_region_1)
        //--------------------------//
        (( x1 y1 z1) solid_region_2)
        .
        .
        (( xn yn zn) solid_region_2)
);

Is there an easy way to capture all separate objects as region with snappyHexMesh?

regards,
scfd

AtoHM September 29, 2023 03:34

AFAIK there is no possibility to just mesh every region. That would be a great feature, though.


All times are GMT -4. The time now is 03:55.