Abaqus python scripting: How to add a vector field output with their resultant values in an odb

1.1k Views Asked by At

My code below could easily create a field output of my custom vector from the 'dataComponentsList' variable. But it merely displayed the components of vectors in the 'symbol plot' of Abaqus, as distinct from the default Abaqus field outputs which may also display the RESULTANT of vectors in the plot. For example, if the vectors of displacement or reaction forces are requested, then the odb will include the components with the resultant of the vectors.

newFieldOutput = odb.steps[stepName].frames[-1].FieldOutput(name = vectorName, description = '', type = VECTOR)
newFieldOutput.addData(position=ELEMENT_NODAL, instance = odbInstance, labels = elementsLabels, data = dataComponentsList)

So, my question is simple: How can I add the resultant of vectors in my vector field output.

Thanks in advance for any suggestions.

2

There are 2 best solutions below

0
On

You may use

vectorName = 'myVector'
newFieldOutput = odb.steps[stepName].frames[-1].FieldOutput(name = vectorName, componentLabels = (vectorName+'1', vectorName+'2', vectorName+'3'), description = '', type = VECTOR)
newFieldOutput.addData(position=ELEMENT_NODAL, instance = odbInstance, labels = elementsLabels, data = dataComponentsList, validInvariants=(MAGNITUDE, ))

The part

newFieldOutput.addData(....., validInvariants=(MAGNITUDE, )) 

allows to get the magnitude.

However, with position=ELEMENT_NODAL, you will not be able to show vectors as Abaqus will output: "warning: symbol plotting of vector quantities is not supported at element nodes". You should give the vectors values you want at another location such as CENTROID or INTEGRATION_POINT of element, or NODAL for nodes.

1
On

Since you are interested only in a scalar, calculate the vector resultant in the python script and then ".adddata" as type = SCALAR.