tidy3d.components.medium.AbstractMedium#

class tidy3d.components.medium.AbstractMedium#

A medium within which electromagnetic waves propagate.

Parameters
  • name (Optional[str] = None) – Optional unique name for medium.

  • frequency_range (Optional[Tuple[float, float]] = None) – [units = (Hz, Hz)]. Optional range of validity for the medium.

Show JSON schema
{
   "title": "AbstractMedium",
   "description": "A medium within which electromagnetic waves propagate.\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "description": "Optional unique name for medium.",
         "type": "string"
      },
      "frequency_range": {
         "title": "Frequency Range",
         "description": "Optional range of validity for the medium.",
         "units": [
            "Hz",
            "Hz"
         ],
         "type": "array",
         "minItems": 2,
         "maxItems": 2,
         "items": [
            {
               "type": "number"
            },
            {
               "type": "number"
            }
         ]
      },
      "type": {
         "title": "Type",
         "default": "AbstractMedium",
         "enum": [
            "AbstractMedium"
         ],
         "type": "string"
      }
   },
   "additionalProperties": false
}

Fields
attribute frequency_range: Tuple[float, float] = None#

Optional range of validity for the medium.

attribute name: str = None#

Optional unique name for medium.

Validated by
  • field_has_unique_names

static eps_complex_to_nk(eps_c: complex) Tuple[float, float]#

Convert complex permittivity to n, k values.

Parameters

eps_c (complex) – Complex-valued relative permittivity.

Returns

Real and imaginary parts of refractive index (n & k).

Return type

Tuple[float, float]

eps_diagonal(frequency: float) complex#

New eps_model function.

abstract eps_model(frequency: float) complex#

Complex-valued permittivity as a function of frequency.

Parameters

frequency (float) – Frequency to evaluate permittivity at (Hz).

Returns

Complex-valued relative permittivity evaluated at frequency.

Return type

complex

static eps_sigma_to_eps_complex(eps_real: float, sigma: float, freq: float) complex#

convert permittivity and conductivity to complex permittivity at freq

Parameters
  • eps_real (float) – Real-valued relative permittivity.

  • sigma (float) – Conductivity.

  • freq (float) – Frequency to evaluate permittivity at (Hz). If not supplied, returns real part of permittivity (limit as frequency -> infinity.)

Returns

Complex-valued relative permittivity.

Return type

complex

static nk_to_eps_complex(n: float, k: float = 0.0) complex#

Convert n, k to complex permittivity.

Parameters
  • n (float) – Real part of refractive index.

  • k (float = 0.0) – Imaginary part of refrative index.

Returns

Complex-valued relative permittivty.

Return type

complex

static nk_to_eps_sigma(n: float, k: float, freq: float) Tuple[float, float]#

Convert n, k at frequency freq to permittivity and conductivity values.

Parameters
  • n (float) – Real part of refractive index.

  • k (float = 0.0) – Imaginary part of refrative index.

  • frequency (float) – Frequency to evaluate permittivity at (Hz).

Returns

Real part of relative permittivity & electric conductivity.

Return type

Tuple[float, float]

plot(freqs: float, ax: matplotlib.axes._axes.Axes = None) matplotlib.axes._axes.Axes#

Plot n, k of a Medium as a function of frequency.

Parameters
  • freqs (float) – Frequencies (Hz) to evaluate the medium properties at.

  • ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created.

Returns

The supplied or created matplotlib axes.

Return type

matplotlib.axes._subplots.Axes