Hello again,
I think I have managed to understand the sources for the duplicated edges.
There are two sources:
1) The edges located along the circumference of the sideset of the cutting surface
solution:
Instead of determining the sideset only based on surface like this:
sideset 200 surface 158
One needs to also add the curves comprising the circumference of the surface, e.g.:
sideset 200 surface 158 curve 389 390 391 392
2)The second source of the duplication is the block for vertices, for instance declaring:
block 300 vertex all in Volume 1
Even if adding vertices one by one like this:
block 300 vertex 159 161 160 162
It generates 4 edges with a single vertex (this was tested by a piece of code for searching edges).
If one adds one more vertex:
block 300 vertex 159 161 160 162 163
5 edges are generated. Therefore I think that for some reason the explicit addition of vertices in block sets generate zero length edges one for each vertex.
This is still ongoing work, however I think that the solution for this is to add the curves to the cutting surface sideset and to delete all root edges that are irrelevant to the volume and to the cutting surface.
According to these observations, no need for explicit check of meshsets is needed since the only duplicated edges generated are the zero length edges that play no role for initiating an analysis.
Please let me know your thoughts.
All best,
Ignatios