A thermodynamic criterion for the formation of Circumplanetary Disks | Synapse