Modeling of guided wave devices