Schematic Diagram- -Waveforms for 0 to 1ms Waveform shows transient condition. The average capacitor current is non-zero and leads to charging of capacitor from zero to 20V. Diode current- The diode current CCA value is 3A (As calculated) -Waveform for 9.98 to 10ms Circuit is in steady state with CCA value of capacitor 0 A. Capacitor current switches between load current of 3A (discharge). As id-ir=2A (charge). This small current results in voltage ripple in the capacitor.