# Modeling the field inside a cavity resonator

As part of the design of an experiment, I am trying to model the magnetic fields inside a hollow rectangular waveguide cavity. I have not had any problems calculating the cavity physical dimensions for the desired mode and resonant frequency, and I have obtained equations for the electric and magnetic fields. $$\mathrm{For\;reference\;:\;}\begin{cases}f_c=2.87\;\mathrm{[GHz]}\\\mathrm{Cavity\;dimensions\;}(a\cdot b\cdot d)=7.39\cdot5\cdot7.39\;\mathrm{[cm]}\\\mathrm{Mode\;TE_{101}}\end{cases}$$

$$\mathrm{Fields\;\;:\;}\begin{cases}E_x=0\\E_y=-2 j f_c \mu a H_0\sin\left(\frac{\pi x}{a}\right)\sin\left(\frac{\pi z}{a}\right) \\E_z=0\\H_x=-H_0 \sin\left(\frac{\pi x}{a}\right)\cos\left(\frac{\pi z}{a}\right)\\H_y=0\\H_z=H_0\cos\left(\frac{\pi x}{a}\right)\sin\left(\frac{\pi z}{a}\right)\end{cases}\;\;\;\;\mathrm{with}\;\;h^2\equiv \left(\frac{\pi}{a}\right)^2+\left(\frac{\pi}{b}\right)^2$$

My problem is that these equations have the field amplitude $$H_0$$ as a free parameter, where I would like it to be determined by the power injected into the cavity. I imagine that the assumption of perfectly conductive walls has to be discarded, to account for the fact that power is being continuously injected and dissipated.

Is there an analytical method to calculate the field amplitude inside a resonant cavity from the injected power, or would this require numerical simulation using HFSS or similar finite-element modeling software? I am looking for ballpark, order-of-magnitude values, not exact results.

• You can relate $E_0$ to the energy stored in the cavity. You say that there is injected power. If the energy stored is constant while you are adding energy, then there must be loss mechanisms. (The fact that you can add power implies that there are loss mechanisms.) Your model will have to include the loss mechanisms. Once you account for losses you can calculate the $Q$ of the cavity, and from that relate the stored energy to the input power. I can't see how you can proceed without estimating the losses. – garyp Sep 25 '16 at 12:04
• Yes, essentially what I was asking (but now that I re-read my question I realize that it wasn't really clear) was how to include resistive losses from the cavity walls in the model. I think I have found how to do it; once I have worked out the numbers, I will post my results as an answer for reference. Thank you for your comment. – hlouis Sep 25 '16 at 12:48