加载中…
个人资料
长安CAE
长安CAE
  • 博客等级:
  • 博客积分:0
  • 博客访问:15,925
  • 关注人气:773
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

Abaqus 利用FindAt函数根据坐标查找点

(2016-05-14 13:48:52)
标签:

abaqus

python

findat

分类: Abaqus技术及二次开发
    在ANSYS中可以通过坐标来选取对象,Abaqus虽说没有ANSYS那么方便,但是也还是可以实现的,主要是通过findAt函数,可以选择cell(体)、face(面)、edge(边)和vertex(顶点)。
   findAt(): This method returns the object or objects in the VertexArray located at the given coordinates.
   findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any Vertex object that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is found, findAt uses the tolerance for imprecise geometry (applicable only for imprecise geometric entities).
    findAt will always try to find objects among all the vertices in the part or assembly instance and will not restrict itself to a subset even if the VertexArray represents such subset.
    Required argument:coordinates A sequence of Floats specifying the X-, Y-, and Z-coordinates of the object to find.
    findAt returns either a Vertex object or a sequence of Vertex objects based on the type of input.
    If coordinates is a sequence of Floats, findAt returns the Vertex object at that point.If you omit the coordinates keyword argument, findAt accepts as arguments a sequence of sequence of floats in the     following format:

verts = v.findAt(((20.19686, -169.513997, 27.798593), ),
                 ((19.657627, -167.295749, 27.056402), ),
                 ((18.274129, -157.144741, 25.15218), ))
Return value:A Vertex object or a sequence of Vertex objects.

实例:

######选择一个点施加集中力
a1 = mdb.models['Model-1'].rootAssembly
v1 = a1.instances['Part-1-1'].vertices
verts1 = v1.findAt(((5.0,5.0,200.0),))
region = a1.Set(vertices=verts1, name='Set-2')
mdb.models['Model-1'].ConcentratedForce(name='Load-1', createStepName='Step-1', 
    region=region, cf3=1000.0, distributionType=UNIFORM, field='', 
    localCsys=None)

######选择两个点施加集中力
a1 = mdb.models['Model-1'].rootAssembly
v1 = a1.instances['Part-1-1'].vertices
verts1 = v1.findAt(((5.0,5.0,200.0),),((5.0,-5.0,200.0),))
region = a1.Set(vertices=verts1, name='Set-2')
mdb.models['Model-1'].ConcentratedForce(name='Load-1', createStepName='Step-1', 
    region=region, cf3=1000.0, distributionType=UNIFORM, field='', 
    localCsys=None)

#####选择四个点施加集中力
a1 = mdb.models['Model-1'].rootAssembly
v1 = a1.instances['Part-1-1'].vertices
verts1 = v1.findAt(((5.0,5.0,200.0),),((5.0,-5.0,200.0),),((-5.0,-5.0,200.0),),((-5.0,5.0,200.0),))
region = a1.Set(vertices=verts1, name='Set-2')
mdb.models['Model-1'].ConcentratedForce(name='Load-1', createStepName='Step-1', 
    region=region, cf3=1000.0, distributionType=UNIFORM, field='', 
    localCsys=None)


0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有