I'm modelling a composite manufacturing process where bands of material are applied sequentially. I'm modelling this as a shell. For every element of the mesh I can generate a list of the layers including their thicknesses and orientations, so I can easily generate a DEFI_COMPOSITE function for every element in the mesh (I'm scripting the generation of the .comm file, so it can potentially be very long). But then how can I use AFFE_MATERIAU to assign these functions to particular elements? I could potentially create 'groups' of 1 element each, but DEFI_GROUP doesn't seem to accept element numbers as a way to create a group. Also I think I need to apply AFFE_CARA_ELEM to each element individually, since the value of COQUE_NCOU and EPAIS need to correspond to the values of DEFI_COMPOSITE.
What's the most straightforward way to do this? Basically I'm just trying to use element id's rather than element groups.