  Simulating the transient effects occurring in superconducting accelerator
magnet circuits requires including the mutual electro-thermo-dynamic
interaction among the circuit elements, such as power converters, magnets, and
protection systems. Nevertheless, the numerical analysis is traditionally done
separately for each element in the circuit, leading to possible non-consistent
results. We present STEAM, a hierarchical co-simulation framework featuring the
waveform relaxation method. The framework simulates a complex system as a
composition of simpler, independent models that exchange information. The
convergence of the coupling algorithm ensures the consistency of the solution.
The modularity of the framework allows integrating models developed with both
proprietary and in-house tools. The framework implements a user-customizable
hierarchical algorithm to schedule how models participate to the co-simulation,
for the purpose of using computational resources efficiently. As a case study,
a quench scenario is co-simulated for the inner triplet circuit for the High
Luminosity upgrade of the LHC at CERN.
