#!/user/bin/python # -* - coding:UTF-8 -*- # 文件名:simple_beam_Example.py # 运行该脚本将自动实现悬臂梁在压力荷载作用下的建模、提交分析和后处理 # 等各方面的操作。 from abaqus import * import testUtils testUtils.setBackwardCompatibility() from abaqusConstants import * # 写欢迎语 print '亲爱的读者朋友,很高兴认识大家!' print '下面通过最熟悉的简单实例,带领大家进入Python编程的奇妙世界!' #建立模型 myModel = mdb.Model(name='Beam') # 创建新视口来显示模型和分析结果。 myViewport = session.Viewport(name='Cantilever Beam Example', origin=(20, 20), width=150, height=120) # 导入part模块。 import part # 创建基础特征的草图。 mySketch = myModel.ConstrainedSketch(name='beamProfile', sheetSize=250.)
if __name__ == "__main__": from model_geometry import * from generic_crack_functions import * from rectangular_topology import * #from rectangular_seeds import * from abaqus import * from abaqusConstants import * from caeModules import * import testUtils testUtils.setBackwardCompatibility() import part, material, section, assembly, step, interaction import regionToolset, displayGroupMdbToolset as dgm, mesh, load, job import inpReader import math import os, shutil # for creating folders and moving files from pprint_table import * modelBaseName = 'McClung' seedIndex = 1 E = 30e6 # psi nu = 0.3 referenceStress = 40e3 # psi alpha = 0.5 runJob=False runElastic=True runPlastic=True nan = float('nan')