Skip to content
LIBRARY
Analog.Basic.TranslationalEMF.md

Analog.Basic.TranslationalEMF

Electromotive force (electric/translational-mechanic transformer).

Converts electrical energy into translational mechanical energy and vice versa. The induced voltage is proportional to the translational velocity, and the generated force is proportional to the current:

v=kvelf=ki

where k is the electrical force constant (N/A), vel is the velocity of the flange relative to the support, and f is the force on the flange.

The support connector is always exposed. To ground the support, connect it to TranslationalComponents.Components.Fixed() externally. This replaces the Modelica useSupport conditional parameter, which is not yet supported in Dyad.

Corresponds to Modelica.Electrical.Analog.Basic.TranslationalEMF.

Usage

ElectricalComponents.Analog.Basic.TranslationalEMF(k=1)

Parameters:

NameDescriptionUnitsDefault value
kTransformation coefficientN/A1

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)

  • flange - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)

  • support - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)

Variables

NameDescriptionUnits
vVoltage drop between the two pinsV
iCurrent flowing from positive to negative pinA
sPosition of flange relative to supportm
velVelocity of flange relative to supportm/s
fForce of flangeN
fElectricalElectrical forceN

Behavior

v(t)=p.v(t)n.v(t)0=p.i(t)+n.i(t)i(t)=p.i(t)s(t)=flange.s(t)support.s(t)vel(t)=d s(t)dtk vel(t)=v(t)f(t)=k i(t)fElectrical(t)=f(t)f(t)=flange.f(t)support.f(t)=f(t)

Source

dyad
"""
Electromotive force (electric/translational-mechanic transformer).

Converts electrical energy into translational mechanical energy and vice versa.
The induced voltage is proportional to the translational velocity, and the
generated force is proportional to the current:

math v = k \cdot vel

math f = -k \cdot i

where `k` is the electrical force constant (N/A), `vel` is the velocity of
the `flange` relative to the `support`, and `f` is the force on the `flange`.

The `support` connector is always exposed. To ground the support, connect it
to `TranslationalComponents.Components.Fixed()` externally. This replaces the Modelica
`useSupport` conditional parameter, which is not yet supported in Dyad.

Corresponds to `Modelica.Electrical.Analog.Basic.TranslationalEMF`.
"""
component TranslationalEMF
  "Positive electrical pin"
  p = Pin() {
    "Dyad": {
      "placement": {"icon": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50}}
    }
  }
  "Negative electrical pin"
  n = Pin() {
    "Dyad": {
      "placement": {"icon": {"iconName": "default", "x1": 450, "y1": 950, "x2": 550, "y2": 1050}}
    }
  }
  "Translational flange"
  flange = Flange() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Support/housing flange"
  support = Flange() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "Transformation coefficient"
  parameter k::ElectricalForceConstant = 1
  "Voltage drop between the two pins"
  variable v::Voltage
  "Current flowing from positive to negative pin"
  variable i::Current
  "Position of flange relative to support"
  variable s::Position
  "Velocity of flange relative to support"
  variable vel::Velocity
  "Force of flange"
  variable f::Force
  "Electrical force"
  variable fElectrical::Force
relations
  v = p.v - n.v
  0 = p.i + n.i
  i = p.i
  s = flange.s - support.s
  vel = der(s)
  k * vel = v
  f = -k * i
  fElectrical = -f
  f = flange.f
  support.f = -f
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ElectricalComponents/TranslationalEMF.svg"}
  }
}
end
Flattened Source
dyad
"""
Electromotive force (electric/translational-mechanic transformer).

Converts electrical energy into translational mechanical energy and vice versa.
The induced voltage is proportional to the translational velocity, and the
generated force is proportional to the current:

math v = k \cdot vel

math f = -k \cdot i

where `k` is the electrical force constant (N/A), `vel` is the velocity of
the `flange` relative to the `support`, and `f` is the force on the `flange`.

The `support` connector is always exposed. To ground the support, connect it
to `TranslationalComponents.Components.Fixed()` externally. This replaces the Modelica
`useSupport` conditional parameter, which is not yet supported in Dyad.

Corresponds to `Modelica.Electrical.Analog.Basic.TranslationalEMF`.
"""
component TranslationalEMF
  "Positive electrical pin"
  p = Pin() {
    "Dyad": {
      "placement": {"icon": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50}}
    }
  }
  "Negative electrical pin"
  n = Pin() {
    "Dyad": {
      "placement": {"icon": {"iconName": "default", "x1": 450, "y1": 950, "x2": 550, "y2": 1050}}
    }
  }
  "Translational flange"
  flange = Flange() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Support/housing flange"
  support = Flange() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "Transformation coefficient"
  parameter k::ElectricalForceConstant = 1
  "Voltage drop between the two pins"
  variable v::Voltage
  "Current flowing from positive to negative pin"
  variable i::Current
  "Position of flange relative to support"
  variable s::Position
  "Velocity of flange relative to support"
  variable vel::Velocity
  "Force of flange"
  variable f::Force
  "Electrical force"
  variable fElectrical::Force
relations
  v = p.v - n.v
  0 = p.i + n.i
  i = p.i
  s = flange.s - support.s
  vel = der(s)
  k * vel = v
  f = -k * i
  fElectrical = -f
  f = flange.f
  support.f = -f
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ElectricalComponents/TranslationalEMF.svg"}
  }
}
end


Test Cases

No test cases defined.