In Thermodynamics, when we talk about quasi-static reversible processes, we often formalize them this way: we identify the state space with a simply connected manifold. On it we have two 1-forms, $đQ$ and $đW$, from the 1st law they add up to an exact form: $\mathrm d U = đQ + đW$. The process is then represented by a curve $\gamma$ on the manifold. If we're interested in the total heat added to the system, we can easily just integrate $đQ$ along the curve: $$ Q = \int_\gamma đQ \: . $$ A notable fact about $đQ$ is that it's holonomic with an itegrating factor $1/T$, therefore: $$ \oint_\varphi \frac{đQ}{T} = 0 \quad \text{ for all } \varphi \: . $$
This formalism breaks down a little when we're talking about quasi-static irreversible processes (for example a slow expansion & contraction of a piston with friction, as opposed to a non-quasi-static process like shaking the system until it warms up). For example, the increase in the system's entropy over one cycle of a cyclic process $\gamma$ is calculated via: (source) $$ \Delta S = \oint_\gamma \frac{đQ}{T} \: . $$ We see that $1/T$ is clearly not an integrating factor for $đQ$. In fact, $đQ$ is not a 1-form at all – imagine the process $\gamma$ goes from state $A$ to state $B$ and then back using the exact same trajectory in the state space. Physically, it's quite plausible that the system would get some $\Delta S > 0$ from friction, but mathematically it can't be: $$ \Delta S \;=\; \oint_\gamma \frac{đQ}{T} \;=\; \int_A^{\!B} \! \frac{đQ}{T} + \int_B^{\!A} \! \frac{đQ}{T} \;=\; \int_A^{\!B} \! \frac{đQ}{T} - \int_A^{\!B} \! \frac{đQ}{T} \;=\; 0 $$ This is because the integral of a 1-form cannot depend on the curve it is being integrated along. However, the friction does depend on the trajectory, therefore $đQ$ also has to depend on it somehow. Is there any object in differential geometry which has such properties? That is, one which can depend non-trivially on the path it is being integrated along? Or is the “state space = manifold” description just a bad fit for this scenario?
There is a great Q&A, which provides an alternative formalization for the Clausius theorem, so that it works even for non-quasi-static processes: In thermodynamics, how can $\oint \frac{dQ}{T}$ make sense for an irreversible process? However, it is constructed somewhat ad-hoc for the Clausius theorem. I would love to know if there's any object “$đQ$” (and other differentials in irreversible processes) that would make sense all by itself, not only as a handwavy notation for an actual integrand.