CAD tools for metamaterial simulation