tidy3d.DistributedGeneration#
- class DistributedGeneration[source]#
Bases:
Tidy3dBaseModelClass that allows to add a distributed generation model.
- Parameters:
rate (SpatialDataArray) – [units = 1/(cm^3 s^1)]. Spatially varying generation rate.
Notes
The generation rate will be interpolated to the simulation mesh during the setup phase. In places where the generation rate is not defined, it will be filled with zeros.
Example
>>> import tidy3d as td >>> import numpy as np >>> x = [1,2] >>> y = [2,3,4] >>> z = [3,4,5,6] >>> coords = dict(x=x, y=y, z=z) >>> fd = td.SpatialDataArray(np.random.random((2,3,4)), coords=coords) >>> dist_g = td.DistributedGeneration(rate=fd)
Attributes
Methods
Check that the SpatialDataArray is at least 2D:
from_rate_um3(gen_um3)Creates a DistributedGeneration from a SpatialDataArray in um^-3 s^-1.
Inherited Common Usage
- rate#