tidy3d.UniformUnstructuredGrid#

class UniformUnstructuredGrid[source]#

Bases: UnstructuredGrid

Uniform grid.

Parameters:
  • relative_min_dl (NonNegativeFloat = 0.001) – The minimal allowed mesh size relative to the largest dimension of the simulation domain.Use relative_min_dl=0 to remove this constraint.

  • geometry_tolerance (PositiveFloat = 1e-06) – [units = um]. Absolute distance below which coincident geometric entities are fused when building the mesh. Increase this if abutting structures with finely tessellated (e.g. curved) boundaries fail to merge into a single conformal interface, which can leave duplicated internal surfaces and degenerate elements. Keep it well below the smallest geometric feature and the target mesh size: too large a value snaps together unrelated vertices and corrupts the mesh. Refinement lines are additionally subject to a built-in 1e-06 um minimum length, so setting this knob below that value does not relax the line-length requirement.

  • remove_fragments (bool = False) – Whether to remove fragments before meshing. This is useful when overlapping structures generate internal boundaries that can lead to very small cell volumes.

  • dl (PositiveFloat) – [units = um]. Grid size for uniform grid generation.

  • min_edges_per_circumference (NonNegativeFloat = 15) – Enforced minimum number of mesh segments per circumference of an object. Applies to Cylinder and Sphere, for which the circumference is taken as 2 * pi * radius. Set to 0 to skip this sizing contribution entirely (curvature-based local refinement is not applied).

  • min_edges_per_side (NonNegativeFloat = 2) – Enforced minimum number of mesh segments per any side of an object. Set to 0 to skip this sizing contribution entirely (side-length-based local refinement is not applied).

  • non_refined_structures (tuple[str, ...] = ()) – List of structures for which min_edges_per_circumference and min_edges_per_side will not be enforced. The original dl is used instead.

Example

>>> heat_grid = UniformUnstructuredGrid(
...     dl=0.1, min_edges_per_circumference=15, min_edges_per_side=2
... )

Attributes

min_mesh_size

Minimum mesh size used by this grid specification.

dl

min_edges_per_circumference

min_edges_per_side

non_refined_structures

relative_min_dl

geometry_tolerance

remove_fragments

dl#
min_edges_per_circumference#
min_edges_per_side#
non_refined_structures#
property min_mesh_size#

Minimum mesh size used by this grid specification.