Help extracting field data from ODB file using Python script

I’m attempting to extract field data from an ODB by using the ABAQUS command functionality and a Python script I created (the script is attached to this email). Specifically, I encounter a problem when accessing Stress ‘S’ variable from the ODB. I have “deciphered” (after hours of endless documentation sifting) that the data contained in the ‘S’ variable are the s11, s22, s33, s12 stress components in my particular case, which is thermal stress modeling of a solar cell utilizing shell elements. I have also learned that I cannot request unique nodal quantities from the ‘S’ field and as such I have to request ELEMENT_NODAL data output and then average the respective stress components found on shared nodes among all the elements. This is where my problem lies, in the averaging operation. When I request, for example, data from node #45 which is shared only by two elements (thus there should only be 2 sets of s11, s22…. values for node 45 in the ‘S’ field of the ODB file) I get 4 data sets, and if I average the data sets, I get incorrect results. However, when I average only the first 2 data sets, I get the same values as when using the CAE interactive session. I would greatly appreciate your explanation regarding this matter and furthermore, would be  greatly interested in knowing if there is an easier or more effective way of achieving this goal: extracting field values (uniquely nodal) from the ODB and write a formatted file with the data.

 

Thank you very much,

 

Andres Ceballos