A Variational Principle for the Hygrothermoelastodynamic Analysis of Mechanism Systems