Physical knowledge improves prediction of EM Fields