Finite element model of charge transport across ionic channels