AC loss calculation in REBCO coils or stacks by solving the equation of motion for current using an integration approach. (17th November 2020)