  Stacks of superconducting tapes can trap much higher magnetic fields than
conventional magnets. This makes them very promising for motors and generators.
However, ripple magnetic fields in these machines present a cross-field
component that demagnetizes the stacks. At present, there is no quantitative
agreement between measurements and modeling of cross-field demagnetization,
mainly due to the need of a 3D model that takes the end effects and real
micron-thick superconducting layer into account. This article presents 3D
modeling and measurements of cross-field demagnetization in stacks of up to 5
tapes and initial magnetization modeling of stacks of up to 15 tapes. 3D
modeling of the cross-field demagnetization explicitly shows that the critical
current density, $J_c$, in the direction perpendicular to the tape surface does
not play a role in cross-field demagnetization. When taking the measured
anisotropic magnetic field dependence of $J_c$ into account, 3D calculations
agree with measurements with less than 4 % deviation, while the error of 2D
modeling is much higher. Then, our 3D numerical methods can realistically
predict cross-field demagnetization. Due to the force-free configuration of
part of the current density, J, in the stack, better agreement with experiments
will probably require measuring the Jc anisotropy for the whole solid angle
range, including $J$ parallel to the magnetic field.
