Numerical simulation of flash-boiling through sharp-edged orifices. Flash boiling is the rapid phase change of a pressurised fluid that emerges to ambient conditions below its vapour pressure. Flashing of a flowing liquid through an orifice or a nozzle can occur either inside or outside the nozzle depending on the local pressure and geometry. Vapour generation during flashing leads to interfacial interactions that eventually influence the jet. par Empirical models in the literature for simulating the inter-phase heat transfer employ many simplifying assumptions, which limits their applicability. Typical models, usually derived from cavitation, fail to describe the physics of heat and mass transfer, making them unreliable for flashing. The Homogeneous Relaxation Model (HRM) is a reliable model able to capture heat transfer under these conditions accounting for the non-equilibrium vapour generation. This approach uses a relaxation term in the transport equation for the vapour. On the basis of the generic compressible flow solver within the open source computational fluid dynamics (CFD) code OpenFOAM, the HRM has been implemented to create a dedicated new solver HRMSonicELSAFoam. An algorithm that links the standard pressure-velocity coupling algorithm to the HRM is used. In this method, a pressure equation is derived which employs the continuity equation including compressibility effects. A relaxation term has been defined such that the instantaneous quality would relax to the equilibrium value over a given timescale. Although it is possible to consider this timescale constant, it is calculated via an empirical correlation in the present study. par Validations have been carried out by simulating two-phase flows through sharp-edged orifices. The relatively good agreement achieved has demonstrated that the solver accurately calculates the pressure and vapour mass fraction. This demonstrates the potential of HRMSonicELSAFoam for flash boiling simulations and predicting the properties of the subsequent flash atomisation.