How This Simulator Works
This simulator models the behavior of electrical circuits using fundamental equations from circuit theory. You can change values of resistance (R), inductance (L), and capacitance (C) to see how the system responds over time.
Workflow of the Simulator
- User inputs circuit parameters: V₀, R, L, C, and time range
- The simulator calculates key constants:
- Damping factor: Îą = R / (2L)
- Natural frequency: Ď₀ = 1 / √(LC)
- Based on values, system detects:
- Underdamped (oscillating)
- Critically damped
- Overdamped
- Voltage v(t), current i(t), and energy are computed at small time steps
- Graph updates in real-time (oscilloscope style)
Mathematical Model
đš RC Charging
v(t) = V₀ (1 - e-t/RC)
đš RC Discharging
v(t) = V₀ e-t/RC
đš RLC Circuit Equation
L d²q/dt² + R dq/dt + q/C = 0
đš Underdamped Solution
v(t) = V₀ e-Îąt cos(Ďd t)
where:
Îą = R / (2L)
Ď₀ = 1 / √(LC)
Ďd = √(Ď₀² - Îą²)
Energy in Circuit
Energy in Capacitor:
EC = (1/2) C v²
Energy in Inductor:
EL = (1/2) L i²
What to Observe
- Energy oscillates between capacitor and inductor
- Resistance causes energy loss over time
- Higher R → faster damping
- Lower R → more oscillations
- At resonance, oscillations are strongest
This simulator helps visualize how real electrical systems behave, making abstract differential equations easier to understand through graphs and animation.