tidy3d.ConstantDoping#

class ConstantDoping[source]#

Bases: AbstractDopingBox

Sets constant doping \(N\) in the specified box with a :parameter`size` and :parameter:`concentration`.

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().

  • center (Union[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]], Box] = (0.0, 0.0, 0.0)) – [units = um]. Center of object in x, y, and z.

  • size (Union[tuple[Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box], Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box], Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box]], Box]) – [units = um]. Size in x, y, and z directions.

  • concentration (NonNegativeFloat = 0) – [units = 1/cm^3]. Doping concentration density in #/cm^3.

  • dimension (For translationally invariant behavior in one)

  • the (the box must have infinite size in)

  • direction. (homogenous (invariant))

Example

>>> import tidy3d as td
>>> box_coords = [
...     [-1, -1, -1],
...     [1, 1, 1]
... ]
>>> constant_box1 = td.ConstantDoping(center=(0, 0, 0), size=(2, 2, 2), concentration=1e18)
>>> constant_box2 = td.ConstantDoping.from_bounds(rmin=box_coords[0], rmax=box_coords[1], concentration=1e18)

Attributes

Methods

Inherited Common Usage

concentration#
__hash__()#

Hash method.