I have never read any paper/book about this case of resistor calculation.
This is an RC circuit. Every RC circuit has its time constant t=RC, and the capacitor is considered to be fully charged (from 0) or discharged (from full) in the duration of 4RC.
So, in my opinion, there are some matters here you have to take into accounts:
- For simple calculation, you can suppose the curve of voltage drop on R when C charging is linear, maximum = 400V when starting charging, and 0V when fully charged.
So, the average voltage drop on R: Vr = (400 + 0)/2 = 200V
And the average dissipation on R: Pr= 200V^2/1000 ohm = 40W.
- The charging time: = 4RC = 4*1000ohm*0.00000022Farad = 0.00088sec # 1ms.
Or: R will dissipate a average wattage of 40W in 1ms.
With the above calculation, any wattage of R should be satisfied since the time duration is fairly short.
- However, there is an important thing you have to consider: the maximum current allowed for the bonded contacts of the resistor/capacitor (component leads bond to resistor body or capacitor plates). This parameter is not informed by the component manufacturers for the common parts. In general, capacitor is made to survive with the current at its capacitance. And the resistor, the bigger size, the better conducting. That is why your 5W or 10W resistors died, they can only afford sqrt 5W/1000ohm = 0.07A max. or sqrt 10W/1000ohm = 0.1A max. while the maximum current in circuit = 400V/1000oym = 0.4A.
So, my opinion is you should use the resistor of 40W at least, 50W as good in your circuit and experience.
Just to discuss with you.
nguyennam