An extension of d'Alembert's principle can be used in thermodynamics. For instance, for an adiabatically closed thermodynamic system described by a Lagrangian depending on a single entropy S and with constant masses m i , such as L ( r , r ˙ ˙ , S , t ) = ∑ ∑ i 1 2 m i r ˙ ˙ i 2 − − V ( r , S ) , it is written as follows δ δ ∫ ∫ t 1 t 2 L ( r , r ˙ ˙ , S , t ) d t + ∑ ∑ i ∫ ∫ t 1 t 2 F i ⋅ ⋅ δ δ r i d t = 0 , where the previous constraints ∑ ∑ i C i ⋅ ⋅ δ δ r i = 0 and ∑ ∑ i C i ⋅ ⋅ r ˙ ˙ i = 0 are generalized to involve the entropy as: