Lemonergy · Studio block
Piecewise-linear diode
Forward threshold and finite slope; reverse leakage conductance, no breakdown or junction charge
- Implementation ID
diode- Reviewed
- 2026-10-27
Behavior
Conserving component solved simultaneously with the connected network. Forward threshold and finite slope; reverse leakage conductance, no breakdown or junction charge
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. |
power | output | W | Recorded power 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 |
|---|---|---|---|
Forward threshold voltageforwardVoltageV | V | 0.7 | Voltage at which the diode changes from leakage conductance to its forward resistance. Minimum 0; Maximum 1000 |
On-state resistanceonResistanceOhm | ohm | 0.01 | Resistance of the conducting branch or conducting end of the memristor model. Minimum 1e-06; Maximum 1000000000 |
Reverse leakage conductanceoffConductanceS | S | 0 | Conductance applied below the diode forward threshold. Minimum 0; Maximum 1000 |
Equations and rules
I = Goff V for V ≤ Vf; I = Goff Vf + (V − Vf)/Ron otherwise
Worked example
Piecewise-linear diode worked example
Editable first-party network. supply: voltageV=5; resistor: resistanceOhm=100. 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 | 0.0429957004 | A | 4.2995700429957e-08 |
voltagetarget/voltage | 1 | 0.700429957 | V | 7.004299570042994e-07 |
powertarget/power | 1 | 0.0301154766 | W | 3.0115476603530505e-08 |
Use in a workflow
Piecewise-linear diode worked example
Forward threshold and finite slope; reverse leakage conductance, no breakdown or junction charge
- Piecewise-linear diode: Conserving component solved simultaneously with the connected network. Forward threshold and finite slope; reverse leakage conductance, no breakdown or junction charge
- Use the block reference for settings and connections.
- Implementation tested locally; public release pending.
Connected concepts
Limits and interpretation
- Forward threshold and finite slope; reverse leakage conductance, no breakdown or junction charge
- 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)