Global existence and exponential stability for a contact problem between two thermoelastic beams