Lemonergy · Studio block
Controlled electrical switch
Finite on/off resistance with an explicit control threshold; no arc or contact bounce
- Implementation ID
electrical-switch- Reviewed
- 2026-10-27
Behavior
Conserving component solved simultaneously with the connected network. Finite on/off resistance with an explicit control threshold; no arc or contact bounce
Interface
| Name | Direction | Unit | Meaning |
|---|---|---|---|
p | terminal | V; A | electrical conserving connection; voltage across and current through the connected branch. |
n | terminal | V; A | electrical conserving connection; voltage across and current through the connected branch. |
current | output | A | Recorded current measurement from the conserving simulation. |
voltage | output | V | Recorded voltage measurement from the conserving simulation. |
closed | output | fraction | Recorded closed measurement from the conserving simulation. |
Parameters
Defaults are initial model values. Select values for your own model and operating conditions.
| Parameter | Unit | Default | Meaning and limits |
|---|---|---|---|
On-state resistanceonResistanceOhm | ohm | 0.01 | Resistance of the conducting branch or conducting end of the memristor model. Minimum 1e-06; Maximum 1000000000 |
Off-state resistanceoffResistanceOhm | ohm | 1000000000 | Resistance of the open switch or insulating end of the memristor model. Minimum 1e-06; Maximum 1000000000000 |
Switch commandgate | dimensionless | 0 | Configured switch command when no external command is connected. Minimum 0; Maximum 1 |
Switching thresholdthreshold | dimensionless | 0.5 | The switch is on when its command is at least this value. Minimum 0; Maximum 1 |
Equations and rules
R = Ron when gate ≥ threshold, otherwise RoffI = V/R
Worked example
Controlled electrical switch worked example
Editable first-party network. supply: voltageV=5; target: onResistanceOhm=5; target: gate=1. Checks below were verified in the native execution engine.
Open Studio example after release →| Output | Time (s) | Expected value | Unit | Absolute tolerance |
|---|---|---|---|---|
currenttarget/current | 1 | 1 | A | 1e-06 |
voltagetarget/voltage | 1 | 5 | V | 4.9999999999999996e-06 |
closedtarget/closed | 1 | 1 | fraction | 1e-06 |
Use in a workflow
Controlled electrical switch worked example
Finite on/off resistance with an explicit control threshold; no arc or contact bounce
- Controlled electrical switch: Conserving component solved simultaneously with the connected network. Finite on/off resistance with an explicit control threshold; no arc or contact bounce
- Use the block reference for settings and connections.
- Implementation tested locally; public release pending.
Connected concepts
Limits and interpretation
- Finite on/off resistance with an explicit control threshold; no arc or contact bounce
- Demonstration parameters are not calibrated hardware data. Singular or incompatible ideal constraints and unsupported state ranges stop the run.
Scientific and mathematical references
These sources explain the scientific and mathematical background. The behavior, interface and limits above define the Lemonergy implementation; a citation does not imply every model option in the source is implemented.
- Kirchhoff's Rules
OpenStax, Rice University
Technical reference · Underlying physical law or reduced-model basis; Lemonergy implementation choices and limits are documented separately.
- Electrical Energy and Power
OpenStax, Rice University
Technical reference · Underlying physical law or reduced-model basis; Lemonergy implementation choices and limits are documented separately.
Implementation sources
This reference follows the public interface and locally verified numerical checks for an upcoming release.
Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27
docs/glossary/native-block-verification.json
This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)