The demagnetization and associated magnetocaloric effect in
strong-weak-strong ferromagnetic trilayers, upon a reorientation of the strong
ferromagnets from parallel to antiparallel magnetization, is simulated using
atomistic spin dynamics. The simulations yield non-trivial spin distributions
in the antiparallel state, which in turn allows entropy to be calculated
directly. Empirical functional forms are obtained for the magnetization
distribution in the spacer, differing significantly from some of the commonly
used models. Finally, we find that the magnetocaloric effect in the system can
be significantly improved by allowing the local exchange to vary through the
spacer, which in practice can be implemented by spatially tailoring the
spacer's magnetic dilution.Comment: 8 pages, 6 figure