Accurate calculation and modeling of the adiabatic connection in density functional theory