×
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

Optimization problem with abaqus and python

Optimization problem with abaqus and python

Optimization problem with abaqus and python

(OP)
Hi All,
I am having a little problem. I am into parametric design and optimization. I have been able to successfully generate the .odb file using matlab but I am having problem reading the data from it. I have written a python script for it but everytime I run it using matlab I get the error that says that it cannot understand the lastframe.
I am new to python and any help would be great. I am using the following to run python script from matlab
! abaqus interactive job=Job-1
! abaqus python ReadODB_Job1.py Job-1.odb Job-1.m[/b]


also below ull find the python code
import odbAccess
names=["odbRes_Job1"]
nameOfStep="Step-Torsion"

for y in range(len(names)):
NameOfFile = names[y]+".txt"
FileResultsX = open(NameOfFile,"w")

myOdb = odbAccess.openOdb(path="Job-1.odb")
lastStep = myOdb.steps[nameOfStep]

for z in range(len(lastStep.frames)):
lastFrame = myOdb.steps[nameOfStep].frames[z]
Times=lastFrame.frameValue
U = lastFrame.fieldOutputs["U"]
UR = lastFrame.fieldOutputs["UR"]
UT = lastFrame.fieldOutputs["UT"]

# FileResultsX.write("Node\tUR1\n")

for nodeNumber in range(14,15):
FileResultsX.write("%d\t" % nodeNumber)
for ur in UR.values:
if ur.nodeLabel == nodeNumber:
FileResultsX.write("%10.8E\t" % (ur.data[0]))

myOdb.close()
FileResultsX.close()

Any help will be greatly appreciated

RE: Optimization problem with abaqus and python

you can do optimization with python too. look up numpy (included in recent abq distributions i think) and scipy.

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