Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

define new Set 1

Status
Not open for further replies.

Matterhorn

Mechanical
Apr 19, 2015
14
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)
 
Replies continue below

Recommended for you

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.
 
Ok thanks. But how can I create an element set with the boundingbox?
I don't get it..
 
How about searching for "getByBoundingBox" in the Scripting Reference Manual and checking the results?
 
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
))
 
Please guys. Every help is very much appreciated since I have my next meeting in 9h. I know you know the solution, please.
 
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.
 
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')
 
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.
 
 http://files.engineering.com/getfile.aspx?folder=2a04ab05-e100-437e-ab19-4cdada11e421&file=help.png
here is the photo from the link.
Would be very glad if you can help me! Thanks in advance!
help_cs5zss.png
 
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!
 
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.
 
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.
 
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.
 
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)
 
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?
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor