Index-2 elliptic partial differential-algebraic models for circuits and devices