User login

You are here

Abaqus scripting - variable is unavailable

Hi guys,

I've recently started scripting in Abaqus and I ran into a major issue. To clarify
my problem, I've uploaded a simplified version of my inputfile (
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.

I keep on getting an OdpError 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' ), )),)
StepName = 'Step-1'

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

 # Map S33 values to the path
stress33XYData=session.XYDataFromPath(name='Stress in 33-direction',
# Extract the S33 value from the XYData
stress33Value =[0][1]


Johannes T.B. Overvelde's picture

Is there an option in the gui to find the stress in a given point?

Subscribe to Comments for "Abaqus scripting - variable is unavailable"

Recent comments

More comments


Subscribe to Syndicate