Computational Methods for Mechatronics