thermal dynamics