openmc.lib.CylindricalMesh

class openmc.lib.CylindricalMesh(uid=None, new=True, index=None)[source]

CylindricalMesh stored internally.

This class exposes a mesh that is stored internally in the OpenMC library. To obtain a view of a mesh with a given ID, use the openmc.lib.meshes mapping.

Parameters

index (int) – Index in the meshes array.

Variables
  • id (int) – ID of the mesh

  • dimension (iterable of int) – The number of mesh cells in each direction.

  • lower_left (numpy.ndarray) – The lower-left corner of the structured mesh.

  • upper_right (numpy.ndarray) – The upper-right corner of the structrued mesh.

  • width (numpy.ndarray) – The width of mesh cells in each direction.

  • n_elements (int) – Total number of mesh elements.

  • volumes (numpy.ndarray) – Volume of each mesh element in [cm^3]

set_grid(r_grid, phi_grid, z_grid)[source]

Set grid values

Parameters
  • r_grid (iterable of float) – Mesh boundary points along the r-axis

  • phi_grid (Iterable of float) – Mesh boundary points along the phi-axis

  • z_grid (Iterable of float) – Mesh boundary points along the z-axis