template_sphere_shell

openpnm.topotools.template_sphere_shell(outer_radius, inner_radius=0, dim=3)[source]

This method generates an image array of a sphere-shell.

It is useful for passing to Cubic networks as a template to make spherical shaped networks.

Parameters
  • outer_radius (int) – Number of nodes in the outer radius of the sphere.

  • inner_radius (int) – Number of nodes in the inner radius of the shell. a value of 0 will result in a solid sphere.

  • dim (scalar) – Controls the number of dimensions of the result. 3 returns a sphere, while 2 returns a disk.

Returns

im – A Numpy array containing 1’s to demarcate the sphere-shell, and 0’s elsewhere.

Return type

array_like