Reputation: 2347
I am not sure this is possible, but I want to create a mesh with user-defined elements in Abaqus/CAE using the Python scripting interface. This will consist of at least two parts on the CAE side of things: defining the nodes & connectivity, and defining the material properties.
So, for example, I'm familiar with creating a part and mesh using standard elements in a couple of different ways. A fairly readable version of which might be something like:
m = mdb.models[modelName]
newPart = m.Part(name='NewPart', dimensionality=THREE_D, type=DEFORMABLE_BODY)
for elemLabel,elemNodes in myElementDictionary.items():
nodeObjectTuple = tuple(newPart.nodes.sequenceFromLabels(elemNodes))
newPart.Element(nodes=nodeObjectTuple, elemShape=HEX8, label=elemLabel)
Will this work for user-defined elements, provided they match the element shape (e.g. HEX8)? If so, how can the user-element properties be defined? I do not see a command for that in the documentation.
EDIT: Typically, user element properties are specified via the input file (*USER ELEMENT and *UEL PROPERTY, for example). I want to know if there is a way to achieve this via the Python scripting interface without needing to edit an input file in some manner -- i.e., within the Abaqus/CAE Model Database. Also, I have have written subroutines for the actual user element definition and behavior, that is not what I'm asking about.
Upvotes: 2
Views: 1446
Reputation: 143
Let's start to answer from the beginning: Mesh and elements are two separate concept in ABAQUS and in Finite Element Modeling in general. Mesh is a geometric discretization of domain into smaller pieces. Element is an interpolation space primary variables of the problem.
Yes, you can have a mesh and then define any element you like for it as soon as the elements you are defining is compatible with mesh. As an instance if you have discretized your domain into hexahedron with 8 nodes (HEX8) you can use only compatible elements for this discretization which are C3D8R, C3D8H, C3D8, ....
There is a small problem though, ABAQUS/CAE, which is the graphical user interface of ABAQUS and it is controllable with Python, does not offer UEL (User Element) as an option in the element selection dialog box.
This limitation is not a problem if you are familiar with Python and ABAQUS/Standard. You can choose any compatible element and then change your input deck, which is your .inp file which will be read by ABAQUS/Standard. You can do it by many of string manipulation tools that Python offers. You just need to change your element definition in input deck from what you have chosen to your own defined UEL.
Upvotes: 1
Reputation: 2347
The other comments correctly point out that the functionality requested doesn't exist in Abaqus/CAE, and recommend that an input file be generated and then edited to insert the necessary definitions.
However, I've discovered that it is possible to use the Python interface within Abaqus/CAE to insert a KeywordBlock
object prior to writing the input file. An example to specify a user element:
mdb.models['Model-1'].keywordBlock.replace(0, """
**
** PARTS
*user element, type=u1113, nodes=6, coordinates=2, properties=8, i properties=3,
variables=6
1,2
*element, type=u1113, elset=myUser, input=1113.dat
*uel property, elset=myUser
1.0e6, 1.0e6, 0.25, 0.25, 0., 0., 650., 0.001,
1, 1, 0
** ASSEMBLY
**""")
Upvotes: 4