{
  "node": {
    "id": "block:diode",
    "type": "Block",
    "label": "Piecewise-linear diode",
    "properties": {
      "id": "diode",
      "name": "Piecewise-linear diode",
      "kind": "studio",
      "summary": "Forward threshold and finite slope; reverse leakage conductance, no breakdown or junction charge",
      "behavior": "Conserving component solved simultaneously with the connected network. Forward threshold and finite slope; reverse leakage conductance, no breakdown or junction charge",
      "ports": [
        {
          "name": "p",
          "direction": "terminal",
          "unit": "V; A",
          "description": "electrical conserving connection; voltage across and current through the connected branch."
        },
        {
          "name": "n",
          "direction": "terminal",
          "unit": "V; A",
          "description": "electrical conserving connection; voltage across and current through the connected branch."
        },
        {
          "name": "current",
          "direction": "output",
          "unit": "A",
          "description": "Recorded current measurement from the conserving simulation."
        },
        {
          "name": "voltage",
          "direction": "output",
          "unit": "V",
          "description": "Recorded voltage measurement from the conserving simulation."
        },
        {
          "name": "power",
          "direction": "output",
          "unit": "W",
          "description": "Recorded power measurement from the conserving simulation."
        }
      ],
      "parameters": [
        {
          "key": "forwardVoltageV",
          "label": "Forward threshold voltage",
          "unit": "V",
          "default": 0.7,
          "description": "Voltage at which the diode changes from leakage conductance to its forward resistance.",
          "min": 0,
          "max": 1000
        },
        {
          "key": "onResistanceOhm",
          "label": "On-state resistance",
          "unit": "ohm",
          "default": 0.01,
          "description": "Resistance of the conducting branch or conducting end of the memristor model.",
          "min": 1e-06,
          "max": 1000000000
        },
        {
          "key": "offConductanceS",
          "label": "Reverse leakage conductance",
          "unit": "S",
          "default": 0,
          "description": "Conductance applied below the diode forward threshold.",
          "min": 0,
          "max": 1000
        }
      ],
      "equations": [
        "I = Goff V for V ≤ Vf; I = Goff Vf + (V − Vf)/Ron otherwise"
      ],
      "example": {
        "title": "Piecewise-linear diode worked example",
        "text": "Editable first-party network. supply: voltageV=5; resistor: resistanceOhm=100. Checks below were verified in the native execution engine.",
        "url": "https://design.lemonergy.com/cosim.html?example=physical-diode",
        "label": "Open Studio example",
        "inputs": [
          {
            "port": "forwardVoltageV",
            "label": "Forward threshold voltage",
            "value": 0.7,
            "unit": "V"
          },
          {
            "port": "onResistanceOhm",
            "label": "On-state resistance",
            "value": 0.01,
            "unit": "ohm"
          },
          {
            "port": "offConductanceS",
            "label": "Reverse leakage conductance",
            "value": 0,
            "unit": "S"
          }
        ],
        "checks": [
          {
            "port": "target/current",
            "label": "current",
            "atS": 1,
            "value": 0.0429957004,
            "unit": "A",
            "tolerance": 4.2995700429957e-08
          },
          {
            "port": "target/voltage",
            "label": "voltage",
            "atS": 1,
            "value": 0.700429957,
            "unit": "V",
            "tolerance": 7.004299570042994e-07
          },
          {
            "port": "target/power",
            "label": "power",
            "atS": 1,
            "value": 0.0301154766,
            "unit": "W",
            "tolerance": 3.0115476603530505e-08
          }
        ]
      },
      "limits": [
        "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."
      ],
      "references": [
        "physical-circuit",
        "physical-power"
      ],
      "availability": {
        "status": "released",
        "label": "Available in Lemonergy Studio",
        "detail": "The bundled example is available in the production release verified on 28 October 2026. The parameters and examples here are synthetic teaching fixtures, not a characterized cell or a validated operating limit."
      },
      "evidence": [
        "docs/glossary/native-block-verification.json"
      ],
      "sourceRepository": "Lemonergy Studio public contract",
      "sourceRevision": "verification-2026-10-27",
      "caseIds": [
        "native-diode"
      ],
      "type": "diode",
      "implementationId": "diode",
      "url": "https://lemonergy.com/learn/glossary/blocks/diode/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/diode/",
      "sourceFile": "block-library.json",
      "reviewed": "2026-10-27",
      "releaseEvidence": {
        "environment": "production",
        "status": "verified",
        "revision": "e76cadfc203e15eb41f3478d8b1044a5b851953d",
        "verifiedOn": "2026-10-28",
        "exampleUrls": [
          "https://design.lemonergy.com/cosim.html?example=physical-diode"
        ]
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/native-diode/0",
      "type": "usesBlock",
      "source": "workflow:native-diode",
      "target": "block:diode",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Piecewise-linear diode",
        "type": "diode",
        "role": "Conserving component solved simultaneously with the connected network. Forward threshold and finite slope; reverse leakage conductance, no breakdown or junction charge",
        "settings": [
          "Use the block reference for settings and connections.",
          "Bundled example verified on the production release of 28 October 2026."
        ]
      }
    }
  ],
  "outgoing": [
    {
      "id": "edge:cites/block:diode/reference:physical-circuit",
      "type": "cites",
      "source": "block:diode",
      "target": "reference:physical-circuit",
      "properties": {
        "sourceFile": "block-library.json",
        "scope": "Scientific or mathematical background; implementation scope is stated by the block contract"
      }
    },
    {
      "id": "edge:cites/block:diode/reference:physical-power",
      "type": "cites",
      "source": "block:diode",
      "target": "reference:physical-power",
      "properties": {
        "sourceFile": "block-library.json",
        "scope": "Scientific or mathematical background; implementation scope is stated by the block contract"
      }
    }
  ],
  "neighbors": [
    {
      "id": "workflow:native-diode",
      "type": "Workflow",
      "label": "Piecewise-linear diode worked example",
      "properties": {
        "id": "native-diode",
        "title": "Piecewise-linear diode worked example",
        "kind": "studio",
        "summary": "Forward threshold and finite slope; reverse leakage conductance, no breakdown or junction charge",
        "steps": [
          "Review the interface, units and model limits.",
          "Open the Studio example and run its bundled model.",
          "Compare outputs with the numerical checks; change one input and run again."
        ],
        "example": "Editable first-party network. supply: voltageV=5; resistor: resistanceOhm=100. Checks below were verified in the native execution engine.",
        "observe": "Inspect the output channels and checks on the block reference page.",
        "limits": "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.",
        "url": "https://design.lemonergy.com/cosim.html?example=physical-diode",
        "label": "Open Studio example",
        "evidence": [
          "docs/glossary/native-block-verification.json"
        ]
      }
    },
    {
      "id": "reference:physical-circuit",
      "type": "Reference",
      "label": "Kirchhoff's Rules",
      "properties": {
        "title": "Kirchhoff's Rules",
        "publisher": "OpenStax, Rice University",
        "url": "https://openstax.org/books/university-physics-volume-2/pages/10-3-kirchhoffs-rules",
        "type": "Primary educational or metrology reference",
        "scope": "Underlying physical law or reduced-model basis; Lemonergy implementation choices and limits are documented separately.",
        "accessed": "2026-10-27"
      }
    },
    {
      "id": "reference:physical-power",
      "type": "Reference",
      "label": "Electrical Energy and Power",
      "properties": {
        "title": "Electrical Energy and Power",
        "publisher": "OpenStax, Rice University",
        "url": "https://openstax.org/books/university-physics-volume-2/pages/9-5-electrical-energy-and-power",
        "type": "Primary educational or metrology reference",
        "scope": "Underlying physical law or reduced-model basis; Lemonergy implementation choices and limits are documented separately.",
        "accessed": "2026-10-27"
      }
    }
  ]
}
