When using self-pressurizing two-phase fluid (i.e. nitrous oxide) modeling its mass flow throughout an engine (and specifically out of an injector) becomes a significant challenge. There is extensive literature that outlines various ways to accurately model nitrous oxide mass flow out of injector orifices. After a lot of research, we have chosen the Dyer model.
An overview of the Dyer model can be found at this link: https://digitalcommons.usu.edu/cgi/viewcontent.cgi?article=1110&context=gradreports. This is a paper by Solomon, who corrected a mistake in the original Dyer model. However, Solomon's model also has a slight mistake: in the equation for mdot_NHNE, the two massflows are multiplied by CdA again. They should not be.
The Dyer model basically weighs the nitrous flow between two other models, which are called the Homogenous Equilibrium Model (HEM) and Single Phase Incompressible (SPI). SPI is what is used to model massflow out of an incompressible fluid (i.e. IPA) and is defined by:
mdot_spi = Cd * A_inj * sqrt(2*rho*dP)
Where Cd is the discharge coefficient, A_inj is the total injection area of the orifices, rho is the density of the nitrous, and dP is the pressure drop across the orifice.
The HEM model, on the other hand, is defined by:
mdot_hem = Cd * A_inj * rho_2 * sqrt(2*(h1-h2))
Where Cd is the discharge coefficient, A_inj is the total injection area of the orifices, rho_2 is the density of the nitrous at the exit of the orifice, h1 is the enthalpy of the nitrous at the orifice inlet, and h2 is the enthalpy of the nitrous at the orifice outlet.
To find enthalpy, you can use NIST's Webbook to create data charts that will give you enthalpies for certain temperatures and pressures. But wait, you may say, how do I know the pressures and temperatures?
Well, if you are using nitrous as a self-pressurizing fluid (i.e the nitrous vapor is the only thing pressurizing the nitrous liquid below it), it will be saturated throughout its flow through the engine. This means that it will be at the edge of turning into a gas throughout its flow. Instead of turning into a gas, however, the nitrous will mostly choose to get colder as the pressure drops in the engine. There are many saturated nitrous graphs you can find online that will give you the temperatures and pressures of saturated nitrous oxide. Using this information, as well as Darcy Weissbach relations to get feed system pressure drop, you can estimate your manifold pressure. Importantly, the HEM model assumes that the flow from the tank to the chamber is isentropic. The isentropic and saturated assumptions allow you to find the quality (how much is liquid and how much is vapor) of the nitrous when it enters the combustion chamber. The quality of the mix would then let you find the mixture's enthalpy, or h1 and h2.
Continuing on with Dyer, the Dyer model is more formally known as the NHNE model. It is basically a weighted average between the HEM and SPI models and is defined as:
mdot_nhne = 1/(1+k) * mdot_spi + (1-1/(1+k)) * mdot_hem
Where k is defined as k = sqrt((P1-P2)/(Pv1-P2)). Pv1 is the saturated pressure at the inlet of the nitrous orifice. But wait, you may say – isn't the nitrous saturated throughout the engine? Yes, it is. This means that k = 1 when nitrous is saturated. However, from empirical testing, it has been determined that k should range between .5 to 2 depending on your l/d ratio. For orifices around 1mm in diameter, a rule of thumb is that k should be 2 for short orifices (~3mm in length) and around 0.5 for long orifices (>10mm in length). Since Hephaestus is utilizing a pintle injector with short orifices, we will use a k of 2.
Cd, or the discharge coefficient, is just a correction factor that accounts for energy loss as a fluid flows through an orifice. In an ideal world, it would be 1, but in the real world it's not. Importantly, Cd does not usually account for evaporation of a liquid through an orifice. However, wrapping nitrous boiling into the Cd term by decreasing the Cd to around 0.4 to 0.5 in the SPI equation has been shown to result in a good mass flow rate approximation. This is also a perfectly good route to go for amateur rocketry projects.