Effects of the number of periods on strain in superlattices