mcdc.MeshUniform#
- class mcdc.MeshUniform(name: str = '', x: tuple[float, float, int] = (-10000000000.0, 20000000000.0, 1), y: tuple[float, float, int] = (-10000000000.0, 20000000000.0, 1), z: tuple[float, float, int] = (-10000000000.0, 20000000000.0, 1))#
Uniform spatial bins for simulation tallies and transport techniques.
- Parameters:
name (str, optional) – User-facing mesh name.
x (tuple of (float, float, int), optional) –
(origin, spacing, number_of_bins)for each axis, in cm. Omitted axes default to one effectively unbounded bin.y (tuple of (float, float, int), optional) –
(origin, spacing, number_of_bins)for each axis, in cm. Omitted axes default to one effectively unbounded bin.z (tuple of (float, float, int), optional) –
(origin, spacing, number_of_bins)for each axis, in cm. Omitted axes default to one effectively unbounded bin.
Examples
Create 100 uniform bins along z from 0 to 10 cm:
>>> import mcdc >>> mesh = mcdc.MeshUniform(z=(0.0, 0.1, 100))
Create a two-dimensional x-y mesh:
>>> mesh_xy = mcdc.MeshUniform( ... x=(-5.0, 0.5, 20), ... y=(-5.0, 0.5, 20), ... )
Create a three-dimensional mesh with different axis spacings:
>>> mesh_xyz = mcdc.MeshUniform( ... x=(0.0, 1.0, 10), ... y=(0.0, 2.0, 5), ... z=(-3.0, 0.25, 24), ... )