Here is a simulated circuit which consists of an alternator, a switch, an ammeter, a coil, a resistor and a capacitor (this last one only when C is different from zero)  this circuit is called: an RLC circuit.