Creating an O-type mesh for a closed loop with different boundary groups

Hello everyone,

I am working on creating an OpenFOAM model to study natural convection loops. I am using Salome to create my mesh. The method I found to work best for the application I need is to create a 2D mesh with the internal field of choice (o-type mesh with more refinement towards boundary conditions) and extrude this mesh along a path.

The issue I face concerns sectioning my loop into the desired groups. I need my mesh to have different boundary groups for a heater section and another for a cooler, with the remainder of the loop being walls. I cannot seem to find any way to fix this since there is no geometry to be used as a basis for the different sections. I would appreciate any guidance or different methods you all may recommend to create this mesh. I have attached a picture of how I want to section my wall conditions (red is where the heater should be, and blue is the cooler).

I did attempt to create my mesh from a .step file using primarily the NETGEN method, which worked for sectioning mesh in the boundary groups that I wanted, though I was unable to get the o-type mesh with good refinement.

Thank you,

you can use a geometry even if the mesh is not attached to it, you use (in mesh) create groups, use filter and laying on geom, and using geometries you can select the desired cells. this is not waterproof, and some things to keep in mind:
this workflow works correctly for nodes, for edges and faces, the filter will select one extra row of this elements, that will share partially their nodes with the surface, imagine that for a tetra, it has only one of the three nodes on the surface, it will select it. but you can mitigate this by creating two filters one for nodes (they will be selected correctly) one for the faces (there will be some extra faces selected). then iterate over each face element selected get its nodes ids, if all the nodes ids are in the filter, then keep it if not do not keep it. this will allow to create the desired patches from ‘external’ not related geometries to the geometry mesh itself.