Abaqus批量提交作业

# -*- coding: utf-8 -*-
from abaqus import *
from abaqusConstants import *
import os
import time


def clean_residual_files(job_name):
    """清理残留文件函数"""
    residual_ext = ['.lck', '.prt', '.sim', '.sta', 
                   '.abq', '.com', '.dat', '.msg','.odb',
                   '.log', '.odb', '.inp']
    for ext in residual_ext:
        file_path = job_name + ext
        if os.path.exists(file_path):
            try:
                os.remove(file_path)
                print("Residual files have been cleaned up: %s" % file_path)
            except Exception as e:
                print("Failed file cleanup: %s - %s" % (file_path, str(e)))


# 作业列表与参数配置
jobs = [] 

以下内容为付费内容,请购买后观看

批量提交作业,每个作业提交时会给出一个当前时间,运算完会给出一个结束时间,最后全部计算完了会给出一个总耗时。

App下载
技术邻APP
工程师必备
  • 项目客服
  • 培训客服
  • 平台客服

TOP