Lemonergy · Studio block

Capacitor

An ideal lumped capacitor with an explicit initial voltage.

Implementation ID
capacitor
Reviewed
2026-10-27

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.

Interface

Capacitor interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.CapacitorStudio blockvoltagecurrentpowerpn
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
pconservingV, AElectrical terminal: potential and charge-conserving current.
nconservingV, AElectrical terminal: potential and charge-conserving current.
voltageoutputVObserved result from the solved component or sampled controller.
currentoutputAObserved result from the solved component or sampled controller.
poweroutputWObserved result from the solved component or sampled controller.

Parameters

Defaults are initial model values. Select values for your own model and operating conditions.

Configuration fields
ParameterUnitDefaultMeaning and limits
Capacitance F
capacitanceF
F0.001Configured model parameter; the default is an initial editor value, not an operating recommendation.
Minimum 1e-12; Maximum 1000000
Initial Voltage V
initialVoltageV
V0Configured model parameter; the default is an initial editor value, not an operating recommendation.
Minimum -1000000; Maximum 1000000

Equations and rules

  • I = C * d(V_p - V_n)/dt

Worked example

Observe an RC time constant

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.

Open the RC example →

Use in a workflow

Observe an RC time constant

An RC circuit uses source, resistor, capacitor and reference blocks.

  1. Capacitor: Stores charge
    • capacitanceF
    • initialVoltageV
Open the RC example

Connected concepts

Limits and interpretation

  • This generic circuit does not identify cell parameters from measurements.

Implementation sources

This reference follows Lemonergy implementation sources. Scientific articles support the linked concepts separately.

Repository: battery-design · Revision: ef9802329b75bc15bb96885f8ed5d49425106696

  • js/physical-network.js
  • js/studio-examples.js

This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)