Self-consistent numerical method to study nonlinearity in high-Tc superconductors using complex conductivity