Computational modeling of nonlinear electromagnetic phenomena