< 2FeRed's Conundrum of Life :: [아바쿠스 스크립트] 노드의 최대 최소변형량 찾기 -파이썬 스크립트-


실행: abaqus viewer noGUI=mycode.py

제작자: Yinghui Tian
출처: http://yhtian.blogspot.com


import odbAccess
odb = session.openOdb('EB.odb')
Pipenode = odb.rootAssembly.instances['PART-1-1'].nodeSets['PIPENODE']
MaxU = range(101)
MinU = range(101)
MaxW = range(101)
MinW = range(101)
for i in range(101):
MaxU[i] = 0.0
MinU[i] = 0.0
MaxW[i] = -100.0
MinW[i] = 0.0
OutDispfile = open('DispEnvEB.txt','w+')
OutDispfile.write("Node ")
OutDispfile.write("MinU ")
OutDispfile.write("MaxU ")
OutDispfile.write("MinW ")
OutDispfile.write("MaxW\n")
i = 0
while (i<=2000):
print i
timeframe = odb.getFrame(i)
dispp = timeframe.fieldOutputs['U']
j = 0
for v in dispp.values:
print j
if (v.data[0] >= MaxU[j]):
MaxU[j] = v.data[0]
if (v.data[0] <= MinU[j]):
MinU[j] = v.data[0]
if (i >200):
if (v.data[2] >=MaxW[j]):
MaxW[j] = v.data[2]
if (v.data[2] <=MinW[j]):
MinW[j] = v.data[2]
j = j + 1
i = i + 1
for i in range(101):
OutDispfile.write(str(i+1))
OutDispfile.write(" ")
OutDispfile.write(str(MinU[i]))
OutDispfile.write(" ")
OutDispfile.write(str(MaxU[i]))
OutDispfile.write(" ")
OutDispfile.write(str(MinW[i]))
OutDispfile.write(" ")
OutDispfile.write(str(MaxW[i]))
OutDispfile.write("\n")
OutDispfile.close()
아름다운 인터넷 문화를 위해 댓글을 남겨주세요. -0-;
AND