Diverse engineering fields request flash calculations like isothermal flash, isenthalpic flash, and isentropic flash. They can be cast as minimization of a thermodynamic state-function and solved by Michelsen’s Q-function approach. Flash calculations for open systems, i.e. systems where chemical potentials are specified instead of the mole numbers for some components, also belong to this scope. By analyzing the construction of Q-functions through Legendre transforms, we extend this approach to the flash for open systems in the absence or presence of chemical reactions, resulting in general formulations for various specifications. For systems without reactions, the classical framework using mole numbers as independent variables is employed; for those with reactions, the modified-RAND framework is employed. We present examples for open systems at constant temperature and pressure. Using the Q-function minimization, we can solve multicomponent non-reactive or reactive systems at a specified chemical potential with quadratic convergence over a wide range of conditions.