# Jet Pump (ejector/eductor) Sizing and Rating (fluids.jet_pump)

`fluids.jet_pump.``liquid_jet_pump`(rhop, rhos, Kp=0.0, Ks=0.1, Km=0.15, Kd=0.1, d_nozzle=None, d_mixing=None, d_diffuser=None, Qp=None, Qs=None, P1=None, P2=None, P5=None, nozzle_retracted=True, max_variations=100)

  Calculate the remaining two variables in a liquid jet pump, using a model presented in [R510] as well as [R511], [R512], and [R513].

  \[N = \frac{2R + \frac{2 C M^2 R^2}{1-R} - R^2 (1+CM) (1+M) (1 + K_m + K_d + \alpha^2) - \frac{CM^2R^2}{(1-R)^2} (1+K_s)} {(1+K_p) - 2R - \frac{2CM^2R^2}{1-R} + R^2(1+CM)(1+M)(1+K_m + K_d + \alpha^2) + (1-j)\left(\frac{CM^2R^2}{({1-R})^2} \right)(1+K_s)}\]
  \[P_1 - P_2 = \frac{1}{2}\rho_p \left(\frac{Q_p}{A_n}\right)^2 \left[(1+K_p) - C(1+K_s) \left(\frac{MR}{1-R}\right)^2\right]\]
  \[\text{Pressure ratio} = N = \frac{P_5 - P_2}{P_1 - P_5}\]
  \[\text{Volume flow ratio} = M = \frac{Q_s}{Q_p}\]
  \[\text{Jet pump efficiency} = \eta = M\cdot N = \frac{Q_s(P_5-P_2)}{Q_p(P_1 - P_5)}\]
  \[R = \frac{A_n}{A_m}\]
  \[C = \frac{\rho_s}{\rho_p}\]

  There is no guarantee a solution will be found for the provided variable values, but every combination of two missing variables are supported.

  Parameters:

  rhop : float

  > The density of the primary (motive) fluid, [kg/m^3]

  rhos : float

  > The density of the secondary fluid (drawn from the vacuum chamber), [kg/m^3]

  Kp : float, optional

  > The primary nozzle loss coefficient, [-]

  Ks : float, optional

  > The secondary inlet loss coefficient, [-]

  Km : float, optional

  > The mixing chamber loss coefficient, [-]

  Kd : float, optional

  > The diffuser loss coefficient, [-]

  d_nozzle : float, optional

  > The inside diameter of the primary fluid’s nozle, [m]

  d_mixing : float, optional

  > The diameter of the mixing chamber, [m]

  d_diffuser : float, optional

  > The diameter of the diffuser at its exit, [m]

  Qp : float, optional

  > The volumetric flow rate of the primary fluid, [m^3/s]

  Qs : float, optional

  > The volumetric flow rate of the secondary fluid, [m^3/s]

  P1 : float, optional

  > The pressure of the primary fluid entering its nozzle, [Pa]

  P2 : float, optional

  > The pressure of the secondary fluid at the entry of the ejector, [Pa]

  P5 : float, optional

  > The pressure at the exit of the diffuser, [Pa]

  nozzle_retracted : bool, optional

  > Whether or not the primary nozzle’s exit is before the mixing chamber, or somewhat inside it, [-]

  max_variations : int, optional

  > When the initial guesses do not lead to a converged solution, try this many more guesses at converging the problem, [-]

  Returns:

  solution : dict

  > Dictionary of calculated parameters, [-]

  Notes

  The assumptions of the model are:

  - The flows are one dimensional except in the mixing chamber.
  - The mixing chamber has constant cross-sectional area.
  - The mixing happens entirely in the mixing chamber, prior to entry into the diffuser.
  - The primary nozzle is in a straight line with the middle of the mixing chamber.
  - Both fluids are incompressible, and have no excess volume on mixing.
  - Primary and secondary flows both enter the mixing throat with their own uniform velocity distribution; the mixed stream leaves with a uniform velocity profile.
  - If the secondary fluid is a gas, it undergoes isothermal compression in the throat and diffuser.
  - If the secondary fluid is a gas or contains a bubbly gas, it is homogeneously distributed in a continuous liquid phase.
  - Heat transfer between the fluids is negligible - there is no change in density due to temperature changes
  - The change in the solubility of a dissolved gas, if there is one, is negigibly changed by temperature or pressure changes.

  The model can be derived from the equations in `liquid_jet_pump_ancillary` and the following:

  Conservation of energy at the primary nozzle, secondary inlet, and diffuser exit: .. math:

      P_1 = P_3 + \frac{1}{2}\rho_p V_n^2 + K_p\left(\frac{1}{2}\rho_p V_n^2\right)

  \[P_2 = P_3 + \frac{1}{2}\rho_s V_3^2 + K_s\left(\frac{1}{2}\rho_s V_3^2\right)\]
  \[P_5 = P_4 + \frac{1}{2}\rho_d V_4^2 - K_d\left(\frac{1}{2}\rho_d V_4^2\right)\]

  Continuity of the ejector:

  \[\rho_p Q_p + \rho_s Q_s = \rho_d Q_d\]

  References

  [R510] | (1, 2) Karassik, Igor J., Joseph P. Messina, Paul Cooper, and Charles C. Heald. Pump Handbook. 4th edition. New York: McGraw-Hill Education, 2007.

  [R511] | (1, 2) Winoto S. H., Li H., and Shah D. A. “Efficiency of Jet Pumps.” Journal of Hydraulic Engineering 126, no. 2 (February 1, 2000): 150-56. https://doi.org/10.1061/(ASCE)0733-9429(2000)126:2(150).

  [R512] | (1, 2) Elmore, Emily, Khalid Al-Mutairi, Bilal Hussain, and A. Sheriff El-Gizawy. “Development of Analytical Model for Predicting Dual-Phase Ejector Performance,” November 11, 2016, V007T09A013.

  [R513] | (1, 2) Ejectors and Jet Pumps. Design and Performance for Incompressible Liquid Flow. 85032. ESDU International PLC, 1985.

  Examples

      >>> ans = liquid_jet_pump(rhop=998., rhos=1098., Km=.186, Kd=0.12, Ks=0.11,
      ... Kp=0.04, d_mixing=0.045, Qs=0.01, Qp=.01, P2=133600,
      ... P5=200E3, nozzle_retracted=False, max_variations=10000)
      >>> s = []
      >>> for key, value in ans.items():
      ...     s.append('%s: %g' %(key, value))
      >>> sorted(s)
      ['M: 1', 'N: 0.293473', 'P1: 426256', 'P2: 133600', 'P5: 200000', 'Qp: 0.01', 'Qs: 0.01', 'R: 0.247404', 'alpha: 1e-06', 'd_diffuser: 45', 'd_mixing: 0.045', 'd_nozzle: 0.0223829', 'efficiency: 0.293473']

`fluids.jet_pump.``liquid_jet_pump_ancillary`(rhop, rhos, Kp, Ks, d_nozzle=None, d_mixing=None, Qp=None, Qs=None, P1=None, P2=None)

  Calculates the remaining variable in a liquid jet pump when solving for one if the inlet variables only and the rest of them are known. The equation comes from conservation of energy and momentum in the mixing chamber.

  The variable to be solved for must be one of d_nozzle, d_mixing, Qp, Qs, P1, or P2.

  \[P_1 - P_2 = \frac{1}{2}\rho_pV_n^2(1+K_p) - \frac{1}{2}\rho_s V_3^2(1+K_s)\]

  Rearrange to express V3 in terms of Vn, and using the density ratio C, the expression becomes:

  \[P_1 - P_2 = \frac{1}{2}\rho_p V_n^2\left[(1+K_p) - C(1+K_s) \left(\frac{MR}{1-R}\right)^2\right]\]

  Using the primary nozzle area and flow rate:

  \[P_1 - P_2 = \frac{1}{2}\rho_p \left(\frac{Q_p}{A_n}\right)^2 \left[(1+K_p) - C(1+K_s) \left(\frac{MR}{1-R}\right)^2\right]\]

  For P, P2, Qs, and Qp, the equation can be rearranged explicitly for them. For d_mixing and d_nozzle, a bounded solver is used searching between 1E-9 m and 20 times the other diameter which was specified.

  Parameters:

  rhop : float

  > The density of the primary (motive) fluid, [kg/m^3]

  rhos : float

  > The density of the secondary fluid (drawn from the vacuum chamber), [kg/m^3]

  Kp : float

  > The primary nozzle loss coefficient, [-]

  Ks : float

  > The secondary inlet loss coefficient, [-]

  d_nozzle : float, optional

  > The inside diameter of the primary fluid’s nozle, [m]

  d_mixing : float, optional

  > The diameter of the mixing chamber, [m]

  Qp : float, optional

  > The volumetric flow rate of the primary fluid, [m^3/s]

  Qs : float, optional

  > The volumetric flow rate of the secondary fluid, [m^3/s]

  P1 : float, optional

  > The pressure of the primary fluid entering its nozzle, [Pa]

  P2 : float, optional

  > The pressure of the secondary fluid at the entry of the ejector, [Pa]

  Returns:

  solution : float

  > The parameter not specified (one of d_nozzle, d_mixing, Qp, Qs, P1, or P2), (units of m, m, m^3/s, m^3/s, Pa, or Pa respectively)

  Notes

  The following SymPy code was used to obtain the analytical formulas ( they are not shown here due to their length):

      >>> from sympy import *
      >>> A_nozzle, A_mixing, Qs, Qp, P1, P2, rhos, rhop, Ks, Kp = symbols('A_nozzle, A_mixing, Qs, Qp, P1, P2, rhos, rhop, Ks, Kp')
      >>> R = A_nozzle/A_mixing
      >>> M = Qs/Qp
      >>> C = rhos/rhop
      >>> rhs = rhop/2*(Qp/A_nozzle)**2*((1+Kp) - C*(1 + Ks)*((M*R)/(1-R))**2 )
      >>> new = Eq(P1 - P2,  rhs)
      >>> #solve(new, Qp)
      >>> #solve(new, Qs)
      >>> #solve(new, P1)
      >>> #solve(new, P2)

  References

  [R514] | Ejectors and Jet Pumps. Design and Performance for Incompressible Liquid Flow. 85032. ESDU International PLC, 1985.

  Examples

  Calculating primary fluid nozzle inlet pressure P1:

      >>> liquid_jet_pump_ancillary(rhop=998., rhos=1098., Ks=0.11, Kp=.04,
      ... P2=133600, Qp=0.01, Qs=0.01, d_mixing=0.045, d_nozzle=0.02238)
      426434.60314398084