Thermomechanical study of complex structures in the aperture of superconducting magnets: application to the design of the High-Luminosity LHC shielded beam screen