Op-amp Power Dissipation Calculation for a pulse output

I am trying to calculate the power dissipation of the op-amp for a circuit as below. I am wondering if I did it correctly. Can anyone provide any tutorial on this?

So this opamp will output approximately 11V rectangular wave for a duty cycle of 22%. One opamp will source and the other will sink, and vice versa. The quiescent current of the opamp is 10mA. The output current I get is 500mA peak by measuring with current probe. The two op-amp are single chip package.

Here is the simulated output waveform of both op-amp

The power consumption of the opamp I calculated as : $$P_{consumption} = V_{cc}*I_q = 12 \times 10mA = 0.12W$$

Then I calculate the power dissipation of the output : $$P_{dissipated} = (V_{cc} - V_{peak})\times I_o \times D = (12-11) \times 0.5 \times 0.22 = 0.11W$$ Finally, I combined both power to get the total power dissipated $$P_{total} = 0.23W$$

I felt that my calculation is incorrect. Using the result of my calculation, the junction temperature is about 40C at 25C ambient but the case temperature is 45C when I measured the case with a RTD.

$$R_{\theta JA} = 65C/W$$ $$T_j = 25 + 65\times 0.23 = 40C$$

Could anyone look at this and teach me what is the right way to calculate the power dissipation of the opamp? Besides that, how do I calculate the power of the lower op-amp when it is sinking?