A theoretical model for buoyancy flux determination in planetary boundary layer based on endoreversible heat engine