Ports are used to order and index gap sources for S parameter calculation. They are defined in the '''Observables''' section of the Navigation Tree. Right click on the '''Port Definition''' item of the Navigation Tree and select '''Insert New Port Definition...''' from the contextual menu. The Port Definition Dialog opens up, showing the total number of existing sources in the workspace. By default, as many ports as the total number of sources are created. You can define any number of ports equal to or less than the total number of sources. This includes both gap sources and active lumped elements (which contain gap sources). In the '''Port Association''' section of this dialog, you can go over each one of the sources and associate them with a desired port. Note that you can associate more than one source with same given port. In this case, you will have a coupled port. All the coupled sources are listed as associated with a single port. However, you cannot associate the same source with more than one port. Finally, you can assign '''Port Impedance''' in Ohms. By default, all port impedances are 50Σ. The table titled '''Port Configuration''' lists all the ports and their associated sources and port impedances.
NOTE: {{Note|In EM.CUBE you cannot assign ports to an array object, even if it contains sources on its elements. To calculate the S parameters of an antenna array, you have to construct it using individual elements, not as an array object.}}
[[File:port-definition.png]]