element_values#

PostProcessing.element_values(item, comp='', option='AVG')#

Compute the element-wise values for a given item and component.

This method uses Mapdl.etable() <ansys.mapdl.core.Mapdl.etable() and returns a numpy.ndarray rather than storing it within MAPDL.

Parameters:
itemstr

Label identifying the item. See the table below in the notes section.

compstr, optional

Component of the item if applicable. See the table below in the notes section.

optionstr, optional

Option for storing element table data. One of the following:

  • "MIN" : Store minimum element nodal value of the specified item component.

  • "MAX" : Store maximum element nodal value of the specified item component.

  • "AVG" : Store averaged element centroid value of the specified item component (default).

Returns:
numpy.ndarray

Numpy array containing the requested element values for a given item and component.

Return type:

ndarray

Notes

This an incomplete table of element values available to this method. For a full table, see ETABLE

Item

Comp

Description

U

X, Y, Z

X, Y, or Z structural displacement.

ROT

X, Y, Z

X, Y, or Z structural rotation.

TEMP

Temperature.

PRES

Pressure.

VOLT

Electric potential.

MAG

Magnetic scalar potential.

V

X, Y, Z

X, Y, or Z fluid velocity.

A

X, Y, Z

X, Y, or Z magnetic vector potential

CONC

Concentration.

CURR

Current.

EMF

Electromotive force drop.

S

X, Y, Z, XY, YZ, XZ

Component stress.

1, 2, 3

Principal stress.

INT

Stress intensity.

EQV

Equivalent stress.

EPEL

X, Y, Z, XY, YZ, XZ

Component elastic strain.

1, 2, 3

Principal elastic strain.

INT

Elastic strain intensity.

EQV

Elastic equivalent strain.

EPTH

X, Y, Z, XY, YZ, XZ

Component thermal strain.

1, 2, 3

Principal thermal strain.

INT

Thermal strain intensity.

EQV

Thermal equivalent strain.

EPPL

X, Y, Z, XY, YZ, XZ

Component plastic strain.

1, 2, 3

Principal plastic strain.

INT

Plastic strain intensity.

EQV

Plastic equivalent strain.

EPCR

X, Y, Z, XY, YZ, XZ

Component creep strain.

1, 2, 3

Principal creep strain.

INT

Creep strain intensity.

EQV

Creep equivalent strain.

Examples

Return the averaged element displacement in the X direction.

>>> arr = mapdl.post_processing.element_values("U", "X")
>>> arr
array([1.07396154e-06, 3.15631730e-06, 5.12543515e-06, ...,
       5.41204700e-06, 3.33649806e-06, 1.13836132e-06])

Return the maximum element X component stress.

>>> arr = mapdl.post_processing.element_values("S", "X", "max")
>>> arr
array([-1.12618148, -0.93902147, -0.88121128, ...,  0.        ,
        0.        ,  0.        ])

Return the minimum element thermal equivalent strain.

>>> arr = mapdl.post_processing.element_values("EPTH", "EQV", "min")
>>> arr
array([0., 0., 0., ..., 0., 0., 0.])