【问题标题】:How can I extract, edit and replot a data matrix in Abaqus?如何在 Abaqus 中提取、编辑和重新绘制数据矩阵?
【发布时间】:2021-01-05 18:30:48
【问题描述】:

下午好,

我们一直在研究一个动物模型(头骨),该模型在 Abaqus 中应用一系列力并评估产生的应力。我们得到了一些美丽多彩(蓝到红)等高线图。现在,我们想要获得一个相似的图像,但由一个新矩阵着色,这将是一些数学变换的结果。

那么,我如何提取用于设置这些颜色模式的数据矩阵(我猜是 X-、Y-、Z- 和 von Mises 值左右),应用我的转换,然后 重新绘制数据以获得新的(可比较)具有新值的图形

非常感谢,祝您有美好的一天!

【问题讨论】:

  • 欢迎来到 StackOverflow!如果回答您的问题,请将答案标记为“已接受”,否则请添加 cmets。

标签: matrix transformation contour abaqus stress


【解决方案1】:

我自己从来没有做过,但我知道这是可能的。您可以从文档开始(例如 herehere)。

在使用 GUI 进行实验后,您可以查看相应的 Python 代码,这些代码应该会自动记录在您的工作目录(或 C:\temp)的 abaqus.rpy 文件中。努力工作,你可能会得到类似的东西:

myodb = session.openOdb('my_fem.odb') # or alternatively `session.odbs['my_fem.odb']` if it is already loaded into the session

# Define a temporary step for accessing your transformed output
tempStep = myodb.Step(name='TempStep', description='', domain=TIME, timePeriod=1.0)

# Define a temporary frame to storeyour transformed output
tempFrame = tempStep.Frame(frameId=0, frameValue=0.0, description='TempFrame')

# Define a new field output
s1f2_S = myodb.steps['Step-1'].frames[2].fieldOutputs['S'] # Stress tensor at the second frame of the 'Step-1' step
s1f1_S = myodb.steps['Step-1'].frames[1].fieldOutputs['S'] # Stress tensor at the first frame of the 'Step-1' step
tmpField = s1f2_S - s1f1_S

userField = tempFrame.FieldOutput(
    name='Field-1', description='s1f2_S - s1f1_S', field=tmpField
)

现在,要使用 python 显示新的字段输出,您可以执行以下操作:

session.viewports['Viewport: 1'].odbDisplay.setFrame(
    step='TempStep', frame=0
)

有关使用的方法和对象的更多信息,您可以查阅文档“Abaqus Scripting Reference Guide”:

  • Step(): Odb 命令 -> OdbStep 对象 -> Step();
  • Frame(): Odb 命令 -> OdbFrame 对象 -> Frame();
  • FieldOutput object: Odb 命令 -> FieldOutput 对象;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-05
    • 2020-12-13
    • 2021-02-13
    • 1970-01-01
    • 2014-03-16
    • 2019-11-06
    • 2023-03-09
    • 1970-01-01
    相关资源
    最近更新 更多