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 anattr
obj.attrs['foo'] = bar
. Also note that Tidy3D` will raise aTypeError
ifattrs
contain objects that can not be serialized. One can check ifattrs
are serializable by callingobj.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.