twpasolver.models.transmission_lines module#

Module containing models for transmission lines.

This module provides classes and functions to model various types of transmission lines.

pydantic model twpasolver.models.transmission_lines.LosslessTL[source]#

Bases: TwoPortModel

Model for a lossless transmission line.

Show JSON schema
{
   "title": "LosslessTL",
   "description": "Model for a lossless transmission line.",
   "type": "object",
   "properties": {
      "Z0_ref": {
         "default": 50.0,
         "description": "Reference line impedance of the two-port component.",
         "title": "Z0 Ref",
         "type": "number"
      },
      "N": {
         "default": 1,
         "description": "Number of repetitions of the model in the computed abcd matrix.",
         "minimum": 0,
         "title": "N",
         "type": "integer"
      },
      "name": {
         "const": "LosslessTL",
         "default": "LosslessTL",
         "title": "Name",
         "type": "string"
      },
      "l": {
         "description": "Length of the line.",
         "minimum": 0,
         "title": "L",
         "type": "number"
      },
      "L": {
         "description": "Characteristic inductance of the line.",
         "minimum": 0,
         "title": "L",
         "type": "number"
      },
      "C": {
         "description": "Characteristic capacitance of the line.",
         "minimum": 0,
         "title": "C",
         "type": "number"
      }
   },
   "required": [
      "l",
      "L",
      "C"
   ]
}

Fields:
field name: Literal['LosslessTL'] = 'LosslessTL'#
field l: float [Required]#

Length of the line.

Constraints:
  • ge = 0

field L: float [Required]#

Characteristic inductance of the line.

Constraints:
  • ge = 0

field C: float [Required]#

Characteristic capacitance of the line.

Constraints:
  • ge = 0

classmethod from_z_vp(Z0: float, vp: float, l: float) LosslessTL[source]#

Initialize the model from impedance and line propagation constant.

Parameters:
  • Z0 (NonNegativeFloat) – Characteristic impedance of the line.

  • vp (NonNegativeFloat) – Phase velocity of the line.

  • l (NonNegativeFloat) – Length of the transmission line.

Returns:

An instance of the LosslessTL class.

Return type:

LosslessTL

property Z0: float#

Compute the characteristic impedance of the line.

Returns:

The characteristic impedance.

Return type:

NonNegativeFloat

property vp: float#

Compute the characteristic phase velocity of the line.

Returns:

The phase velocity.

Return type:

NonNegativeFloat

single_abcd(freqs: ndarray) ABCDArray[source]#

Get the ABCD matrix of the transmission line portion for given frequencies.

Parameters:

freqs (np.ndarray) – Array of frequencies at which to evaluate the ABCD matrix.

Returns:

The ABCD matrix of the transmission line.

Return type:

ABCDArray