  In the variational principle leading to the Euler equation for a perfect
fluid, we can use the method of undetermined multiplier for holonomic
constraints representing mass conservation and adiabatic condition. For a
dissipative fluid, the latter condition is replaced by the constraint
specifying how to dissipate. Noting that this constraint is nonholonomic, we
can derive the balance equation of momentum for viscous and viscoelastic fluids
by using a single variational principle. We can also derive the associated
Hamiltonian formulation by regarding the velocity field as the input in the
framework of control theory.
