Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Find average stress and strain for a specified set

Status
Not open for further replies.

Chen1

Geotechnical
Jun 29, 2013
108
Hello.

I need to draw the stress-strain curve for a specified set. since the model is very big, i used python to extract the S33 and LE33

I used this code to extract the S33 and LE33 for set called Coal-1.coal

session.xyDataListFromField(odb=odb, outputPosition=INTEGRATION_POINT,
variable=(('LE', INTEGRATION_POINT, ((COMPONENT, 'LE33'), )), ('S',
INTEGRATION_POINT, ((COMPONENT, 'S33'), )), ), elementSets=('COAL-1.COAL',
))

to find the average strain, i need to write the following code for a set composed of 4 elements

xy1 = session.xyDataObjects['LE:LE33 PI: COAL-1 E: 1 IP: 1']
xy2 = session.xyDataObjects['LE:LE33 PI: COAL-1 E: 2 IP: 1']
xy3 = session.xyDataObjects['LE:LE33 PI: COAL-1 E: 3 IP: 1']
xy4 = session.xyDataObjects['LE:LE33 PI: COAL-1 E: 4 IP: 1']
xy5 = avg((xy1, xy2, xy3, xy4))
xy5.setValues(
sourceDescription='avg ( ( "LE:LE33 PI: COAL-1 E: 1 IP: 1", "LE:LE33 PI: COAL-1 E: 2 IP: 1", "LE:LE33 PI: COAL-1 E: 3 IP: 1", "LE:LE33 PI: COAL-1 E: 4 IP: 1" ) )')
tmpName = xy5.name
session.xyDataObjects.changeKey(tmpName, 'Strain')


This will a problem if that set is composed of thousands of elements. Since i need to write the above code for thousands of elements, correct?

what should i do, how can i find the average of the extracted Strain and stress?

Thanks
 
Replies continue below

Recommended for you

You can group your elements in a set in your model. Then in your pyton code search for all data with a KEY that containts COAL-1.

Python string search works as following:
IF 'COAL-1' in key:
%% extract the strain here of the corresponding element
END

Make a loop over all xydata with this check. Search google for region.keys() or just keys. (I did this with history outputs, not field outputs or XY data)

grtz
bvrm
 
Hello bvrm,

Could you please help me more, i have no idea about python, and i do not know how to make that loop, please teach me how to make it.

Please help me.
 
Errr .. if you know any programming language, there is nothing stopping you from picking up a book or visiting a good website on Python. Once you are familiar with the basics, check the Abaqus Scripting Manual. It should not take longer than a day or two to get the hang of it. Besides, you won't have to write every line of code yourself, RPY file will do the essentials for you.

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

 
I know there is no excuse for me to learn, I need some tips since the last time i learn programming language was about 4 years ago, and actually i forget because i did Not practice it.

I need somebody to teach me how to extract (by python) the S33, and LE33 from a set and then taking average for them then combine them to get the final Stress-Strain curve.

Thanks

 
Hello IceBreaker Sour,

I carried out these steps on a small model, i opened the RPY file, i found that Abaqus Uses the following commands to extract S33 and LE33 from a set called Coal-1.coal composed of four elements :

session.xyDataListFromField(odb=odb, outputPosition=INTEGRATION_POINT,
variable=(('LE', INTEGRATION_POINT, ((COMPONENT, 'LE33'), )), ('S',
INTEGRATION_POINT, ((COMPONENT, 'S33'), )), ), elementSets=('COAL-1.COAL',
))

So i can use the previous command to extract S33 and LE33.

and to get the average Abaqus uses the following commands
xy1 = session.xyDataObjects['LE:LE33 PI: COAL-1 E: 1 IP: 1']
xy2 = session.xyDataObjects['LE:LE33 PI: COAL-1 E: 2 IP: 1']
xy3 = session.xyDataObjects['LE:LE33 PI: COAL-1 E: 3 IP: 1']
xy4 = session.xyDataObjects['LE:LE33 PI: COAL-1 E: 4 IP: 1']
xy5 = avg((xy1, xy2, xy3, xy4))
xy5.setValues(
sourceDescription='avg ( ( "LE:LE33 PI: COAL-1 E: 1 IP: 1", "LE:LE33 PI: COAL-1 E: 2 IP: 1", "LE:LE33 PI: COAL-1 E: 3 IP: 1", "LE:LE33 PI: COAL-1 E: 4 IP: 1" ) )')
tmpName = xy5.name
session.xyDataObjects.changeKey(tmpName, 'Strain')

this is the problem, because if my original model composed of 10000 elements, i need to write the above Xy data for the 10000 elemnts, this impossible!!! i need to write a code to let Abaqus do loop, so i do not need to write the above code 10000 times.

could you please teach me how do that loop to get the average of the extracted S33 and LE33. right now i am reading the manual, but i need some tips. Thanks
 
Okay, I understand. However, your description makes me suspicious about what you are doing: Why do you need to compute an average of a field variable for thousands of elements?

Chen1 said:
could you please teach me how do that loop to get the average of the extracted S33 and LE33

This is something you must be able to do on your own.

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

 
Look, i am squeezing a deformable material between two rigid platens, so i need to find the stress strain curve for the defromable material, that is why i need to find the average stress and the average strain and combine them to get the average stress-strian curve for the whole deformable material.

In abaqus when the number of elements exceeds certain limit, i can not extract the stresses and strains in the elements. Now i know how to extract them from the RPY file, however i do not know how to get the average.

Thanks
 
My material is rock, we care more about the mode failure whether it is brittle or ductile. In other words, no problem if the material fail, but the problem is if the failure is brittle.

 
But why should the material property change? It is, after all, a material property. It is used as an input, isn't it?

Anyway, why don't you just request RF and U (along the direction of the application of BC) from a node that is kinematically coupled to a the rest of the node on each platen? You could also use an equation constraint to apply the kinematic constraint. Once you get RF and U, carry out basic algebraic manipulation to get stress vs. strain (which is what you should be computing, anyway) to compare with experimental/published results.

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

 
The input material properties is just for small samples tested in the laboratory. However the model is for big sample. the behavior of the material might be different from the small input material because of the constraint and the size effect. Furthermore, the hydro-static pressure affects the yield and failure of the material unlike the metals.

That is a good idea, i could use the RF and U in the direction of the BC to get an average stress-strain curve. so i do not need to get the average stress and strain in all elements, i can use only the RF and U.

Thanks
 
Chen1 said:
The input material properties is just for small samples tested in the laboratory. However the model is for big sample. the behavior of the material might be different from the small input material because of the constraint and the size effect

That is a fundamental misconception! There is a world of difference between structural and material properties.

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

 
Let me ask you question, If you you will model a big structure, what will be your input material properties?

Second question, do you know a book or a paper that i can use to get more detail about that.

when i model a big structure i apply a scale factor to reduce the strength.

 
Will the response of a straw be the same if you pulled vs. pushed it along (or perpendicular to) its length? Will the response change if you shortened the straw?

Without a sound structural background, you will have little to no idea if your computational results (in a structural model) make sense or not.

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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor