$(instance)L=$(L)HInductor Icon

Inductor

This component extends from TwoPin

Usage

Inductor(L)

Parameters:

NameDescriptionUnitsDefault value
LH

Connectors

Variables

NameDescriptionUnits
vV
iA

Behavior

\[ \begin{align} v\left( t \right) &= \mathtt{p.v}\left( t \right) - \mathtt{n.v}\left( t \right) \\ i\left( t \right) &= \mathtt{p.i}\left( t \right) \\ \mathtt{n.i}\left( t \right) + \mathtt{p.i}\left( t \right) &= 0 \\ L \frac{\mathrm{d} i\left( t \right)}{\mathrm{d}t} &= v\left( t \right) \end{align} \]

Source

component Inductor
  extends TwoPin
  parameter L::Inductance
relations
  L*der(i) = v
metadata {
  "JuliaSim": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {"label": "L=$(L)H", "x": 500, "y": 150, "rot": 0}
    ],
    "icons": {"default": "jsml://ElectricalComponents/Inductor.svg"}
  }
}
end
Flattened Source
component Inductor
  p = Pin() [{
    "JuliaSim": {
      "placement": {"icon": {"iconName": "pos", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
    }
  }]
  n = Pin() [{
    "JuliaSim": {
      "placement": {"icon": {"iconName": "neg", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
    }
  }]
  variable v::Voltage
  variable i::Current
  parameter L::Inductance
relations
  v = p.v-n.v
  i = p.i
  p.i+n.i = 0
  L*der(i) = v
metadata {
  "JuliaSim": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {"label": "L=$(L)H", "x": 500, "y": 150, "rot": 0}
    ],
    "icons": {"default": "jsml://ElectricalComponents/Inductor.svg"}
  }
}
end

Test Cases