Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

rmettier

Geotechnical
Oct 6, 2006
63
0
0
CH
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
 
Replies continue below

Recommended for you

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
 
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.
 
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.
 
Status
Not open for further replies.
Back
Top