Dry powder inhalers are one of the methods for the delivery of drug particles to the lungs. In addition to the influence of powder properties, their performance is dependent on the aerodynamics of the airpath and the user’s inhalation characteristics. As a result, engineers have used computational fluid dynamics (often single-phase) to improve the aerodynamic performance of individual inhaler geometries. This paper attempts to extend this approach by using a stochastic optimisation algorithm coupled with a multiphase (air-powder) computational model to automatically evaluate multiple geometric iterations. Of the functional parts that make up the inhaler, entrainment geometries play an important role. They were therefore chosen as the focus of this optimisation study. The performance of the computational model used was in reasonable agreement with the experimental results found in the literature. Optimisation was therefore carried out for flow rate independence and dispersion of powder at the outlet – both desirable in efficient inhalers. The latter criterion appeared to be a harder optimisation problem than flow rate independence. The algorithm managed to produce plausible improved geometries (that utilised flow recirculations), although further validation studies would be needed.