tidy3d.LumpedResistor#
- class LumpedResistor[source]#
Bases:
RectangularLumpedElementClass representing a rectangular lumped resistor. Lumped resistors are appended to the list of structures in the simulation as
Medium2Dwith the appropriate conductivity given their size and voltage axis.- 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,
attrsare mutable. For example, the following is allowed for setting anattrobj.attrs['foo'] = bar. Also note that Tidy3D` will raise aTypeErrorifattrscontain objects that can not be serialized. One can check ifattrsare 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.
name (ConstrainedStrValue) β Unique name for the lumped element.
num_grid_cells (Optional[PositiveInt] = 3) β Number of mesh grid cells associated with the lumped element along each direction. Used in generating the suggested list of
MeshOverrideStructureobjects. A value ofNonewill turn off mesh refinement suggestions.voltage_axis (Literal[0, 1, 2]) β Specifies the axis along which the component is oriented and along which the associated voltage drop will occur. Must be in the plane of the element.
snap_perimeter_to_grid (bool = True) β When enabled, the perimeter of the lumped element is snapped to the simulation grid, which improves accuracy when the number of grid cells is low within the element. Sides of the element perpendicular to the
voltage_axisare snapped to grid boundaries, while the sides parallel to thevoltage_axisare snapped to grid centers. Lumped elements are always snapped to the nearest grid boundary along theirnormal_axis, regardless of this option.resistance (PositiveFloat) β Resistance value in ohms.
Attributes
Methods
to_structure([grid])Converts the
LumpedResistorobject to aStructureready to be added to theSimulationInherited Common Usage
- resistance#
- to_structure(grid=None)[source]#
Converts the
LumpedResistorobject to aStructureready to be added to theSimulation
- __hash__()#
Hash method.