简体   繁体   English

如何通过Python输出ABAQUS中每一帧的时间

[英]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.

相关问题 在abaqus中,如何在不选择对象的情况下输出每个时间点的最大应力值 - In abaqus, how to output the maximum stress value at each time point without selecting an object 如何在 ABAQUS Python 中请求能量场输出 - How to request energy field output in ABAQUS Python 如何在Abaqus Python脚本的历史输出定义中定义历史区域? - How to define history region in history output definition for Abaqus Python scripting? 如何在ABAQUS Python脚本中请求节点应力输出 - How to request nodal stress output in ABAQUS Python script 如何减少程序在 Abaqus python 中的运行时间? - How can i reduce the running time of the program in Abaqus python? Python:每次通过for循环唯一CSV output - Python: Unique CSV output each time through for loop 初学者:Python--如何将 elif 语句嵌入到 while 循环中(每次通过循环都会改变 output 的路线?!) - BEGINNER: Python--How to embed elif statements into a while loop (that changes the route of output each time through the loop?!) 如何遍历时间范围? - How to iterate through a time frame? Abaqus python脚本:如何在odb中添加向量场输出及其结果值 - Abaqus python scripting: How to add a vector field output with their resultant values in an odb 如何在abaqus / cae和abaqus / viewer模式下使用abaqus python脚本查询零件的体积信息? - How do i query the parts' volume information with abaqus python script in abaqus/cae and abaqus/viewer mode?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM