Modeling the subduction factory: The ins and outs from a thermal and dynamical perspective