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 =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 = \omega^2 E $, when can one assume that $ \nabla \cdot D =0 $ ?