×
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

OdpError

OdpError

OdpError

(OP)
Hello,

I'm a big fan of these forums. Especially the Abaqus FEA forum has helped me a lot. It has already given me answers to quite a number of questions I had. But now I've started scripting and I ran into a major issue. To clarify my problem, I've uploaded a simplified version of my inputfile (http://www.box.net/shared/dd61iog2oc0hcpn4jcbf). The model contains fibres and matrix. All fibres and matrix are subjected to a displacement, except for the centre fibre. These boundary conditions give rise to stress concentrations. The core of my work is to determine this stress concentration.

I want to create a code that does the following:
Input: x,y,z (a random location)
Output: the stress S33 at x,y,z.

Based on some previous topics here, I'm close to the solution, but now I'm stuck again. I've already applied the tip discussed by xerf and bEakerPPK (http://www.eng-tips.com/viewthread.cfm?qid=208677&page=39). However, now I get an OdpError saying when I'm calling a variable: "The selected variable is unavailable." I have no idea on how to solve this. I've posted my script below.

Any help would be highly appreciated.

# Import all the necessary packages
import os
import visualization
import sys
from odbAccess import *
from abaqusConstants import *

# The point at a random location (x, y, z) where we want to extract S33
locx = 25
locy = 25
locz = 25
point= ( (locx,locy,locz), )

# The path object to map all the values to
myPath=session.Path(name='track', type=POINT_LIST, expression=point)

# These parameters are used in XYDataFromPath
var_s33=(('S', INTEGRATION_POINT, ((COMPONENT, 'S33' ), )),)
session.paths['track']
StepName = 'Step-1'

# Setup the odb and viewport
myodb = openOdb(path = 'Small_model.odb')
viewport = session.viewports[session.viewports.keys()[-1]]
viewport.setValues(displayedObject=myodb)
viewport.odbDisplay.setPrimaryVariable(variableLabel = 'S',outputPosition = INTEGRATION_POINT, refinement=COMPONENT,'S33'))
viewport.odbDisplay.display.setValues(plotState=CONTOURS_ON_DEF,))

# Map S33 values to the path
stress33XYData=session.XYDataFromPath(name='Stress in 33-direction',
                    path=myPath,
                    includeIntersections=False,
                    shape=DEFORMED,
                    labelType=TRUE_DISTANCE,
                    step=-1,
                    frame=-1,
                    variable=var_s33)
# Extract the S33 value from the XYData
stress33Value = stress33XYData.data[0][1]
 

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