You can access results on shell and layer elements. A shell element is a specific case of a layer element. It is simply a layer element that has only one layer.
For a shell or layer element, the results can have different shapes, depending on the data location. Results can be nodal, element nodal, or elemental.
For a nodal location, values are localized at each node of the element. No additional specification on the shape or position is necessary.
For an element nodal location (such as stress), results are available on four positions:
Top
,Bottom
,Middle
, andTop/Bottom
. You must specify the position for which to access result values. The default position isTop/Bottom
.For an elemental location (such as bending stress), the result for the different components is given by one value by element.
The result reader has a property LayeredSolidStressStyle
that you use to specify the shape for the required result. The default value is
Top/Bottom
.
For a layer element, the result reader has the property
Layer
that you use to specify the layer number for the
required result. The layer number is 0 by default, which is
equivalent to selecting Entire Section in the Mechanical
interface.
The following table shows how to specify the properties
LayeredSolidStressStyle
and
ShellPosition
, depending of the result
required.
Result Type Exposed in Worksheet | Location | LayeredSolidStressStyle | ShellPosition |
---|---|---|---|
U, R, … | Nodal | (Not Applicable) | (Not Applicable) |
S, EPEL, … | Element Nodal | Top/Bottom | Tom, Bottom, Middle, Top/Bottom |
BENDING_STRESS, MEMBRANE_STRESS, … | Elemental | Bending, Membrane | (Not Applicable) |
The following IronPython functions access a shell element result: stress
S
for the Y component.
# create a result reader resultReader = result.Analysis.GetResultsData() # get the layer number resultReader.Layer = 0 #specify the shape of the result resultReader.LayeredSolidStressStyle = StressStyle.TopAndBottom # select the shell position resultReader.ShellPosition = ShellPosition.Top # set the result reader to get the stress on the Y axis (SY) for the current step resultReader.CurrentResultSet = stepInfo.Set stress_result = resultReader.GetResult("S") stress_result.SelectComponents(["Y"]) # get the elemental values SY on "Top" position on the shell for id in resultCollector.Ids: valuesSY = stress_result.GetElementValues(id) resultCollector.SetValues(id,valuesSY)
For a shell or layer element with the position set to
Top
, Bottom
, or
Middle
, the method SetValues
must
be used:
for id in collector.Ids: values = stress_result.GetElementValues(id) collector.SetValues(id,values)
For a shell or layer element with the position set to
Top/Bottom
, the method
SetAllValues
can be used:
values = stress_result.GetElementValues(collector.Ids,False) lengths = reader.NumberValuesByElement(collector.Ids) collector.SetAllValues(lengths,values)
While the code for the method SetAllValues
is bit more
complicated, this method does offer better performance when setting a large amount
of data.
Note: The supplied extension ACTResults
defines a toolbar
with buttons for calculating custom results for a shell element, a layer
element, and a contact. The extension ACTResults
combines
the next three extension examples into a single extension. The three-button
toolbar for it is shown in the figures.