Hardness measurements of Ti and TiC multilayers: a model