This page describes how to calculate the effective bulk material properties of a metamaterial using the Sparameters of the material.

We use technique described in Smith et al. to extract the effective material parameters from Sparameter measurements. In particular, the following technique assumes the device behaves symmetrically for forward and backward propagation. If the device does not have this symmetry, the analysis must be modified appropriately as discussed further down.
From Eq. (9) in the reference paper, the effective refractive index neff is calculated as:
$$ {n_{e f f}=\frac{1}{k d} \cos ^{1}\left(\frac{1S_{11}^{2}+S_{21}^{2}}{2 S_{21}}\right)} $$
and the effective impedance is
$$ {z=\sqrt{\frac{\left(1+S_{11}\right)^{2}S_{21}^{2}}{\left(1S_{11}\right)^{2}S_{21}^{2}}}} $$
Once the effective refractive index and the effective impedance are obtained, it is easy to retrieve the effective permittivity and the effective permeability as following:
$$ \epsilon_{\tt eff}=n/z $$
$$ \mu_{\tt eff}=nz $$
Important note:It is important to remember that parameter extraction is nontrivial. Determining n and z (and therefore epsilon and mu) unambiguously is one of the challenges in this field, and is still an area of active research. One issue is that the above functions are multivalued. Selecting the wrong root will lead to incorrect results. The above calculation, which is implemented in the S parameter analysis object, works in some situations, but it certainly does not work in all cases. The implementation provided in the Effective parameters  Smith example should be viewed as a starting point for your parameter extraction work, rather than a robust analysis that will work in all situations. For an alternate extraction method, see the Szabó reference provided at the top of this page. 
This section will give a brief overview of the method for calculating the effective material properties that applies when the device behaves differently in the forward and backward source propagation directions. In other words, when the scattering parameter S11 is not equal to S22. This may be the case if there is a substrate on one side of the metamaterial. In this nonsymmetric case, the following equations still apply:
$$ \epsilon_{\tt eff}=n/z $$
$$ \mu_{\tt eff}=nz $$
And we can use the following equations to obtain n and z:
$$\cos (n k d)=\frac{1}{2 S_{21}}\left(1S_{11} S_{22}+S_{21}^{2}\right) $$
$$ {z=\frac{\left(T_{22}T_{11}\right) \pm \sqrt{\left(T_{22}T_{11}\right)^{2}+4 T_{12} T_{21}}}{2 T_{21}}} $$
The values of the T matrix can be calculated from the S parameters as well:
$$ \begin{array}{l}{T_{11}=\frac{\left(1+S_{11}\right)\left(1S_{21}\right)+S_{21} S_{12}}{2 S_{21}}} \\ {T_{12}=\frac{\left(1+S_{11}\right)\left(1+S_{21}\right)S_{21} S_{12}}{2 S_{21}}} \\ {T_{21}=\frac{\left(1S_{11}\right)\left(1S_{22}\right)S_{21} S_{12}}{2 S_{21}}} \\ {T_{22}=\frac{\left(1S_{11}\right)\left(1+S_{22}\right)+S_{21} S_{12}}{2 S_{21}}}\end{array} $$
The above method is also discussed in the Smith et al. reference. Since these equations require us to know S21 and S22, we need to run two simulations, one with the source propagating in the forward direction, and the other with the source propagating in the backward direction in order to get these values. The analysis in the Sparameters analysis group is set up to perform the analysis for the symmetric case. As with the symmetric case, parameter extraction is nontrivial due to challenges with choosing the correct roots of the equation.