Capacitor

An ideal capacitor.

  • electrical
  • Gradara equations
  • 2 ports
  • 1 parameter
BlockCapacitorKindcapacitorLibraryElectrical

Description

An ideal linear capacitor. The current through it is proportional to the rate of change of the voltage across it.

Example

RC and RL transients A 10 V step charges a capacitor through a resistor, and another builds current in an inductor through a conductor.

Step 10 VR 1 kΩC 100 µFCapacitor voltageGroundStep 10 V (RL)G 0.1 SInductor currentL 1 HGround (RL)
In Gradara, select a Capacitor block and press F1, then choose Open example. It opens as a new model in My models, ready to run.

Also in this example:Voltage sensorCurrent sensorGroundResistorInductorConductorStep voltage

Ports

Conserving terminals 2

  • +p

    Positive pin. Current into p charges the capacitor.

  • −n

    Negative pin.

Parameters

  • CapacitanceC0.001 F

    ≥ 1e-12

    Capacitance, in farads. At least 1 pF.

Equations

Modelica
v = p.v − n.v
p.i + n.i = 0
C · dv/dt = p.i
v(0) = 0

Assumptions and limitations

  • Starts discharged: the initial voltage is fixed at 0 V and cannot be changed.
  • No leakage, series resistance, or voltage limit.

Tips

  • Connecting it directly across a voltage source forces an instant change in its voltage; add a small series resistor.

Used in

These larger examples use it too. Open them from Examples in the app.

  • Buck converter · Ideal switches
  • 480 VAC → 24 VDC flyback

See also

Select a block in Gradara and press F1 to open its page offline.