I'm designing a circuit to discharge a capacitor though a coil of wire to make a large magnetic field, which is basically an undriven RLC circuit which starts out with a charged capacitor in series with an inductor and a resistor (the coil having a certain resistance in addition to its inductance). I'm trying to find an equation for the current through the coil (inductor) as a function of time after starting to discharge the capacitor. I need to find this so I can select proper components to give a sufficient magnetic field without burning out the coil. I also know that the capacitor will have a small amount of inductance which needs to be factored in. Please let me know if there is anything else like that I would need include in the calculation.