Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TypeError: Can only compare to an ABAQUS Object

Status
Not open for further replies.

Sri Harsha

Aerospace
Jun 16, 2017
37
0
0
DE
Hi,

I wrote the following function

def RetrieveSetStressValues1(odb1,lastFrame):
SetList = []
SetList = RetrieveAllSetNames()
assembly = odb1.rootAssembly
Stress = odb1.steps['Step-1'].frames[1].fieldOutputs['S']
for SetIdx in range(len(SetList)):
elemset = assembly.elementSets[SetList[SetIdx]]
StressSet = Stress.getSubset(region=elemset)
maximumStress = 0
for Idx in range(len(StressSet.values)):
StressValue = StressSet.values[Idx].mises
if (StressValue > maximumStress): //Line no. 10
maximumStress = StressValue

When I tried to run this,I am getting an error saying: "Can only compare to an ABAQUS Object"

at Line.10 " if (StressValue > maximumStress): "; I am comparing two numerical values,but i still don't understand,why I am getting this error.
Could you please let me know regarding this

Thanks in Advance!
 
Replies continue below

Recommended for you

Status
Not open for further replies.
Back
Top