Finite element modelling and design of a concentration gradient generating bioreactor: application to biological pattern formation and toxicology