Skip to content
LIBRARY
Analog.Basic.VariableConductor.md

Analog.Basic.VariableConductor

Ideal linear electrical conductor with variable conductance.

The conductance value G is provided as an external input signal. An optional linear temperature coefficient alpha adjusts the actual conductance based on the heat port temperature:

Gactual=G1+α(TheatPortTref)

The electrical behavior follows Ohm's law in conductance form:

i=Gactualv

Power dissipated in the conductor is transferred as heat through the thermal port heat_port.

Corresponds to Modelica.Electrical.Analog.Basic.VariableConductor.

This component extends from ElectricalComponents.Analog.Interfaces.OnePort

Usage

ElectricalComponents.Analog.Basic.VariableConductor(T_ref=300.15, alpha=0.0)

Parameters:

NameDescriptionUnitsDefault value
T_refReference temperatureK300.15
alphaLinear temperature coefficient of conductance1/K0

Connectors

  • p - This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)

  • n - This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)

  • G - This connector represents a real signal as an input to a component (RealInput)

  • heat_port - This connector represents a thermal port with temperature and heat flow as the potential and flow variables, respectively. (HeatPort)

Variables

NameDescriptionUnits
vVoltage across the component (between pin p and pin n).V
iCurrent flowing through the component (from pin p to pin n).A
G_actualActual conductance accounting for temperatureS
LossPowerPower dissipated in the conductorW

Behavior

v(t)=p.v(t)n.v(t)i(t)=p.i(t)p.i(t)+n.i(t)=0G_actual(t)=G(t)1+(T_ref+heat_port.T(t)) alphai(t)=v(t) G_actual(t)LossPower(t)=v(t) i(t)heat_port.Q_flow(t)=LossPower(t)

Source

dyad
"""
Ideal linear electrical conductor with variable conductance.

The conductance value `G` is provided as an external input signal.
An optional linear temperature coefficient `alpha` adjusts the
actual conductance based on the heat port temperature:

math G_{actual} = \frac{G}{1 + \alpha \cdot (T_{heatPort} - T_{ref})}

The electrical behavior follows Ohm's law in conductance form:

math i = G_{actual} \cdot v

Power dissipated in the conductor is transferred as heat through
the thermal port `heat_port`.

Corresponds to `Modelica.Electrical.Analog.Basic.VariableConductor`.
"""
component VariableConductor
  extends ElectricalComponents.Analog.Interfaces.OnePort
  "Conductance input signal"
  G = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -100, "x2": 550, "y2": 0, "rot": 90}
      },
      "tags": []
    }
  }
  "Thermal port for heat exchange"
  heat_port = HeatPort() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 460, "y1": 950, "x2": 560, "y2": 1050, "rot": 0}
      },
      "tags": []
    }
  }
  "Reference temperature"
  parameter T_ref::Temperature = 300.15
  "Linear temperature coefficient of conductance"
  parameter alpha::LinearTemperatureCoefficient = 0.0
  "Actual conductance accounting for temperature"
  variable G_actual::Conductance
  "Power dissipated in the conductor"
  variable LossPower::Power
relations
  assert((1 + alpha * (heat_port.T - T_ref)) >= 1e-15, "Temperature outside scope of model!")
  G_actual = G / (1 + alpha * (heat_port.T - T_ref))
  i = G_actual * v
  LossPower = v * i
  heat_port.Q_flow = -LossPower
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ElectricalComponents/Conductor.svg"}
  }
}
end
Flattened Source
dyad
"""
Ideal linear electrical conductor with variable conductance.

The conductance value `G` is provided as an external input signal.
An optional linear temperature coefficient `alpha` adjusts the
actual conductance based on the heat port temperature:

math G_{actual} = \frac{G}{1 + \alpha \cdot (T_{heatPort} - T_{ref})}

The electrical behavior follows Ohm's law in conductance form:

math i = G_{actual} \cdot v

Power dissipated in the conductor is transferred as heat through
the thermal port `heat_port`.

Corresponds to `Modelica.Electrical.Analog.Basic.VariableConductor`.
"""
component VariableConductor
  "Positive electrical pin."
  p = Pin() {
    "Dyad": {
      "placement": {"icon": {"iconName": "pos", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
    }
  }
  "Negative electrical pin."
  n = Pin() {
    "Dyad": {
      "placement": {"icon": {"iconName": "neg", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
    }
  }
  "Voltage across the component (between pin p and pin n)."
  variable v::Voltage
  "Current flowing through the component (from pin p to pin n)."
  variable i::Current
  "Conductance input signal"
  G = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -100, "x2": 550, "y2": 0, "rot": 90}
      },
      "tags": []
    }
  }
  "Thermal port for heat exchange"
  heat_port = HeatPort() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 460, "y1": 950, "x2": 560, "y2": 1050, "rot": 0}
      },
      "tags": []
    }
  }
  "Reference temperature"
  parameter T_ref::Temperature = 300.15
  "Linear temperature coefficient of conductance"
  parameter alpha::LinearTemperatureCoefficient = 0.0
  "Actual conductance accounting for temperature"
  variable G_actual::Conductance
  "Power dissipated in the conductor"
  variable LossPower::Power
relations
  v = p.v - n.v
  i = p.i
  p.i + n.i = 0
  assert((1 + alpha * (heat_port.T - T_ref)) >= 1e-15, "Temperature outside scope of model!")
  G_actual = G / (1 + alpha * (heat_port.T - T_ref))
  i = G_actual * v
  LossPower = v * i
  heat_port.Q_flow = -LossPower
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ElectricalComponents/Conductor.svg"}
  }
}
end


Test Cases

No test cases defined.