×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

addData abaqus script - VonMises FieldOutput

addData abaqus script - VonMises FieldOutput

addData abaqus script - VonMises FieldOutput

(OP)
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:
if abs(v.maxPrincipal)<abs(v.minPrincipal):
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.

RE: addData abaqus script - VonMises FieldOutput

Try the following code section instead of the one you have posted above.

CODE --> Python

misesPM = frame.FieldOutput(name='MisesPM', description='VonMisesPM', type=SCALAR)
elData = []
for v in S.values:
    if abs(v.maxPrincipal)<abs(v.minPrincipal):
        elData.append([v.mises])
    else:
        elData.append([-v.mises])
elLabels = [ v.label for v in instance1.elements ]
misesPM.addData(position=INTEGRATION_POINT, instance=instance1, labels=elLabels, data=elData) 

addData accepts lists of lists for its arguments labels and data.
instance1 above is found from the option

CODE --> Python

odb.rootAssembly.instances[name] 

I have run it with an example odb and it worked.

Best regards
George Papazafeiropoulos
gpapazafeiropoulos<at>yahoo.gr

RE: addData abaqus script - VonMises FieldOutput

I think you can do this without looping through elements.

Create a field output and multiply the von mises stress by [eqv. pressure stress/abs(eqv. pressure stress)].

Positive values should indicate elements in compression, negative values should indicate elements in tension.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources