龙洞风景区Abaqus/Python示例1
1. 案例说明
本案例来源于达索官网,旨在通过脚本访问每个模块,引导读者利用Python脚本完成Abaqus/CAE中GUI的建模过程,并展示创建和分析简单模型的基本步骤,随后分析梁并绘制产生的应力和位移。需要创建和分析的模型如图1 所示。
图1 悬臂梁模型示意图
2. 脚本介绍
# abaqus模块导入、常量模块导入
from abaqus import *
from abaqusConstants import *
backwardCompatibility.tValues(includeDeprecated=True,
reportDeprecated=Fal)
# 创建模型(首字母大写为构造函数)
# Create a model
# 根对象mdb
myModel = mdb.Model(name='Beam')
# Create a new viewport in which to display the model
# and the results of the analysis.
# 根对象ssion
myViewport = ssion.Viewport(name='Cantilever Beam Example', origin=(20, 20), width=150, height=120)
#-----------------------------------------------------
# part模块导入
import part
五四新文化运动# Create a sketch for the ba feature.
# 创建草图环境
mySketch = myModel.ConstrainedSketch(name='beamProfile', sheetSize=250.)
# Create the rectangle.
# 矩形草图绘制
滑鱼片# Create a three-dimensional, deformable part.
myBeam = myModel.Part(name='Beam', dimensionality=THREE_D, type=DEFORMABLE_BODY)
房屋置换协议书
# Create the part's ba feature by extruding the sketch
# through a distance of 25.0.
# 三维模型拉伸
myBeam.BaSolidExtrude(sketch=mySketch, depth=25.0)
#-----------------------------------------------------
# 材料模块导入
import material
# Create a material.
# 创建材料
mySteel = myModel.Material(name='Steel')
# Create the elastic properties: youngsModulus is 209.E3
# and poissonsRatio is 0.3
# 写入材料参数(元组类型)
elasticProperties = (209.E3, 0.3)
mySteel.Elastic(table=(elasticProperties, ) )
囧事
#-------------------------------------------------------
import ction
# Create the solid ction.
# 截面创建
mySection = myModel.HomogeneousSolidSection(name='beamSection',
material='Steel', thickness=1.0)
# Assign the ction to the region. The region refers
# to the single cell in this model.
# 截面指派
region = (lls,)
myBeam.SectionAssignment(region=region,
ctionName='beamSection')
#-------------------------------------------------------如何学好地理
什么食物补气补血最快最好
# 导入装配模块
import asmbly
辐射3代码
# Create a part instance.
# 非独立装配
myAsmbly = Asmbly
myInstance = myAsmbly.Instance(name='beamInstance', part=myBeam, dependent=OFF)