×
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

define new Set

define new Set

define new Set

(OP)
Hi all,

I defined a new set on my aerofoil called setPiezo. Now when I run the script I get the error: "Unknown key setPiezo".
What am I doing wrong?
Thanks!

Best Matterhorn


code:

aeroAssembly.Set(
name='setPiezo',
nodes=
aeroInstance.nodes.getByBoundingBox(
-150, 0-dtol, 30.01,
-303.06, depthProfile+dtol, 22.56
))

# assign piezo section
partAerofoil.SectionAssignment(offset=0.0,
offsetField='', offsetType=MIDDLE_SURFACE,
region=partAerofoil.sets['setPiezo'],
sectionName='aerofoilPiezoSection', thicknessAssignment=FROM_SECTION)

RE: define new Set

You are creating a node set, but it is not possible to assign a shell section to nodes.

Try again by creating an element set with your bounding box.

RE: define new Set

(OP)
Ok thanks. But how can I create an element set with the boundingbox?
I don't get it..

RE: define new Set

How about searching for "getByBoundingBox" in the Scripting Reference Manual and checking the results?

RE: define new Set

(OP)
I searched in the manual and on google the whole day, but it didn't help me that much. getbyboundingbox says that you have type in your x,y,z maxs/mins.
I tried with the new code but it didn't work. I am sorry but I really don't know how to do it?

aeroAssembly.Set(
name='setPiezo',
elements=
aeroInstance.elements.getByBoundingBox(
-150, 0-dtol, 30.01,
-303.06, depthProfile+dtol, 22.56
))

RE: define new Set

(OP)
Please guys. Every help is very much appreciated since I have my next meeting in 9h. I know you know the solution, please.

RE: define new Set

(OP)
I now changed the code to:

aeroAssembly.Set(
name='setPiezo',
elements=
aeroInstance.elements.getByBoundingBox(
150, 0-dtol, 22.56,
303.06, depthProfile+dtol, 30.01
))

# assign piezo section
partAerofoil.SectionAssignment(offset=0.0,
offsetField='', offsetType=MIDDLE_SURFACE,
region=partAerofoil.sets['setPiezo'],
sectionName='aerofoilPiezoSection', thicknessAssignment=FROM_SECTION)


But now I get the error: "Unknown key SetPiezo". I guess its because I am defining the element setPiezo in aeroAssembly (Mesh) and not in partAerofoil (Part). What do you think?
Thanks in advance.

RE: define new Set

Here is a simple example how to create a set on part level. That's needed when you want to assign a section, since this is always done at part level.

CODE -->

p = mdb.models['Model-1'].parts['Part-x']
e = p.elements.getByBoundingBox(0,0,0,10,10,10)
p.Set(elements=e, name='Set-1') 

RE: define new Set

(OP)
Thanks for this. I already found this but I thought it wouldn't be helpful but it is.
So I put this in my command window of Abaqus. It adds a new set with the name 'Set-1' which is good, but when I click on it no red surface appears like when I click on the other sets...
This means that it only generates a new set with a name but doesn't assgin any element or points to it.

RE: define new Set

(OP)
here is the photo from the link.
Would be very glad if you can help me! Thanks in advance!

RE: define new Set

(OP)
I am very sorry I changed the name from 'Set-1' into 'blalb'... it's the set with the red bang. Do you know how I can resolve this?
Thanks!

RE: define new Set

When you have only geometry and no mesh, then it is impossible to find any elements in the bounding box. You should ask for faces instead.

RE: define new Set

(OP)
My supervisor told me that I have to do it with elements. I mean the aerofoil is meshed. Why should it not work?
I tried also to insert the code you gave me when I am in the 'mesh' module.

RE: define new Set

In your screenshot - click on the button that looks like a hex-meshed cube (below the "Plug-ins" option).

When you see a mesh, then the python command should work. When no mesh is displayed, then there is no mesh in the part. Maybe you've meshed the instance.

Then you have to switch the type of instance from "Independent" to "Dependent" and mesh the part.

RE: define new Set

(OP)
I don't see a mesh when I click on the hex-meshed cube. And yes you are right I've meshed the instance. But I have too many parts to just change the mesh on part instead of instance.
Before I was assigning the 'setPiezo' to faces, and these faces were also meshed.
So it is possible to make a set on a assembly?!
Or do I have to change the region=partAerofoil.sets['setPiezo'] into regoin=aeroAssembly.sets['setPiezo]?


aeroAssembly.Set(
name='setPiezo',
elements=
aeroInstance.elements.getByBoundingBox(
150, 0-dtol, 22.56,
303.06, depthProfile+dtol, 30.01
))

partAerofoil.SectionAssignment(offset=0.0,
offsetField='', offsetType=MIDDLE_SURFACE,
region=partAerofoil.sets['setPiezo'],
sectionName='aerofoilPiezoSection', thicknessAssignment=FROM_SECTION)

RE: define new Set

(OP)
I can see now the section on assembly sets in CAE. So I need to assign this:

partAerofoil.SectionAssignment(offset=0.0,
offsetField='', offsetType=MIDDLE_SURFACE,
region=partAerofoil.sets['setPiezo'],
sectionName='aerofoilPiezoSection', thicknessAssignment=FROM_SECTION)

to the set I defined in assembly. How can I do this?

RE: define new Set

As mentioned before, the section assignment needs to be done at part level. So you either collect the geometry faces with your bounding box or you have to mesh the part to use the elements.

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