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
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