如何在 ABAQUS Python 脚本中请求节点应力输出 [英] How to request nodal stress output in ABAQUS Python script

查看:148
本文介绍了如何在 ABAQUS Python 脚本中请求节点应力输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要 odb 中的节点应力.我知道我可以简单地在可视化模块中生成一个查询,因此可以获得平均节点压力(我认为在分析后执行它不会有用,我不能在 odb 中这样做,因为没有节点应力信息).我还可以编辑输入文件并在元素输出中使用 Position = NODES,然后通过调用输入文件作为源来运行分析.它使用节点数据生成应力,然后每个节点都有对应于每个元素的多个应力值.我还对脚本中的这些值进行了平均,就像在可视化模块中所做的那样.但是现在我需要为多个模拟自动化这个脚本,我唯一卡住的地方是请求下一次迭代的节点输出.我不知道在输入文件中写入的 Position = NODES 的等效 python 命令是什么.我不能继续调用相同的输入文件,因为下一次模拟的节点位置与早期模型不同.关于我该如何去做的任何想法?

I need nodal stresses in the odb. I am aware that I can simply generate a query in the visualization module and therefore can obtain the averaged nodal stress (which I dont think will be of use as its performed after the analysis and I cannot do that in the odb as there is no nodal information for stresses). I can also edit the input file and use Position = NODES in the element output and then running the analysis by calling the input file as source. It generates stresses with nodal data and then every node has multiple stress values corresponding to every element. I have also averaged out those values in the script as its done in the visualization module. But now I need to automate this script for multiple simulations and the only place I am stuck is the to request the nodal output for the next iteration. I dont know whats an equivalent python command for Position = NODES which is written in the input file. I cannot keep calling the same input file as my nodal position for the next simulation is different that earlier model. Any thoughts on how do I go about it?

推荐答案

这是一个编写关键字编辑器脚本的示例.诀窍是您需要搜索现有关键字并在此之前或之后插入新文本.

Here's an example scripting the keyword editor. The trick to it is you need to search for an existing keyword and insert your new text before or after that.

model.keywordBlock.synchVersions()
def GetBlockPosition(model,blockPrefix):
 pos = 0
 for block in model.keywordBlock.sieBlocks:
  if string.lower(block[0:len(blockPrefix)])==string.lower(blockPrefix):return pos
  pos=pos+1
 return -1
model.keywordBlock.insert(GetBlockPosition(model,'*Restart')-1, """
*EL FILE,POSITION=AVERAGED AT NODES
S
""")

这是在创建/提交作业之前的最后一件事.

Do this as the very last thing before creating/submitting the job.

这篇关于如何在 ABAQUS Python 脚本中请求节点应力输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆