Numerical modeling of generalized millimeter-wave transmission media with finite element and transmission line matrix methods