{
  "node": {
    "id": "block:capacitor",
    "type": "Block",
    "label": "Capacitor",
    "properties": {
      "id": "capacitor",
      "name": "Capacitor",
      "kind": "studio",
      "summary": "An ideal lumped capacitor with an explicit initial voltage.",
      "behavior": "The terminal voltage is the continuous state; branch current equals capacitance times its rate of change. Initial voltage is an initial condition, not an added source.",
      "ports": [
        {
          "name": "p",
          "direction": "conserving",
          "unit": "V, A",
          "description": "Electrical terminal: potential and charge-conserving current."
        },
        {
          "name": "n",
          "direction": "conserving",
          "unit": "V, A",
          "description": "Electrical terminal: potential and charge-conserving current."
        },
        {
          "name": "voltage",
          "direction": "output",
          "unit": "V",
          "description": "Observed result from the solved component or sampled controller."
        },
        {
          "name": "current",
          "direction": "output",
          "unit": "A",
          "description": "Observed result from the solved component or sampled controller."
        },
        {
          "name": "power",
          "direction": "output",
          "unit": "W",
          "description": "Observed result from the solved component or sampled controller."
        }
      ],
      "parameters": [
        {
          "key": "capacitanceF",
          "label": "Capacitance F",
          "unit": "F",
          "default": 0.001,
          "min": 1e-12,
          "max": 1000000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "initialVoltageV",
          "label": "Initial Voltage V",
          "unit": "V",
          "default": 0,
          "min": -1000000,
          "max": 1000000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        }
      ],
      "equations": [
        "I = C * d(V_p - V_n)/dt"
      ],
      "example": {
        "title": "Observe an RC time constant",
        "text": "From zero initial voltage with a 1 V step, ideal capacitor voltage is about 0.632 V at 1 s and 0.865 V at 2 s.",
        "url": "https://design.lemonergy.com/cosim.html?example=physical-rc",
        "label": "Open the RC example"
      },
      "limits": [
        "This generic circuit does not identify cell parameters from measurements."
      ],
      "evidence": [
        "js/physical-network.js",
        "js/studio-examples.js"
      ],
      "caseIds": [
        "rc-response"
      ],
      "type": "capacitor",
      "implementationId": "capacitor",
      "url": "https://lemonergy.com/learn/glossary/blocks/capacitor/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/capacitor/",
      "sourceFile": "block-library.json",
      "sourceRepository": "battery-design",
      "sourceRevision": "ef9802329b75bc15bb96885f8ed5d49425106696",
      "reviewed": "2026-10-27"
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/rc-response/2",
      "type": "usesBlock",
      "source": "workflow:rc-response",
      "target": "block:capacitor",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 2,
        "name": "Capacitor",
        "type": "capacitor",
        "role": "Stores charge",
        "settings": [
          "capacitanceF",
          "initialVoltageV"
        ]
      }
    }
  ],
  "neighbors": [
    {
      "id": "workflow:rc-response",
      "type": "Workflow",
      "label": "Observe an RC time constant",
      "properties": {
        "id": "rc-response",
        "title": "Observe an RC time constant",
        "kind": "studio",
        "summary": "An RC circuit uses source, resistor, capacitor and reference blocks.",
        "steps": [
          "Keep R = 1 Ω and C = 1 F.",
          "Inspect capacitor voltage after one and two time constants."
        ],
        "example": "From zero initial voltage with a 1 V step, ideal capacitor voltage is about 0.632 V at 1 s and 0.865 V at 2 s.",
        "observe": "Doubling resistance or capacitance doubles the time constant.",
        "limits": "This generic circuit does not identify cell parameters from measurements.",
        "url": "https://design.lemonergy.com/cosim.html?example=physical-rc",
        "label": "Open the RC example",
        "evidence": [
          "js/physical-network.js",
          "js/studio-examples.js"
        ]
      }
    }
  ]
}
