Conforming embedded 1D mesh in 3D volume with Netgen OCC?

Hey there,

I’m working on a coupled 1D-3D problem (heat exchange between a pipe and
surrounding soil). I need to embed a 1D edge inside a 3D box and have a
conforming mesh where pipe vertices are also vertices of the tetrahedra.

I tried using Glue([box, pipe]) but the resulting mesh is not conforming.
The attached script shows:

  • Only 2/4 pipe vertices are in VOL elements (the endpoints that happen to
    lie on box faces)
  • Interior pipe vertices float inside the volume with no connection to tets
  • 0/3 pipe edges are tet edges
  • Trace().Trace() integration fails because of the missing topological
    connections

I looked for Fragment() or Embed() operations like in Gmsh but couldn’t
find them in Netgen OCC. Fuse() and Compound() cause segfaults when
combining a solid with an edge.

Is there a way to get a conforming embedded 1D-in-3D mesh using Netgen OCC?
Or do I need to use Gmsh and import the mesh?

Best,

Camilo

conforming_mesh_comparison.py (5.8 KB) its been brought to my attention that I forgot to attach my snippet! here it is :slight_smile: