Selecting all merged surfaces [solved]

Hello,

I have a quite complicated model which I split into a large number of sub-volumes in order to mesh (the mesher seems to be a lot more happy when I give it a bunch of volumes that are topologically simple). I now need to make sidesets for the boundary conditions.

In the past I’ve always done this using a pattern similar to (usually split over many journals):

(geometry...)

(meshing...)

sideset 1 surface 123 # Inlet
sideset 2 surface 321 # Outlet
...
sideset 10 surface 4210 4211 4212 4213 4214 ... # Group of internal, merged surfaces

sideset 6 surface all except surface in sideset 1,2,10 # General external surface
delete sideset 10

(blocks and genesis output)

However in this case, the sideset 10 group will be quite large, and I would prefer to not have to select it by hand (error-prone and painful to update if I change something higher up in the script which shifts the IDs).

Is there a way to do this automatically? Something like this pseudocode:

sideset 10 surface all except merged

or ideally:

sideset 10 surface all except merged and except surface in sideset 1,2

Best regards,
Kyrre Sjobak

One way of doing this is in two steps:

sideset 10 surface all except with is_merged
sideset 10 remove surface in sideset 1 2

Another way of doing it is to put merged surfaces and surfaces in sidesets 1 and 2 into a group and then creating sideset 10 with surface all except in that group.

Thank you! That way of automatically creating a sideset for the external / free surfaces worked perfectly!