On thermal effects in solid state lasers: the case of ytterbium-doped materials