  We give an explicit formula for the membrane potential of cells in terms of
the intracellular and extracellular ionic concentrations, and derive equations
for the ionic currents that flow through channels, exchangers and electrogenic
pumps based on simple energy considerations and conservation laws. We
demonstrate that the work done by the pump is equal to the potential energy of
the cell plus the energy loss due to the downhill ionic fluxes through the
channels and the exchanger. Our equations predict osmotic pressure variations.
The theory is illustrated in a simple model of spontaneously active cells in
the cardiac pacemaker. The simulated action potential and the five currents in
the model are in excellent agreement with experiments. The model predicts the
experimental observed intracellular ionic concentration of potassium, calcium
and sodium. We do not see any drift of the values for the concentrations in a
long time simulation, instead we can obtain the same asymptotic values starting
with equal intracellular and extracellular ionic concentrations.
