Physical models of photon-dominated regions: inuence of clumpiness and geometry for S140