tidy3d.SubpixelSpec#

class SubpixelSpec[source]#

Bases: Tidy3dBaseModel

Defines specification for subpixel averaging schemes when added to Simulation.subpixel.

Parameters:
  • attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, attrs are mutable. For example, the following is allowed for setting an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

  • dielectric (Union[Staircasing, PolarizedAveraging] = PolarizedAveraging(attrs={}, type='PolarizedAveraging')) – Subpixel averaging method applied to dielectric material interfaces.

  • metal (Union[Staircasing, VolumetricAveraging] = Staircasing(attrs={}, type='Staircasing')) – Subpixel averaging method applied to metallic structure interfaces. A material is considered as metallic if its real part of relative permittivity is less than 1 at the central frequency.

  • pec (Union[Staircasing, HeuristicPECStaircasing, PECConformal] = PECConformal(attrs={}, type='PECConformal', timestep_reduction=0.3)) – Subpixel averaging method applied to PEC structure interfaces.

Attributes

Methods

courant_ratio(contain_pec_structures)

The scaling ratio applied to Courant number so that the courant number in the simulation is sim.courant * courant_ratio.

staircasing()

Apply staircasing on all material boundaries.

Inherited Common Usage

dielectric#
metal#
pec#
classmethod staircasing()[source]#

Apply staircasing on all material boundaries.

courant_ratio(contain_pec_structures)[source]#

The scaling ratio applied to Courant number so that the courant number in the simulation is sim.courant * courant_ratio. So far only PEC subpixel averaging scheme requires deduction of Courant number.

__hash__()#

Hash method.