v2606: New and improved pre-processing

Updated distributedTriSurfaceMesh

TOP

In this release, the snappyHexMesh geometry type distributedTriSurfaceMesh has been updated with two useful enhancements.

The first change introduces an exclusion bounding box. The utility now calculates a bounding box (exclusionBb) that encompasses all the triangles it holds. For any query that falls fully inside this bounding box, the geometry can be resolved locally, avoiding excessive remote tests. This optimisation is enabled by default but can be disabled if required:

box
{
    file "box.obj";
    type distributedTriSurfaceMesh;

    // Do not calculate exclusion bounding box
    exclusionBb         false;
}

The second change allows distributedTriSurfaceMesh to behave exactly like triSurfaceMesh while loading the geometry only on selected processors:

box
{
    file "box.obj";
    type distributedTriSurfaceMesh;

    // Send whole surface to master of each node
    distributionType    nodeMaster;
}

With this configuration, per-node memory usage is reduced, at the cost of additional communication and a potential bottleneck on the processor holding the geometry. The default behaviour is to designate one master processor per node, determined by hostname. Optionally, the number of processors sharing a master can be adjusted using the nProcessorsPerMaster setting.

Tutorials

Source code

Merge request

Improved to the splitMeshRegions utility

TOP

The splitMeshRegions utility has been improved with two new options.

customRegionNames

When using splitMeshRegions with the combineZones option, a group of cell zones can be collected into a single region. For example, given zones zoneA, zoneB, zoneC, and zoneD, the combineZones option can place zoneA and zoneB into one region and zoneC and zoneD into another. However, the combined region names are generated by concatenating the cell zone names, e.g. zoneA_zoneB and zoneC_zoneD. As the number of cell zones in a region grows, these names can become unwieldy.

The new customRegionNames option allows explicit names to be assigned to cell zone clusters when using combineZones:

splitMeshRegions -cellZonesOnly -combineZones '((zoneA zoneB)(zoneC zoneD))' -customRegionNames '(regionX regionY)'
useSelectedFaceZones

The existing useFaceZones option subdivides the inter-region interface into multiple patches corresponding to all face zones. The new useSelectedFaceZones option provides more control by subdividing the inter-region interfaces into patches corresponding only to a specified subset of face zones.

Source code

Merge request

New patchDistanceToCell cell source

TOP

OpenFOAM provides patchToCell to select cells directly adjacent to named patches, and geometric sources such as boxToCell and sphereToCell for shape-based regions. Until now there was no way to select cells within a distance band from one or more patches using the same geometric distance algorithm as turbulence wall-distance calculations.

The patchDistanceToCell topoSet cell source has been added to fill that gap for mesh setup, refinement zones, source terms, and post-processing cell sets.

Near-wall and annular-band cell sets can be configured as follows:

actions
(
    {
        name    nearWall;
        type    cellSet;
        action  new;
        source  patchDistanceToCell;
        patch   movingWall;
        distance 0.02;
    }

    {
        name    wallBand;
        type    cellSet;
        action  new;
        source  patchDistanceToCell;
        patches (movingWall fixedWalls);
        minDistance 0.01;
        distance 0.04;
    }
);

Source code

Merge request

Tutorial

Issue