×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Scripting: Create a set encompassing all edges of a part

Scripting: Create a set encompassing all edges of a part

Scripting: Create a set encompassing all edges of a part

(OP)
Hi

I've written a script that imports polygonial 2D parts, creates the instances of them, seeds and meshes them.
Next step is to get a handle on the nodes that are on the edges of the part.
Is there a way to script: "Get all edges of part X; add them to set Y"?
I can do this manually, but I'm drawing a blank when trying to formulate it in a way that can be scripted for multiple parts and models.

Any ideas?
Thanks in advance
R. Mettier

RE: Scripting: Create a set encompassing all edges of a part

(OP)
Hmmm...maybe nobody knows. Maybe I just didn't phrase it in an understandable way. Let me try again:

What I'm trying to to, is build an interface system between a Matlab tool and ABAQUS. The Matlab tool will provide a variable number of 2D polygons. It then writes a python script for abaqus, telling ABAQUS how to import these polygons as parts, add them to the model, mesh them etc.

I've got as far as creating the instances and meshing the individual parts. But now, because these parts are in contact with each other, I'm trying to figure out how to define the surfaces of the part in order to set up the interface criteria in ABAQUS. The interfaces will be fairly simple at first, basically a choice of frictionless or totally joined.

I thought, the best way would be to define a set for each part, consisting of all the nodes on the edges of each part, but this seems to be harder than I expected. Maybe there's another solution. I'd appreciate any hints here.

With my Set approach, I've studied the .rec file, and when I chose the edges by Hand, I contains this:

mdb.models['Model-1'].rootAssembly.Set(edges=
    mdb.models['Model-1'].rootAssembly.instances['partone-1'].edges.getSequenceFromMask(
    ('[#f ]', ), ), name='Setone')

I assume 'getSequenceFromMask' means that if should get the info about which edges to use, from the User Interface. But if I want it scripted, that obviously won't work. I can't find anything about 'getSequenceFromMAsk' in the scripting manuals. MAybe someone could give me a headsup here?

Thanks in Advance

R.Mettier

RE: Scripting: Create a set encompassing all edges of a part

Use this command in Abaqus:

session.journalOptions.setValues(replayGeometry=COORDINATE,
recoverGeometry=COORDINATE)

This will enable you to see non-masked output in rec, rpy, and jnl files.

RE: Scripting: Create a set encompassing all edges of a part

(OP)
Thanks, that helped. I can now calculate a center point for each edge, and then tell ABAQUS to select the nearest edge to that point.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources