The RF Module, an add-on to the COMSOL Multiphysics® software, analyzes RF, microwave, mmWave, and THz designs in various multiphysics scenarios. The RF Module optimizes impedance matching and far-field gain pattern of antennas, and insertion loss and coupling effects of passive circuits in the application area of 5G and IoT. The EM simulation can be extended to perform multiscale modeling with ray tracing. It is possible to include other physics phenomena, such as temperature increase with absorbed radiation, and structural deformation induced by heat expansion.