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 due to its relative simplicity and accuracy.
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 typically used to model massflow out of the orifice 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.
Before you freak out because you don't know how 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. there is no gas that is pressurizing the nitrous), 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 info from NASA CEA for the chamber pressure and halfcat sim to calculate P loss across feed lines), you can know the dP of your injector, and the temperature of the nitrous at the inlet and outlet. This will allow you to use NIST to get the enthalpies at the inlet and outlet of your orifices.
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.
The last question on your mind is probably what in the world Cd is. Cd is just a correction factor that accounts for entropy generation (i.e. viscous dissipation) as the nitrous flows through an orifice. In an ideal world, it would be 1, but in the real world it's not, and especially not for nitrous. This is because nitrous wants to cavitate (i.e. start turning into a gas) when it flows through an orifice. This means that gas bubbles will be created inside the liquid when it travels through the orifice, which decreases mass flow. We can take this effect into account by approximating a low Cd of .5. However, Cd will need to be verified via rigorous cold-flow testing. If you want to know how to calculate Cd, navigate to Hephaestus' testing page.