Background
So I was looking at this wonderful post of John Baez's blog: classical mechanics versus thermodynamics part $3$:
One can in some sense loosely relate:
\begin{array}{|c|c|}\hline \textbf{Classical Mechanics} & \textbf{Thermodynamics} \\ \hline \text{Action: }W(q,t) & \text{Internal energy: }U(V,S) \\ \hline \text{Position: }q & \text{Entroy: }S \\ \hline \text{Momentum: }p=\frac{\partial{W}}{\partial{q}} & \text{Temperature: }T=\frac{\partial{U}}{\partial{S}} \\ \hline \text{Time: }t & \text{Volume: }V \\ \hline \text{Energy: }H=-\frac{\partial{W}}{\partial{t}} & \text{Pressure: }P=-\frac{\partial{U}}{\partial{V}}\\ \hline dW=pdq-Hdt & dU=TdS-PdV \\ \hline \end{array}
What’s really going on in this analogy? It’s not really the match-up of variables that matters most—it’s something a bit more abstract. Let’s dig deeper....
Summary
In thermodynamics, any $2$d region $R$ in the surface $\Lambda$ of equilibrium states has
$$ \int_R \omega = 0$$
This is equivalent to the Maxwell relations.
In classical mechanics, any $2$d region $R$ in the surface $\Lambda$ of allowed $(q,p,t,H)$ $4$-tuples for particle trajectories through a single point $(q_0,t_0)$ has
$$ \int_R \omega' = 0$$
This is equivalent to Hamilton’s equations.
These facts generalize when we add extra degrees of freedom, e.g. the particle number $N$ in thermodynamics:
$$ \omega = dT dS - dP dV + d\mu dN $$
or with more dimensions in classical mechanics.
$$ \omega' = dp_1 dq_1 + dp_2 dq_2 + dp_3 dq_3 - dH dt $$
Question
Naively I would guess for a thermodynamic system is there a mapping that enables me to take:
$$ \omega' \to \omega$$
as $S$ is a function of accessible volume of phase space, $T$ is a parameter that tells the momentum distribution, etc. I would love to know what it is explictly? (assume $dN = 0$ for simplicity)