Lets say we are looking at a waveguide with a perfect electric conductor as boundary (red), filled with air and an other perfect conductor(red) inside. Say this waveguide is homogenize in longitudinal direction and infinitely long. We can look at the transverse plane of this waveguide:
If we look at the whole plane, one can say with confidence that $$ \nabla \cdot D(x,y,z) =0 $$ But if look at the static mode TEM and take into account only a part of this plane, say only the green area, then the formula no longer holds.
So my question is: when calculating the electrical field of a waveguide using eigenvalue equation like $ \nabla \times \nabla \times E(x,y,z) = \omega^2 E(x,y,z) $, when can one assume that $ \nabla \cdot D(x,y,z) =0 $ ?
I am considering a 3D case, where as the calculation of the eigenmodes can be limited to a 2D case. For this one often sets $\nabla \cdot D=0$. And this is why I need to know the answer to my question.