How can I create a mesh that can be changed without invalidating native sets in Abaqus?
<p>The nodesets I create "by feature edge" in Abaqus are invalidated if I change the mesh.
What are my options to prevent this from happening?</p>

<p>I am asking because I am trying to write a phython file in which to change the mesh as a parameter. That will not be possible if changing the mesh invalides the nodesets.</p>

<p>As usual, there is more than one way. </p>

<p>One technique, if you know the coordinates of some point on or near the edge(s) of interest, is to use the EdgeArray.findAt() method, followed with the Edge.getNodes() method to return the Node objects, and then defining a new set from them. You can use the following code for inspiration for other more complex methods you might dream up:</p>

<pre><code># Tested on Abaqus/CAE 6.12
# Assumes access from the Part-level (Assembly-level is similar):
p = mdb.models['Model-1'].parts['Part-1'] # the Part object
e = p.edges                               # an EdgeArray of Edge objects in the Part

# Look for your edge at the specified coords, then get the nodes:
e1 = e.findAt( coordinates = (0.5, 0.0, 0.0) ) # the Edge object of interest
e1_nodes = e1.getNodes()                  # A list of Node objects

# Specify the new node set:
e1_nset = p.SetFromNodeLabels( name='Nset-1', nodeLabels=[node.label for node in e1_nodes] )
</code></pre>

python mesh abaqus