Effective thermodynamic potentials and internal variables: Linear viscoelastic composites