volumes#

property LegacyGeometry.volumes: MultiBlock#

Obtain the volumes geometry

Obtain the selected volumes as a pyvista.MultiBlock object.

Returns:
pv.MultiBlock

Examples

>>> mapdl.geometry.volumes
MultiBlock (0x147ca4100)
  N Blocks    6
  X Bounds    -0.016, 0.016
  Y Bounds    -0.008, 0.018
  Z Bounds    -0.003, 0.015

You can plot the entities:

>>> mapdl.geometry.volumes.plot()

You can access the individual volumes using indexing:

>>> volume0 = mapdl.geometry.volumes[0]
>>> volume0
UnstructuredGrid (0x149107340)
  N Cells:    34
  N Points:   36
  X Bounds:   0.000e+00, 1.588e-02
  Y Bounds:   -7.620e-03, 1.778e-02
  Z Bounds:   -3.180e-03, 0.000e+00
  N Arrays:   3

You can use the entity name:

>>> volume1 = mapdl.geometry.volumes["volume 1"]
>>> volume1
UnstructuredGrid (0x149107340)
  N Cells:    34
  N Points:   36
  X Bounds:   0.000e+00, 1.588e-02
  Y Bounds:   -7.620e-03, 1.778e-02
  Z Bounds:   -3.180e-03, 0.000e+00
  N Arrays:   3

You can iterate the different elements:

>>> points = mapdl.geometry.volumes
>>> for each_line in points:
        print(each_line)
UnstructuredGrid (0x149107340)
  N Cells:    34
  N Points:   36
  X Bounds:   0.000e+00, 1.588e-02
  Y Bounds:   -7.620e-03, 1.778e-02
  Z Bounds:   -3.180e-03, 0.000e+00
  N Arrays:   3
...