Codes for COMSOL simulations