用python批量建立abaqus材料时遇到 AbaqusNameError: 无效的名称?
materials = [ ]
path=r'D:\Abaqus\abaqus setup\jiaoben.txt'
with open(path,'r') as file:
line=file.readline()
while line:
materials.append(line.strip().split('\t'))
line=file.readline()
for i in range(len(materials)-1):
mdb.models['Model-1'].Material(name=materials[i+1][0])
mdb.models['Model-1'].materials[materials[i+1][0]].Density(table=((6450.0, ), ))
mdb.models['Model-1'].materials[materials[i+1][0]].Depvar(n=300)
mdb.models['Model-1'].materials[materials[i+1][0]].UserMaterial(
mechanicalConstants=(materials[i+1][1], materials[i+1][2],materials[i+1][3]))
print('material {} is created' .format(materials[i+1][0]))
运行时出现 AbaqusNameError: 无效的名称 ,这是咋回事呢?