当前位置:服务支持 >  软件文章 >  Abaqus Python利用getByBoundingCylinder创建单元集

Abaqus Python利用getByBoundingCylinder创建单元集

阅读数 6
点赞 0
article_banner

1 命令解释

命令解释:返回包含在指定空间圆柱中的几何元素或者网格元素的对象序列 ,下面是帮助文档中对于这个命令的解释:

getByBoundingCylinder(...)

This method returns an array of element objects that lie within the specified bounding cylinder.

Required arguments

center1

A tuple of the X-, Y-, and Z-coordinates of the center of the first end of the cylinder.

center2

A tuple of the X-, Y-, and Z-coordinates of the center of the second end of the cylinder.

radius

A float specifying the radius of the cylinder.

Optional arguments

None.

Return value

MeshElementArray object, which is a sequence of MeshElement objects.

主要就是指定圆柱体的上下端面的圆心以及半径,返回的是elemets编号序列。

在学习的时候被网上的帖子和帮助文档误导(其实是新新手的缘故),命令老写成这个样子:

elist = e.getByBoundingCylinder(7,6,0,7,6,20,5.8)
# 正确命令:
elist = e.getByBoundingCylinder(center1=(7,6,0),center2=(7,6,20),radius=5.8)
abaqus python 二次开发攻略 P195,P196
abaqus 用户帮助文档

2 简单案例

案例简介:选取多个圆柱体框中的单元并创建为集合。

具体命令:

################################
# 可以运行#######
from abaqus import*
from abaqusConstants import*
p = mdb.models['Model-3'].parts['Part-1']
e = p.elements
elist_I = e.getByBoundingCylinder(center1=(7,6,0),center2=(7,6,20),radius=5.8) 
elist = elist_I
elist_I = e.getByBoundingCylinder(center1=(21,6,0),center2=(21,6,20),radius=5.8)
elist = elist+elist_I
p.Set(elements=elist,name='Set-matrix')
print(type(elist)) # <type 'Sequence'>
abaqus-python 利用getByBoundingCylinder(...)创建单元集合的图1
abaqus-python 利用getByBoundingCylinder(...)创建单元集合的图2

这就是运行结果。

希望可以帮助到各位,若有错误请多多指教!


免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删
相关文章
QR Code
微信扫一扫,欢迎咨询~

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 155-2731-8020
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

手机不正确

公司不为空