繁体   English   中英

如何在 abaqus 中使用 python 脚本找到“最小特征值”oa 板?

[英]how can i find “smallest eigenvalue” o a plate with python scripting in abaqus?

我写了一个python脚本来建模和分析一个板的屈曲。 我需要最小特征值来运行其他脚本进行 RIKS 分析。 如何在 abaqus 中使用 python 脚本找到“最小特征值”?

foo = [3,1,4,5]
print min(foo)

outputs => 1
datFullPath = PathDir+FileName+'.dat'


myOutdf = open(datFullPath,'r')
stline=' MODE NO      EIGENVALUE\n'
lines = myOutdf.readlines()

ss=0

for i in range(len(lines)-1):
    if lines[i] == stline :
        print lines[i]
        ss=i

f1=lines[ss+3]
MinEigen=float(f1[15:24])
myOutdf.close()

MinEigen
# Import abaqus odb work related modules

from odbAccess import *

# Read the odb file, change name and path as per your requirement
### This is a typical procedure to read history-outputs, as
### frequency etc. information is not available as field output

odb = openOdb(path =JobName+'.odb')

a=odb.rootAssembly
step=odb.steps['Step-1']
frames=step.frames
numframes=len(frames)
i=0

MinEigen=[]


for frame in frames :
    f1=frame.description
    if len(f1[28:48])>1:
        MinEg=float(f1[28:48])
        if MinEg>0.0:
            MinEigen.append (MinEg)


print MinEigen,min(MinEigen)


fwall=open("EIGENX.txt", 'a')
fwall.write(str(min(MinEigen))+'\n')
fwall.close()

odb.close()
##stop

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM