Modeling linear and nonlinear soft ferromagnetic materials