[英]How to output the time of each frame in ABAQUS through Python
I want to output Total Time/Freq in Abaqus to monitor Job.我想在 Abaqus 中输出 Total Time/Freq 来监控 Job。 Recently, I can output the maximum stress at every frame.
最近,我可以在每一帧输出最大的压力。 Now, I want to know how to output frame time.
现在,我想知道如何输出帧时间。
for step in odb.steps.values():
# print('Processing Step:', step.name)
for frame in step.frames:
allFields = frame.fieldOutputs
if (allFields.has_key(Stress)):
isStressPresent = 1
stressSet = allFields[Stress]
if elemset:
stressSet = stressSet.getSubset(
region=elemset)
for stressValue in stressSet.values:
if (stressValue.mises > maxMises):
maxMises = stressValue.mises
juli = stressValue.magnitude
maxElem = stressValue.elementLabel
maxStep = step.name
maxFrame = frame.incrementNumber
if (isStressPresent):
zydatalist.append([maxFrame,juli, maxMises, maxElem])
It is not possible to get the time elapsed till the current frame directly.无法直接获取到当前帧所经过的时间。 To get it, we need 2 information viz.
要得到它,我们需要 2 个信息,即。
totalTime
and frameValue
. totalTime
时间和frameValue
。
totalTime
- This is the analysis time spend in all the steps previous to the start of this step. totalTime
- 这是在此步骤开始之前的所有步骤中花费的分析时间。
frameValue
- This is the time for the current frame in current step. frameValue
- 这是当前步骤中当前帧的时间。
So, the time elapsed till the current frame can calculated as, timeCurrent = totalTime + frameValue
.因此,直到当前帧经过的时间可以计算为
timeCurrent = totalTime + frameValue
。
step = odb.steps['Step-1']
t1 = step.totalTime # time till the 'Step-1'
for frame in step.frames:
tinst = frame.frameValue # time for the frame in the current step
tcurrent = t1 + tinst
print('Total time for the frame', tcurrent)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.