【问题标题】:How can I use abaqus cae without graphical user interface and with a database model?如何在没有图形用户界面和数据库模型的情况下使用 abaqus cae?
【发布时间】:2020-03-23 09:34:14
【问题描述】:

如何在没有图形用户界面的情况下运行 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

而且它们不起作用, 任何人都可以帮助我吗?

【问题讨论】:

    标签: python abaqus


    【解决方案1】:

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

    您的脚本可以使用它的一种方式:

    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']
    

    【讨论】:

      猜你喜欢
      • 2011-03-06
      • 1970-01-01
      • 1970-01-01
      • 2013-12-08
      • 1970-01-01
      • 1970-01-01
      • 2014-10-24
      • 1970-01-01
      • 2012-10-14
      相关资源
      最近更新 更多