×
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

Python addData for fieldOutput object

Python addData for fieldOutput object

Python addData for fieldOutput object

(OP)
I am trying to use the addData method for a FieldOutput object. I have failure margins values at the nodes of the model in the component directions 11,22,33,12,13,23. I call the method and place the data in the odb and save it, but when I open the odb in abaqus viewer and open the new field I have created, it tells me that "The selected primary variable is not available in the current frame for any elements in the current display group". All of the elements are shown when i get this message

Manual inspection of the odb using the scripting commands shows that the data in fact does exist at the displayed step. Each fieldvalue has all 6 components at each node as it should. The data is also located at the correct nodeLabel (a node that in fact does is exist and is currently displayed in the viewport).

CODE --> python

fO_components=frame.FieldOutput(name=fi_comp_name,
                                    description='FI_11,FI_22,FI_33,FI_12,FI_13,FI_23',
                                    type=TENSOR_3D_FULL,
                                    componentLabels=('FI_11','FI_22','FI_33','FI_12','FI_13','FI_23'),
                                    validInvariants=(),
                                    )
    comp_data = [FI_11_array,FI_22_array,FI_33_array,FI_12_array,FI_13_array,FI_23_array]
    
    comp_data = tuple(zip(*comp_data))
    fO_components.addData(position=NODAL,instance=instance,labels=node_list,data=comp_data) 

Changing the above code to have a fieldoutput of type VECTOR as opposed to TENSOR_3D_FULL and only add the first three components of the data works (shown below)

CODE --> Python

fO_components=frame.FieldOutput(name=fi_comp_name,
                                    description='FI_11,FI_22,FI_33',
                                    type=VECTOR,
                                    componentLabels=('FI_11','FI_22','FI_33'),
                                    validInvariants=(),
                                    )
    comp_data = [FI_11_array,FI_22_array,FI_33_array]
    comp_data = tuple(zip(*comp_data))
    fO_components.addData(position=NODAL,instance=instance,labels=node_list,data=comp_data) 
[/code]

I'm very confused here. All 6 components of data that I added to the odb show up in scripting, but claims it cant be seen in the viewport for some reason. Then when I switch to a VECTOR and only use 3 components it displays as expected. Is there something about the FULL_3D_TENSOR type that doesn't allow the display of the data that is added to the odb? Only thing I can think of since it works on a vector level splitting the 6 components into two groups of 3 (11,22,33 and 12,13,23 in separate vector field outputs works fine).

Any thoughts?

Thanks, Jeff

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