Optimisation in comsol. Download tutorial models to get started.