Theory of the computer code RET 1 for the calculation of space-time dependent temperature and composition properties of metal hydride hydrogen storage beds