Hello,
I have a Python script to re-define wires for connector sections. It more or less goes like this:
for section_assignment in src_asm.sectionAssignments: edge_vertices = list([edge.getVertices() for edge in section_assignment.getSet().edges][0]) edge_vertices = [src_asm.vertices[idx] for idx in edge_vertices] edge_vertices_coords = [vertex.pointOn[0] for vertex in edge_vertices] if len(edge_vertices_coords) == 2: new_asm.WirePolyLine(points=tuple(translated_edge_vertices_coords), meshable=False)
Later on, I define the ConnectorSection,
behaviorOptions = [] for i in range(1, 7): behavior_options_to_copy = section_obj.behaviorOptions[i-1] behavior_options = ConnectorElasticity( behavior=behavior_options_to_copy.behavior, components=[i], coupling=behavior_options_to_copy.coupling, dependencies=behavior_options_to_copy.dependencies, frequencyDependency=behavior_options_to_copy.frequencyDependency, table=behavior_options_to_copy.table, temperatureDependency=behavior_options_to_copy.temperatureDependency ) behaviorOptions.append(behavior_options) new_model.ConnectorSection(name=section_name, assembledType=BUSHING, behaviorOptions=behaviorOptions, defaultTolerance=ON, extrapolation=CONSTANT, integration=UNSPECIFIED, materialFlowFactor=1.0, regularization=0.03, regularize=ON, rotationalType=NONE, translationalType=NONE, )
as well as retrieve the edge created when these wires are created, define a Region out of them and use this to define both ConnectorOrientation and SectionAssignment.
for i, edge in enumerate(new_asm.edges): edge_feature_str = str(edge.featureName) num_section_assignment = int(edge_feature_str.split('-')[1]) % 40 index = edge.index edge_array = new_asm.edges[index:index+1] region = rts.Region(edges=edge_array) datum_id = list(new_asm.datums.keys())[i] new_asm.SectionAssignment( region=region, sectionName=src_asm.sectionAssignments[num_section_assignment].sectionName ) new_asm.ConnectorOrientation( region=new_asm.sectionAssignments[-1].getSet(), axis1=AXIS_1, axis2=AXIS_1, angle1=0.0, angle2=0.0, localCsys1=new_asm.datums[datum_id], localCsys2=new_asm.datums[datum_id], orient2sameAs1=True )
This works just fine, but when I then launch the job in Abaqus I get errors saying that for the CONN3D2 elements corresponding to the connector sections the connectivity is not defined. Basically, instead of the former, I have the latter in the .inp file. I checked in Abaqus/CAE the difference between features and the only thing that seems different is that for my features there is no parent feature, is this the problem? Any help would be greatly appreciated, thanks !
*Element, type=CONN3D2 1, PART-1-1.3355, PART-1-1.140824 *Connector Section, elset=_PickedSet841, behavior=ConnProp-1_CONNPROP-1_RAILPADCONNECTION-2-2-B-1-20 Bushing, PART-1-1-PART-1-1-RAILPADCONNECTION-2-2PT1ORIENTATION-1-20, *Element, type=CONN3D2 1, *Connector Section, elset=_PickedSet247, behavior=ConnProp-1_CONNPROP-1_CONNPROP-1_RAILPADCONNECTION-2-2-B-1-20 Bushing, PART-1_0_ConnProp-1_CONNPROP-1_CONNPROP-1_RAILPADCONNECTION-2-2-B-1-20, PART-1_0_ConnProp-1_CONNPROP-1_CONNPROP-1_RAILPADCONNECTION-2-2-B-1-20