On a thermodynamic theory for magnetic relaxation phenomena due to n microscopic phenomena described by n internal variables