How to get the volume of elements with certain type of material in Abaqus ODB by means of Python

大兔子大兔子 提交于 2019-12-11 16:55:32

问题


I need to calculate the total volume of elements with a certain type of material, then calculate that part of them in which some UVARM variable is greater than 1, and then define the ratio between these volumes.

The problem is that I cannot find how to filter out the elements exactly by name of material, not by section, part instance or element set, since the elements of interest are evenly distributed among these sections, sets etc.

Thank you


回答1:


It seems you need to loop over every element and look at the sectionCategory for each:

element.sectionCategory.name

'solid < materialname >'

so you build a full list something like:

steelels = [ el.label for el in instance.elements if el.sectionCategory.name == 'solid < steel >']

Really the preferred approach here is to create the appropriate element sets as you build the model.




回答2:


If you edit the model attributes before writing the .inp file to 'do not use parts and assemblies in input files' and run the simulation with this input you probably won't get any issues when accessing the odb.

part_instance = odb.rootAssembly.instances['PART-1-1']
elLabels = [ v.label for v in part_instance.elements if v.sectionCategory.name == 'solid < DUMMY_MATERIAL >']


来源:https://stackoverflow.com/questions/49250071/how-to-get-the-volume-of-elements-with-certain-type-of-material-in-abaqus-odb-by

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!