A thermodynamical model of a vortex lattice in a type-II Superconductor