electricpy.passive.vcapdischarge

electricpy.passive.vcapdischarge(t, Vs, R, C)[source]

Discharging Capacitor Function.

Function to calculate the voltage of a capacitor that is discharging given the time.

\[V_c=V_s*e^{\frac{-t}{R*C}}\]
Parameters:
  • t (float) – The time at which to calculate the voltage.

  • Vs (float) – The starting voltage for the capacitor.

  • R (float) – The ohmic value of the resistor being used to discharge.

  • C (float) – Capacitive value (in Farads).

Returns:

Vc – The calculated voltage of the capacitor.

Return type:

float