Calculation to solve for capacitance and joules, when I, dVTotal, td, and ESR are all known.  
C (farads) Joules Vstart (volts) Vend (volts) I (amps) td (sec) ESR (ohms)
  Stack Size and Capacitance  
  Number of capacitors in stack Stack Capacitance (farads) Voltage Required Capacitor Voltage Rating Capacitor Size (farad)  
  Calculation to solve for dvTotal, when I, td, C and ESR are known.  
   dVTotal = I *td/C + I * ESR   
(change in voltage)
I (amps) td (sec) C (farads) ESR (ohms)  
  Calculation to solve for td, when I, dVTotal, C, and ESR are known.  
  td = C ((dVTotal - I * ESR))/I          
td (sec) I (amps) dVTotal (volts) C (farads) ESR (ohms)
    Input field     Calculated field  
I = Current in Amps
dvTotal = Vstart- Vend, The change in voltage, from the start to end of the discharging time.
Vstart = Initial voltage
Vend = Ending voltage
  C = Capacitance in Farads  
ESR - Equivalent Series Resistance in Ohms
ΔT = Derating factor, which is substracted from the maximum temperature specification of the capacitor.
  RCA = Thermal resistance case to ambient  
Note:  Calculation assume a constant current.