Accurate modeling and characterization of photothermal forces in optomechanics