In my project I am generating an Orphan Mesh of a fiber using a python generated inp file. This fiber is composed of inner wedges (C3D6) and outer bricks (C3D8). As it is an orphan mesh , I have had difficulties in defining the outer surface as I can´t use the usual side1Faces comand to create it like with a normal geometry. In a previous version , where the fiber was only made of wedge elements (C3D6) , I successfully selected the outer element faces of the wedge element and created a surface :
# Define the fiber outer surface using only Face 4 (S4) of the wedge elements.
all_fiber_elements = inst_fiber_mesh.elements
myAssembly.Surface(face4Elements=all_fiber_elements, name='Surf-Fibers-Outer')
fiber_outer_surface = myAssembly.surfaces['Surf-Fibers-Outer']
But now that I decided to improve the orphan mesh by introducing the outer C3D8 bricks , this does not work. I cannot simply use all the elements of the part , as otherwise I would select the outer face of both the C3D6 and the C3D8 elements.
I have attempted to isolate the C3D8 elements to only select their respective outer faces but this always fails with error message :
all_elements = inst_fiber_mesh.elements
outer_brick_elements = [elem for elem in all_elements if elem.type == C3D8R]
myAssembly.Surface(face2Elements=outer_brick_elements, name='Surf-Fibers-Outer')
fiber_outer_surface = myAssembly.surfaces['Surf-Fibers-Outer']
Besides this I tried different implementations , trying to use FaceFromElementFaces and trying to create a node list of the outer faces but this all failed. I am wondering if there is some comand or implementation method that went over my head , and I hope one of you guys could maybe know something more about this.
I am aware that I could use the mesh2geo plugin , but the problem is that I would like to keep this automatically generated mesh as it allows me to manually changhe the fineness and guarantee regular elements no matter the complexity of the geometry. While if I transformed it into a geometry I would lose the mesh and would have to mesh it using free tet , that would be undesirable for my project.
I really hope someone can help me out in finding a solution , but anyways thanks for taking the time to read this.
Respectfully,
Andrea Cernilogar
