Abaqus:选择表面元素的脚本 [英] Abaqus: script to select elements on a surface

查看:96
本文介绍了Abaqus:选择表面元素的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个 Abaqus/Python 脚本,该脚本将选择属于"某个面的所有元素.IE.取所有与网格立方体的一个面有连接的元素(稍后我将计算作用在该面上的总力,以获得力-位移或应力-应变曲线).

I am trying write an Abaqus/Python script that will select all the elements that "belong" to a certain face. I.e. taking all the elements that have a connection to one face of a meshed cube (I will calculate the total force acting on that face for force-displacement or stress-strain curves later).

如果我使用 GUI 进行操作,我会得到:

If I do it using the GUI I get:

mdb.models['Model-1'].rootAssembly.Set(elements=
  mdb.models['Model-1'].rootAssembly.instances['Part-1-1'].elements.getSequenceFromMask(
    mask=('[#0:5 #fff80000 #ff #f #ffe00000 #f000000f #3f', 
          ' #0:6 #fffe #c0003f00 #3 #3fff8 #ffc00 ]', ), ), name='Set-1')

但是,getSequenceFromMask 在一般情况下不起作用.我尝试使用 findat 没有运气.

But, getSequenceFromMask does not work in a general case. I tried using findat with no luck.

有没有办法做到这一点?

Is there a way to do that?

推荐答案

在零件或装配体上定义面集:

define a face set on the part or assembly:

  part.Set('facename',faces=part.faces.findAt(((1,0,0),),))

其中 (1,0,0) 是面部任意位置的坐标.(不要在边缘/角落使用点)

where (1,0,0) is a coordinate anywhere on the face. (Don't use a point on a edge/corner though)

然后在网格划分后,您可以访问附加到该面的元素,例如:

then after meshing you can access the elements attached to that face, something like:

  instance.sets['facename'].elements

请注意,如果您想在运行分析后在 odb 上获取这些元素,则略有不同:

note if you want to get those elements on the odb after running an analysis it is a little different:

  instance.elementSets['FACENAME'].elements

注意集合名称在 odb 上大写..

note that the set name is upcased on the odb..

这篇关于Abaqus:选择表面元素的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆