如何在没有图形用户界面和数据库模型的情况下使用abaqus cae?

2024-04-25 16:51:38 发布

您现在位置:Python中文网/ 问答频道 /正文

如何在没有图形用户界面的情况下运行Abaqus cae,但在命令行中使用模型数据库(cae文件)和python脚本?
我尝试了这个命令:
abaqus cae database=test.cae script=test2.py,它运行良好,但具有图形用户界面,但我正在尝试两个命令:

  1. abaqus cae数据库=test.cae noGUI=test2.py
  2. abaqus cae noGUI=test2.py--test.cae

而且它们不起作用, 有人能帮我吗


Tags: 文件命令行py模型test命令脚本数据库
1条回答
网友
1楼 · 发布于 2024-04-25 16:51:38

第二个命令应该提供您要查找的行为。您没有描述运行它时会发生什么,但我假设您的脚本失败了,因为它可能依赖于已经加载的CAE文件。在第二个场景中,您需要自己加载CAE文件。这来自Abaqus脚本参考手册-Python命令,位于Mdb部分:

Abaqus mdb.openMdb documentation

脚本可以使用以下方法:

import sys
from abaqus import *

# Get the cae file path and name from the last command line argument
cae_file_path = sys.argv[-1]

openMdb(cae_file_path)

# And then find the appropriate model in mdb.models, your key may be different
# and may need to be also supplied from the command line if it changes between
# CAE files
model = mdb.models['Model-1']

相关问题 更多 >

    热门问题