Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

getSubset not working on COORD?

Status
Not open for further replies.

liq001

Aerospace
Feb 25, 2022
54
Hello everyone,

I am working on a script to use getSubset method to access the stress and coordinates from a certain element set. I just noticed a problem with COORD and I I'm doing exactly the same for both, but it only works for the stress. For COORD I always get an empty array. I've posted part o my script below. Need some help here to understanding Why is this happening? Is there a workaround? Thanks for any comments and help.

# Open the ODB file
odb = openOdb(odb_name)

# Access the last step and last frame
last_step = odb.steps.values()[-1]
last_frame = last_step.frames[-1]

# Access the specified element set and output variable
element_set = odb.rootAssembly.instances['PART-1-1'].elementSets['ALLELE']
field_output = last_frame.fieldOutputs['S']
sub_field_output = field_output.getSubset(region=element_set, position=CENTROID)

# Retrieve the coordinates
coord_field = last_frame.fieldOutputs['COORD']
sub_coord_field = coord_field.getSubset(region=element_set, position=CENTROID)

# Create numpy arrays and a mapping dictionary
coord_array = np.array([elem.data for elem in sub_coord_field.values])
field_values_array = np.array([elem.mises for elem in sub_field_output.values])

Best
lee
 
Replies continue below

Recommended for you

Anyone have any ideas about this? Need some help. Thanks
 
Hello, please help. any idea of this?
 
Check if position=CENTROID works for COORD. This variable can be requested at nodes or integration points. The latter could potentially be interpolated to centroids but make sure that it is the case.
 
Thanks @FEA_way. Now I noticed it works on latest version of ABAQUS(2023), However, why I get two identical stress values for each element (S4R) while I was querying use getsubset method ? I noticed there are two "S" outputs in the ODB. One is S at integration point and one is at the centroid however I only request output as shows in my above script at the center position.
 
S4R element has one integration point and it’s located at the centroid of the element. Those elements also have multiple section points through the thickness and you may have to take that into account as well.
 
I use 5 integration points through the thickness, I assume all should return identical values and 5 identical values should printed. Now I have two values, one for center position and one for integration points. Is there anyway that I only extract one? as I said, in my script I only request at value at centroid, but always give me two for each element
 
I have not used Abaqus in almost a decade but, if I recall correctly, some subroutines get called a couple of times. I think I managed to dig up some PDFs on subroutines online and there was some information along those lines. Take that with a healthy dose of skepticism.

*********************************************************
Are you new to this forum? If so, please read these FAQs:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor