Hello,
I'm trying to create a new fieldOutput of the VonMises results. I want to add the +/- sign to this new field indicating if the element is either in tension or compression state.
I get the following error when I run my script:
OdbError: Length od data sequence incorrect. Data at 1200 locations expected. Data at 150 locations provided. Element data request failed.
Test Exmaple Data:
- Simple beam bending
- 150 C3D20R elements (1200 integration points)
elLab is a list with 150 items
elData is a tuple list with 150 items but each item has 8 values
Python Script section:
for v in S.values:
Any ideas why my elData list is not valid?
Thanks in advance.
I'm trying to create a new fieldOutput of the VonMises results. I want to add the +/- sign to this new field indicating if the element is either in tension or compression state.
I get the following error when I run my script:
OdbError: Length od data sequence incorrect. Data at 1200 locations expected. Data at 150 locations provided. Element data request failed.
Test Exmaple Data:
- Simple beam bending
- 150 C3D20R elements (1200 integration points)
elLab is a list with 150 items
elData is a tuple list with 150 items but each item has 8 values
Python Script section:
for v in S.values:
if abs(v.maxPrincipal)<abs(v.minPrincipal):
elData = []
for key in sorted(misesSign.iterkeys()):
misesPM = frame.FieldOutput(name='MisesPM', description='VonMisesPM', type=SCALAR)
misesPM.addData(position=INTEGRATION_POINT, instance=instance1, labels=elLabels, data=elData)
misesSign.setdefault(v.elementLabel,[]).append(v.mises)
else:misesSign.setdefault(v.elementLabel,[]).append(-v.mises)
misesSign2.append(-v.mises)
elLab = []elData = []
for key in sorted(misesSign.iterkeys()):
elLab.append(key)
elData.append(misesSign[key])
elementDataTuple = tuple(tuple(x) for x in elData)misesPM = frame.FieldOutput(name='MisesPM', description='VonMisesPM', type=SCALAR)
misesPM.addData(position=INTEGRATION_POINT, instance=instance1, labels=elLabels, data=elData)
Any ideas why my elData list is not valid?
Thanks in advance.