Impact of size and temperature on thermal expansion of nanomaterials