Calculation of self-field losses in a superconducting cable considering the twist of strands