Legendre transform in the thermodynamics of flowing polymer solutions