Phase transitions and ion currents in a model ferroelectric channel unit.