The multiphase wellbore flow in hydrodynamic and thermodynamic equilibrium is defined by the following set of equations:


\frac{\partial (\rho_m A)}{\partial t} + {\nabla } \bigg( A \, \sum_\alpha \rho_\alpha \, { \bf u}_\alpha \bigg) = 0
\rho_\alpha \bigg[ \frac{\partial {\bf u}_\alpha}{\partial t} + ({\bf u}_\alpha \cdot \nabla) \ {\bf u}_\alpha  - \nu_\alpha \Delta {\bf u}_\alpha\bigg]  =  - \nabla p + \rho_\alpha \, {\bf g} - \frac{ f_\alpha \, \rho_\alpha \, u_\alpha}{2 d} \ {\bf u}_\alpha
(\rho \,c_{pt})_p \frac{\partial T}{\partial t} 
 
-  \sum_\alpha \rho_\alpha \ c_{p \alpha} \ \eta_{s \alpha} \ \frac{\partial P_\alpha}{\partial t}  
 
+  \sum_\alpha \rho_\alpha \ c_{p \alpha} \ ({\bf u}_\alpha \cdot \nabla)  \ T
 \  =   \   \frac{\delta E_H}{ \delta V \delta t}


Equation   defines the mass flow continuity or equivalently represents mass conservation during the mass transportation.

Equations   are Navie-Stokes equations and define the momentum conservation during the mass transportation.

Equation   defines the heat flow continuity or equivalently represents heat conservation due to heat exchange with surrounding rocks  and mass convection from reservoir inflow with account for wellbore adiabatic effects and Joule–Thomson reservoir throttling effect.

The term  defines the speed of change of  heat energy  volumetric density due to heat exchange with surrounding rocks and the inflow from formation into the wellbore.



Projecting the above equations to the well trajectory with down-pointing along-hole coordinate :

\frac{\partial (\rho_m A)}{\partial t} + \frac{\partial}{\partial l} \bigg( A \, \sum_\alpha \rho_\alpha \, u_\alpha \bigg) = 0
\sum_\alpha \rho_\alpha \bigg[ \frac{\partial u_\alpha}{\partial t} + u_\alpha \frac{\partial u_\alpha}{\partial l}  - \nu_\alpha \Delta u_\alpha\bigg]  =  - \frac{dp}{dl} + \rho_m \, g \, \sin \theta - \frac{ f_m \, \rho_m \, u_m^2 \, }{2 d}
(\rho \,c_p)_m \frac{\partial T}{\partial t} 
 
- \bigg( \sum_\alpha \rho_\alpha \ c_{p \alpha} \ \eta_{s \alpha}\bigg) \ \frac{\partial p}{\partial t}  
 
+ \bigg( \sum_\alpha \rho_\alpha \ c_{p \alpha} \ u_\alpha \bigg) \frac{\partial T}{\partial l}
 \  =   \   \frac{1}{A}  \ \sum_\alpha \rho_\alpha \ c_{p \alpha} T_\alpha \frac{\partial  q_\alpha}{\partial l} 



Equations  –  define a closed set of 3 scalar equations on 3 unknowns: pressure , temperature  and mixture-average fluid velocity  .



The disambiguation of the properties in the above equation is brought in The list of dynamic flow properties and model parameters.


Equation   defines the continuity of the fluid components flow or equivalently represent the mass conservation of each mass component  during its transportation along wellbore. 

Equation  defines the motion dynamics of each phase (called Navier–Stokes equation), represented as linear correlation between phase flow speed   and pressure profile of mutliphase fluid .



The term  represents heat convection defined by the wellbore mass flow. 


The term  represents the heating/cooling effect of the fast adiabatic pressure change.

This usually takes effect in the wellbore during the first minutes or hours after changing the well flow regime (as a consequence of choke/pump operation). 


The term  defines mass-specific heat capacity of the multiphase mixture and defined by exact formula:

(\rho \,c_p)_m = \sum_\alpha \rho_\alpha c_\alpha s_\alpha


Stationary wellbore flow is defined as the flow with constant pressure and temperature:   and  .

This happens during the long-term (usually hours & days & weeks) production/injection or long-term (usually hours & days & weeks)  shut-in.



(\rho \,c_{pt})_p \frac{\partial T}{\partial t} 
 
- \ \phi \sum_{a = \{w,o,g \}} \rho_\alpha \ c_{p \alpha} \ \eta_{s \alpha} \ \frac{\partial P_\alpha}{\partial t}  
 
+ \bigg( \sum_{a = \{w,o,g \}} \rho_\alpha \ c_{p \alpha} \ \epsilon_\alpha \ \mathbf{u}_\alpha \bigg)  \nabla P
 
+ \bigg( \sum_{a = \{w,o,g \}} \rho_\alpha \ c_{p \alpha} \ \mathbf{u}_\alpha \bigg) \  \nabla T 
 
 - \nabla (\lambda_t \nabla T) =  \frac{\delta E_H}{ \delta V \delta t}

The wellbore fluid velocity  can be expressed thorugh the volumetric flow profile  and tubing/casing cross-section area  as:

u_\alpha = \frac{q_\alpha}{\pi r_f^2}

so that 

\bigg( \sum_{a = \{w,o,g \}} \rho_\alpha \ c_{p \alpha} \ \mathbf{u}_\alpha \bigg) \  \nabla T 
 =  \frac{\delta E_H}{ \delta V \delta t}