×
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

Create and display a user-defined field output with a Python script

Create and display a user-defined field output with a Python script

Create and display a user-defined field output with a Python script

(OP)
Hello everybody,

I'm using a Python script to run my model with Abaqus 6.12-1.
I post-processed my data outside the software and now I would like to visualize them into Abaqus.

I wrote the following code to create my own fieldOutput object:

CODE --> Python

OdbName = 'Job-1.odb'
myodb = odbAccess.openOdb(path=OdbName)
myOdbInstance = myodb.rootAssembly.instances['MYINSTANCE']
myFrame = myodb.steps['myStep'].frames[-1] # Use the last frame of the calculation

nodesLabels = [0,1,2] # list with all the node labels (example)
stresses = [[1,2,3,4,5,6],[1,2,3,4,5,6],[1,2,3,4,5,6]] # list with all the components of the stresses (example)

# Create a fieldOuput object
myFieldOutput = myFrame.FieldOutput(name='VARI',description='my specific variable for my fieldOutput object', type=TENSOR_3D_FULL)

# Put my post-processed data in my fieldOutput object
myFieldOutput.addData(position=NODAL, instance=myOdbInstance, labels=nodesLabels, data=stresses) 

I checked that my fieldOutput object has been created:
myFrame.fieldOutputs.keys('')
And I get:

CODE --> Python

['COORD', 'E', 'EVOL', 'Extrap. E', 'Extrap. S', 'S', 'VARI', 'U'] 

Thus my field - 'VARI' - is correctly created but I don't know how to display it within Abaqus viewport as I can't see it in the fieldOutput dialog box.

Is somebody have an idea?
Thank you in advance for what you can do,

RE: Create and display a user-defined field output with a Python script

Hi,
have you added

myOdb.save()
myOdb.close()

at the end of your script??

wink

RE: Create and display a user-defined field output with a Python script

(OP)
Hi,

You were right I forgot to save it!

Thank you for the help ;)

RE: Create and display a user-defined field output with a Python script

Did you actually get this working with the code you have above (type = TENSOR_3D_FULL and Position = NODAL)?

I am trying to do this and it will add the data to the odb. Everything appears to be correct, but the results will not display in Viewer. It gives an error message.

If I use Type=VECTOR I can add 3 components to the nodes, but 6 will not work for me....

I am thinking there is a limitation on the number of fieldvalues that can be assigned to a node (limited to 3)? But if this worked for you with 6 values than I'm still lost.

Let me know.

Thanks,

Jeff

RE: Create and display a user-defined field output with a Python script

(OP)
You are right I effectively put (CENTROID and TENSOR_3D_FULL) or (NODAL and VECTOR) so I have the same limitation.

Cheers,

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