In this case a cross section is viewed in the xy-plane of the actual 3D geometry. The geometry is mathematically extended to infinity in both directions along the
z-axis, assuming no variation along that axis or that the field has a prescribed wave vector component along that axis. All the total flows in and out of boundaries are per unit length along the
z-axis. A simplified way of looking at this is to assume that the geometry is extruded one unit length from the cross section along the
z-axis. The total flow out of each boundary is then from the face created by the extruded boundary (a boundary in 2D is a line).
This is shown in the model H-Bend Waveguide 2D, where the electric field only has one component in the
z direction and is constant along that axis. The second approach is when there is a problem where the influence of the finite extension in the third dimension can be neglected.

In addition to selecting 2D or 2D axisymmetry when you start building the model, the physics interfaces (The Electromagnetic Waves, Frequency Domain Interface or
The Electromagnetic Waves, Transient Interface) in the Model Builder offers a choice in the Components settings section. The available choices are Out-of-plane vector, In-plane vector, and Three-component vector. This choice determines what polarizations can be handled. For example, as you are solving for the electric field, a 2D TM (out-of-plane H field) model requires choosing In-plane vector as then the electric field components are in the modeling plane.