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!

Find the ID for faces.getSequenceFromMask

Status
Not open for further replies.

SM1994

Bioengineer
Mar 25, 2020
49
Hi
I have a cylinder with pockets in it, then use script to generate new pockets in different plane angels. The problem that I have, I do not know what is face ID for the new generated surfaces? since in the GUI I manually select the faces and it gives
"mdb.models['Model-1'].rootAssembly.instances['CylnderPart-1'].faces.getSequenceFromMask(
('[#80000c00 #1800003 #3000 ]', ), )) "

but, when I generate the pockets in the code, I do not know how to define the new surfaces the pressures wants to be applied on it.

Doe anyone know how to define a new face in the code and use it for applying the pressure?
 
Replies continue below

Recommended for you

Thanks for your response.
It works in general, but I could not use due to uncertainty in the values.

I have a cylinder, there are 4 pockets at 90 degree and 2 pockets at 45 and 135 degress. (image attached)
I want to define the surface for them, when I use the rpy file it gives the follwing:

a = mdb.models['Model-1'].rootAssembly
s1 = a.instances['CylnderPart-1'].faces
side1Faces1 = s1.findAt(((85.0, 7.594024, 21.0), ), ((-85.0, -7.574919,
20.461667), ), ((-65.460353, 54.7478, 20.461667), ), ((-7.511319, 85.0,
22.117717), ), ((-54.7478, -65.460353, 20.461667), ), ((7.449653, -85.0,
19.526271), ))


but I expect to get the following code work: (note that 0.785398 is the RAD of 45 DEG and I am assuming that it is (x,y,z)
Tsin=85*sin(0.785398)
Tcos=85*cos(0.785398)

s1 = a.instances['CylnderPart-1'].faces
side1Faces1 = s1.findAt(((85.0, 0, 21.0), ), ((-85.0, 0,
21), ), ((-1*Tcos, Tsin, 21), ), ((0, 85.0,
21), ), ((-1*Tsin, -1*Tcos,21), ), ((0, -85.0,
21), ))
region = a.Surface(side1Faces=side1Faces1, name='Surf-12')
mdb.models['Model-1'].Pressure(name='Load-1', createStepName='Step-1',
region=region, distributionType=UNIFORM, field='', magnitude=1.0,
amplitude=UNSET)

but when I use this command, it does not generate the load for the surfaces at 45Deg and 135 Deg.

Do you have any suggestion how to resolve it?

Thanks for your help
 
 https://files.engineering.com/getfile.aspx?folder=ca549deb-d5c4-4f89-94b9-b1bd71668322&file=Untitled.png
Thank you, There was a problem with the coordinates, which has been resolved.
Thanks for the solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor