Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

getScalarField at middle of shell element thickness

Status
Not open for further replies.

StefCon

Mechanical
Mar 6, 2013
155
Hi,
I am working on a script that creates a field output in an odb.
The odb contains an element set with shell elements (5 section points, S4).


The code I am using to get the scalar field looks like this:
stress = frame.fieldOutputs['S']
inPlaneMaxPrincipal = stress.getScalarField(invariant=MAX_INPLANE_PRINCIPAL).getSubset(region=elSet, position=CENTROID)
inPlaneShear = stress.getScalarField(componentLabel='S12').getSubset(region=elSet, position=CENTROID)


I create the field output like this:
frame.FieldOutput(name='myField '+name, description=fieldDescription, field=calculated)


The code works but I would like to retrieve the element data from the middle of the elements (section point 3?) and then write my new field to all section points.
My intent is to get the average MAX_INPLANE_PRINCIPAL stress and the output shall look the same regarless of top/bottom/top&bottom/envelope setting in viewer.
Use of SSAVG 1-6 does not seem possible as field output. Otherwise that would be a great way to solve it.

Any ideas of how this can be achieved? Help would be much appreciated.

//S
 
Replies continue below

Recommended for you

Did you try using optional argument sectionPoint ? It allows you to specify the section point number.
 
I have read about addData(...) optional argument sectionPoint. I am however not able to get that part working.

Where do I write the addData and what is the value the sectionPoint argument accept?

addData(sectionPoint=3)?

Best regards,
S
 
I was thinking about this argument used with getSubset. It should work this way.
 
I tried adding the following:

sCat = odb.SectionCategory(name='SC',description='n/a')
sP = sCat.SectionPoint(number=3,description='n/a')

together with the addition .getSubset(.... , sectionPoint=sP)

The code did not return any error but didn't produce any field output. I managed to work around my problem getting the section forces at the centroid instead. That way I only get the forces I want. The drawback is that I have to state the element size when running the script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor