Comparison between measured and numerically calculated AC losses in second-generation high temperature superconductor pancake coils