Abaqus选择的默认元素是C3D8R,我想将其更改为C3D8I。我知道如何在CAE中更改元素类型,甚至使用Python来递归地更改元素类型,但不知道默认值。
问题是,当我分区和重新网格时,我以前的选择会被覆盖并生成默认的C3D8R。
谢谢,
R.
编辑:感谢费尔南多C.从Simulia社区,以下调整可以使用。仍然在寻找一个更好的解决方案!
雷米 我认为默认元素是硬编码的,因此我们没有可以更改的设置。 但不要绝望。您可以在创建部件/实例之后使用methodCallback自动更改它。 您可以将其放入abaqus_v6.env文件中,因此它总是这样做的。 从abaqus导入*从abaqusConstants导入* def changeDefaultElementType(callingObject,参数,keywordArguments,userData):打印‘更改默认元素类型’p=getMethodReturnValue( elemTypes=( ElemType(elemCode=C3D8I,elemLibrary=STANDARD,secondOrderAccuracy=OFF,distortionControl=DEFAULT),ElemType(elemCode=C3D6,elemLibrary=STANDARD),elemCode=C3D6(ElemType,en19#) ),((‘#1’),) methodCallback.addCallback(ModelType,'Part',changeDefaultElementType,callAfter=True) 这个例子有点粗糙,您可能需要对其进行更多的润色(例如,只为3d部件更改元素类型,等等)。
发布于 2017-10-24 09:33:35
可以在Abaqus/CAE 2018中更改默认元素类型。
同时,可以将以下函数添加到custom_v6.env中。(C:\程序文件\#en0# Systemes\SimulationServices\V6R2017x\Abaqus\win_b64\SMA\site\custom_v6.env)
def onCaeStartup():
import methodCallback
from mesh import ElemType
from job import ModelJobType
## Function to be called when an input file is written
def checkElementType(callingObject, arguments, keywordArguments, userData):
print 'Checking element types in the model'
# Get the name of the job from the command
a = str(callingObject).split("jobs['")[1]
job = a.split("']")[0]
model = mdb.jobs[job].model
ra = mdb.models[model].rootAssembly
# Query the Element Types in the assembly and display them
elemType=[]
for instance in ra.instances.keys():
for cell in ra.instances[instance].cells:
if ra.getElementType(region=cell,elemShape=HEX).elemCode not in elemType:
elemType.append(ra.getElementType(region=cell,elemShape=HEX).elemCode)
print 'INSTANCE: '+instance +' = '+ ra.getElementType(region=cell,elemShape=HEX).elemCode
# Define the callback. When the writeInput method is called on a ModelJobType object, the function checkElementType is executed.
methodCallback.addCallback(ModelJobType, 'writeInput', checkElementType)
https://stackoverflow.com/questions/46889296
复制相似问题