  We consider a non-isothermal compositional gas liquid model for the
simulation of well operations in geothermal processes. The model accounts for
phase transitions assumed to be at thermodynamical equilibrium and is based on
an hydrodynamical Drift Flux Model (DFM) combined with a No Pressure Wave
approximation of the momentum equation. The focus of this work is on the design
of a robust discretization accounting for slanted and multibranch wells with
the ability to simulate both transient behavior such as well opening as well as
coupled simulations at the time scale of the reservoir. It is based on a
staggered finite volume scheme in space combined with a fully implicit Euler
time integration. The construction of consistent and stable numerical fluxes is
a key feature for a robust numerical method. It is achieved by combining a
monotone flux approximation for the phase superficial velocities with an upwind
approximation of the phase molar fractions, density and enthalpy. In order to
facilitate the coupling of the well and reservoir models, the Newton
linearization accounts for the elimination of the hydrodynamical unknowns
leading to Jacobian systems using the same primary unknowns than those of the
reservoir model. The efficiency of our approach is investigated on both stand
alone well test cases without and with cross flow, and on a fully coupled
well-reservoir simulation.
