tidy3d.UniformCurrentSource#

class tidy3d.UniformCurrentSource#

Source in a rectangular volume with uniform time dependence. size=(0,0,0) gives point source.

Parameters
  • center (Tuple[float, float, float] = (0.0, 0.0, 0.0)) – [units = um]. Center of object in x, y, and z.

  • size (Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]) – [units = um]. Size in x, y, and z directions.

  • source_time (Union[GaussianPulse, ContinuousWave]) – Specification of the source time-dependence.

  • name (Optional[str] = None) – Optional name for the source.

  • polarization (Literal['Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz']) – Specifies the direction and type of current component.

Example

>>> pulse = GaussianPulse(freq0=200e12, fwidth=20e12)
>>> pt_source = UniformCurrentSource(size=(0,0,0), source_time=pulse, polarization='Ex')

Show JSON schema
{
   "title": "UniformCurrentSource",
   "description": "Source in a rectangular volume with uniform time dependence. size=(0,0,0) gives point source.\n\nParameters\n----------\ncenter : Tuple[float, float, float] = (0.0, 0.0, 0.0)\n    [units = um].  Center of object in x, y, and z.\nsize : Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]\n    [units = um].  Size in x, y, and z directions.\nsource_time : Union[GaussianPulse, ContinuousWave]\n    Specification of the source time-dependence.\nname : Optional[str] = None\n    Optional name for the source.\npolarization : Literal['Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz']\n    Specifies the direction and type of current component.\n\nExample\n-------\n>>> pulse = GaussianPulse(freq0=200e12, fwidth=20e12)\n>>> pt_source = UniformCurrentSource(size=(0,0,0), source_time=pulse, polarization='Ex')",
   "type": "object",
   "properties": {
      "type": {
         "title": "Type",
         "default": "UniformCurrentSource",
         "enum": [
            "UniformCurrentSource"
         ],
         "type": "string"
      },
      "center": {
         "title": "Center",
         "description": "Center of object in x, y, and z.",
         "default": [
            0.0,
            0.0,
            0.0
         ],
         "units": "um",
         "type": "array",
         "minItems": 3,
         "maxItems": 3,
         "items": [
            {
               "type": "number"
            },
            {
               "type": "number"
            },
            {
               "type": "number"
            }
         ]
      },
      "size": {
         "title": "Size",
         "description": "Size in x, y, and z directions.",
         "units": "um",
         "type": "array",
         "minItems": 3,
         "maxItems": 3,
         "items": [
            {
               "type": "number",
               "minimum": 0
            },
            {
               "type": "number",
               "minimum": 0
            },
            {
               "type": "number",
               "minimum": 0
            }
         ]
      },
      "source_time": {
         "title": "Source Time",
         "description": "Specification of the source time-dependence.",
         "anyOf": [
            {
               "$ref": "#/definitions/GaussianPulse"
            },
            {
               "$ref": "#/definitions/ContinuousWave"
            }
         ]
      },
      "name": {
         "title": "Name",
         "description": "Optional name for the source.",
         "type": "string"
      },
      "polarization": {
         "title": "Polarization",
         "description": "Specifies the direction and type of current component.",
         "enum": [
            "Ex",
            "Ey",
            "Ez",
            "Hx",
            "Hy",
            "Hz"
         ],
         "type": "string"
      }
   },
   "required": [
      "size",
      "source_time",
      "polarization"
   ],
   "additionalProperties": false,
   "definitions": {
      "GaussianPulse": {
         "title": "GaussianPulse",
         "description": "Source time dependence that describes a Gaussian pulse.\n\nParameters\n----------\namplitude : NonNegativeFloat = 1.0\n    Real-valued maximum amplitude of the time dependence.\nphase : float = 0.0\n    [units = rad].  Phase shift of the time dependence.\nfreq0 : PositiveFloat\n    [units = Hz].  Central frequency of the pulse.\nfwidth : PositiveFloat\n    [units = Hz].  Standard deviation of the frequency content of the pulse.\noffset : ConstrainedFloatValue = 5.0\n    Time delay of the maximum value of the pulse in units of 1 / (``2pi * fwidth``).\n\nExample\n-------\n>>> pulse = GaussianPulse(freq0=200e12, fwidth=20e12)",
         "type": "object",
         "properties": {
            "amplitude": {
               "title": "Amplitude",
               "description": "Real-valued maximum amplitude of the time dependence.",
               "default": 1.0,
               "minimum": 0,
               "type": "number"
            },
            "phase": {
               "title": "Phase",
               "description": "Phase shift of the time dependence.",
               "default": 0.0,
               "units": "rad",
               "type": "number"
            },
            "type": {
               "title": "Type",
               "default": "GaussianPulse",
               "enum": [
                  "GaussianPulse"
               ],
               "type": "string"
            },
            "freq0": {
               "title": "Central Frequency",
               "description": "Central frequency of the pulse.",
               "units": "Hz",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "fwidth": {
               "title": "Fwidth",
               "description": "Standard deviation of the frequency content of the pulse.",
               "units": "Hz",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "offset": {
               "title": "Offset",
               "description": "Time delay of the maximum value of the pulse in units of 1 / (``2pi * fwidth``).",
               "default": 5.0,
               "minimum": 2.5,
               "type": "number"
            }
         },
         "required": [
            "freq0",
            "fwidth"
         ],
         "additionalProperties": false
      },
      "ContinuousWave": {
         "title": "ContinuousWave",
         "description": "Source time dependence that ramps up to continuous oscillation\nand holds until end of simulation.\n\nParameters\n----------\namplitude : NonNegativeFloat = 1.0\n    Real-valued maximum amplitude of the time dependence.\nphase : float = 0.0\n    [units = rad].  Phase shift of the time dependence.\nfreq0 : PositiveFloat\n    [units = Hz].  Central frequency of the pulse.\nfwidth : PositiveFloat\n    [units = Hz].  Standard deviation of the frequency content of the pulse.\noffset : ConstrainedFloatValue = 5.0\n    Time delay of the maximum value of the pulse in units of 1 / (``2pi * fwidth``).\n\nExample\n-------\n>>> cw = ContinuousWave(freq0=200e12, fwidth=20e12)",
         "type": "object",
         "properties": {
            "amplitude": {
               "title": "Amplitude",
               "description": "Real-valued maximum amplitude of the time dependence.",
               "default": 1.0,
               "minimum": 0,
               "type": "number"
            },
            "phase": {
               "title": "Phase",
               "description": "Phase shift of the time dependence.",
               "default": 0.0,
               "units": "rad",
               "type": "number"
            },
            "type": {
               "title": "Type",
               "default": "ContinuousWave",
               "enum": [
                  "ContinuousWave"
               ],
               "type": "string"
            },
            "freq0": {
               "title": "Central Frequency",
               "description": "Central frequency of the pulse.",
               "units": "Hz",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "fwidth": {
               "title": "Fwidth",
               "description": "Standard deviation of the frequency content of the pulse.",
               "units": "Hz",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "offset": {
               "title": "Offset",
               "description": "Time delay of the maximum value of the pulse in units of 1 / (``2pi * fwidth``).",
               "default": 5.0,
               "minimum": 2.5,
               "type": "number"
            }
         },
         "required": [
            "freq0",
            "fwidth"
         ],
         "additionalProperties": false
      }
   }
}

attribute polarization: Literal['Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz'] [Required]#

Specifies the direction and type of current component.