tidy3d.UniformCurrentSource#
- class UniformCurrentSource[source]#
- Bases: - CurrentSource,- ReverseInterpolatedSource- Source in a rectangular volume with uniform time dependence. - 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 an- attr- obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a- TypeErrorif- attrscontain objects that can not be serialized. One can check if- attrsare serializable by calling- obj.json().
- name (Optional[str] = None) β Optional name for the source. 
- 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. 
- source_time (Union[GaussianPulse, ContinuousWave, CustomSourceTime]) β Specification of the source time-dependence. 
- interpolate (bool = True) β Handles reverse-interpolation of zero-size dimensions of the source. If - False, the source data is snapped to the nearest Yee grid point. If- True, equivalent source data is applied on the surrounding Yee grid points to emulate placement at the specified location using linear interpolation.
- confine_to_bounds (bool = False) β If - True, any source amplitudes which, after discretization, fall beyond the bounding box of the source are zeroed out, but only along directions where the source has a non-zero extent. The bounding box is inclusive. Should be set- `Truewhen the current source is being used to excite a current in a conductive material.
- polarization (Literal['Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz']) β Specifies the direction and type of current component. 
 
 - Notes - Inputting the parameter - size=(0,0,0)defines the equivalent of a point source.- Example - >>> pulse = GaussianPulse(freq0=200e12, fwidth=20e12) >>> pt_source = UniformCurrentSource(size=(0,0,0), source_time=pulse, polarization='Ex') - Attributes - Methods - Inherited Common Usage - __hash__()#
- Hash method.