许可优化
许可优化
产品
产品
解决方案
解决方案
服务支持
服务支持
关于
关于
软件库
当前位置:服务支持 >  软件文章 >  abaqus利用Python实现部件合并:在Abaqus Python中用Element()构造函数创建部件元素

abaqus利用Python实现部件合并:在Abaqus Python中用Element()构造函数创建部件元素

阅读数 5
点赞 0
article_banner

我不能用Abaqus中Part对象的Element()构造函数创建元素。Node()构造函数没有问题,但是当您尝试使用以前生成的节点创建元素时,它会向您显示以下错误警告:

在运行脚本之前,部件网格在Abaqus CAE树(part Recuadro)中显示为空,运行脚本后不再为空,因此我知道网格已经生成。在

这是我的剧本:import sys

import mesh

import part

from abaqus import *

from odbAccess import *

from abaqusConstants import *

from caeModules import *

from driverUtils import executeOnCaeStartup

#

# Función que da el número del nodo en función de las fila y columna de elementos

#

def nnodo(i,j,ne):

n = (2*ne+1)*(i-1)+j

return n

filecae= 'E:\ESI\Fatiga\Cotacto Cilindrico\ABQ\CC-Crack-0.cae'

openMdb(filecae)

# Coordenadas del arranque de la grieta en "Recuadro"

x0 =0.0

y0 = -0.002

z0 = 0.0

delta=[0]

# Dimensiones del recuadro x € [x0-a,x0+a] y € [y0-b, y0]

a=0.2

b=0.2

# Tamaño deseado de los elementos ~ le x le

le = 0.05

# Tamaño inicial de los elementos ~ dx x dy

Nex = 2*int(a/le)

Ney = int(b/le)

Nnx = 2*Nex+1

Nny = 2*Ney+1

dx = 2*a/Nex

dy = b/Ney

Nnodos = Nnx*Nny

Nelems = Nex*Ney

inod = range(Nnodos-1)

ielm = range(Nelems-1)

for i in range(Nny):

delta.append(0)

# Coordenadas de los nodos de la malla inicial

recuadro=mdb.models['P22'].parts['Recuadro']

recuadro1=mdb.models['P22'].rootAssembly.instances['Recuadro-1']

recuadro.generateMesh(regions=(recuadro.faces[0],))

for i in range(1,Nny+1):

dx1 = (Nex*dx/2 - delta[i])/Nex

dx2 = (Nex*dx/2 + delta[i])/Nex

y = y0 - (i-1)*dy/2

for j in range(1,Nnx+1):

if float(i)/2. <> int(float(i)/2. ) or float(j)/2. <>int(float(j)/2. ):

k = (2*Nex+1)*(i-1)+j

if j<=Nex+1:

x = x0 - Nex*dx/2 + (j-1)*dx1

else:

x = x0 - delta[i] + (j-Nex-1)*dx2

recuadro.Node(label = k, coordinates=(x, y, 0.))

# Conectividades de los elementos de la malla inicial

for i in range(1,Ney+1):

for j in range(1,Nex+1):

k = Nex*(i-1)+j

n1 = recuadro.nodes[nnodo(2*i+1, 2*j-1, Nex)]

n2 = recuadro.nodes[nnodo(2*i+1, 2*j , Nex)]

n3 = recuadro.nodes[nnodo(2*i+1, 2*j+1, Nex)]

n4 = recuadro.nodes[nnodo(2*i , 2*j+1, Nex)]

n5 = recuadro.nodes[nnodo(2*i-1, 2*j+1, Nex)]

n6 = recuadro.nodes[nnodo(2*i-1, 2*j , Nex)]

n7 = recuadro.nodes[nnodo(2*i-1, 2*j-1, Nex)]

n8 = recuadro.nodes[nnodo(2*i , 2*j-1, Nex)]

recuadro.Element(label = k, elemShape= QUAD8, nodes=(n1, n2, n3, n4, n5, n6, n7, n8))


免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删

相关文章
QR Code
微信扫一扫,欢迎咨询~
customer

online

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

* 公司名称:

姓名不为空

姓名不为空

姓名不为空
手机不正确

手机不正确

手机不正确
公司不为空

公司不为空

公司不为空