Compositional Multiphase Well Solver

Introduction

Here, we present a description of the well solvers. These solvers are designed to be coupled with the flow solvers. Their specific task is to implement the multi-segment well discretization using the fluid model used in the corresponding flow solver – i.e., either single-phase flow or compositional multiphase flow. In particular, the perforation terms computed by the well solvers are a source/sink term for the discrete reservoir equations assembled by the flow solvers.

In the present description, we focus on the compositional multiphase well solver. The structure of the single-phase well solver is analogous and will not be described here for brevity.

Theory

Here, we give an overview of the well formulation implemented in GEOS. We review the set of Discrete Equations, and then we describe the Primary variables used the well solvers.

Discrete Equations

We assume that the well is discretized into segments denoted by the index i.

Mass Conservation

In well segment i, mass conservation for component c reads:

z^{upw}_{c,(i-1,i)} q_{(i-1,i)} - z^{upw}_{c,(i,i+1)} q_{(i,i+1)} + q^{perf}_{c,i} = 0,

where we have neglected the accumulation term. In the previous equation, z^{upw}_{c,(i,j)} is the upwinded mass fraction of component c at the interface between segments i and j, q_{(i,j)} is the total mass flux between segments i and j, and q^{perf}_{c,i} is the source/sink term generated by the perforations – i.e., the connections between the well and the reservoir. The upwinded mass fractions are computed as:

z^{upw}_{c,(i,j)} = \left\{ \begin{array}{cl} z_{c,i} & \text{if} \, \, q_{(i,j)} > 0 \\[10pt] z_{c,j} & \text{otherwise.} \end{array}\right.

The perforation terms are obtained with:

q^{perf}_{c,i} = \left\{ \begin{array}{cl} WI z_{c,i} \rho_{m,i} \lambda^{res}_T  \Delta \Phi & \text{if the well is upstream (i.e.,} \, \, \Delta \Phi > 0)  \\[10pt] WI x^{res}_{c,\ell} \rho^{res}_{\ell} \lambda^{res}_{\ell} \Delta \Phi & \text{otherwise,} \end{array}\right.

where \Delta \Phi = p_i - p^{res} + \rho_{m,i} g \Delta d_{i,perf} is the potential difference between the segment center and the reservoir center. In the expression of the potential difference, the mixture density is computed as \rho_{m,i} = \sum_{\ell} S_{\ell,i} \rho_{\ell,i}. The well index, WI, is currently an input of the simulator. The superscript res means that the variable is evaluated at the center of the reservoir element.

Volume Constraint Equation

As in the Compositional Multiphase Flow Solver, the system is closed with a volume constraint equation.

Pressure Relations

In the current implementation of the well solver, we assume a hydrostatic equilibrium:

p_{i+1} - p_i = \rho_{m,(i,i+1)} g \Delta d_{i,i+1},

where \rho_{m,(i,i+1)} is the arithmetic average of the mixture densities evaluated in segments i and i+1. Pressure drop components due to friction and acceleration are not implemented at the moment.

Pressure and Rate Controls

The well solver supports two types of control, namely, pressure control and rate control.

If pressure control is chosen, we add the following constraint for the pressure of the top segment of the well:

p_0 - p^{target} = 0

In this case, we check that at each iteration of the Newton solver, the rate at the top of the first segment is smaller than the maximum rate specified by the user. If this is not the case, we switch to rate control.

If rate control is used, we add the following constraint for the rate at the top of the first segment, denoted by q_{(-1,0)}:

q_{(-1,0)} - q^{target} = 0

For an injector well, if the pressure at the top segment becomes larger than the target pressure specified by the user, then we switch to pressure control. Similarly for a producer well, if the pressure at the top segment becomes smaller than the target pressure specified by the user, then we switch to pressure control.

To summarize, the compositional multiphase flow solver assembles a set of n_c+2 equations, i.e., n_c mass conservation equations and 1 volume constraint equation in each segment, plus 1 pressure relation at the interface between a segment and the next segment in the direction of the well head. For the top segment, the pressure relation is replaced with the control equation.

Number of equations

Equation type

n_c

Mass conservation equations

1

Pressure relation or control equation

1

Volume constraint

Primary variables

The well variable formulation is the same as that of the Compositional Multiphase Flow Solver. In a well segment, in addition to the n_c+1 primary variables of the Compositional Multiphase Flow Solver, namely, one pressure, p, and n_c component densities, \rho_c, we also treat the total mass flux at the interface with the next segment, denoted by q, as a primary variable.

Number of primary variables

Variable type

1

Pressure

1

Total mass flux at the interface with next segment

n_c

Component densities

Parameters

The following attributes are supported:

XML Element: CompositionalMultiphaseWell

Name

Type

Default

Description

allowLocalCompDensityChopping

integer

1

Flag indicating whether local (cell-wise) chopping of negative compositions is allowed

control

geos_ConstraintTypeId

required

Well control. Valid options:
* BHP
* phaseVolRate
* totalVolRate
* massRate
* uninitialized

enableCrossflow

integer

1

Flag to enable crossflow. Currently only supported for injectors:
- If the flag is set to 1, both reservoir-to-well flow and well-to-reservoir flow are allowed at the perforations.
- If the flag is set to 0, we only allow well-to-reservoir flow at the perforations.

enableIsoThermalEstimator

integer

0

Flag to enable isothermal estimator prior to coupled reservoir and well solve.

estimateWellSolution

integer

0

Flag to esitmate well solution prior to coupled reservoir and well solve.

initialPressureCoefficient

real64

0.1

Tuning coefficient for the initial well pressure of rate-controlled wells:
- Injector pressure at reference depth initialized as: (1+initialPressureCoefficient)*reservoirPressureAtClosestPerforation + density*g*( zRef - zPerf )
- Producer pressure at reference depth initialized as: (1-initialPressureCoefficient)*reservoirPressureAtClosestPerforation + density*g*( zRef - zPerf )

logLevel

integer

0

Sets the level of information to write in the standard output (the console typically).
Information output from lower logLevels is added with the desired log level
1
- Well control information

maxAbsolutePressureChange

real64

-1

Maximum (absolute) pressure change in a Newton iteration

maxCompFractionChange

real64

1

Maximum (absolute) allowed change in the composition fraction of any component within a single time step, in a Newton iteration

maxRelativeCompDensChange

real64

1.79769e+208

Maximum (relative) change in a component density between two Newton iterations

maxRelativePressureChange

real64

1

Maximum (relative) change in pressure between two Newton iterations (recommended with rate control)

maxRelativeTemperatureChange

real64

1

Maximum (relative) change in temperature between two Newton iterations

name

groupName

required

A name is required for any non-unique nodes

referenceReservoirRegion

groupNameRef

Name of reservoir region used for obtaining average region pressure used in volume rate constraint calculations.
Frequency of pressure update is set in SinglePhase/CompositionalMultiphaseStatistics definition.
Setting cycleFrequency=’1’ will update the pressure every timestep, note that is a lagged property in constraint propertiesNote the event associated with the statists task must be entered before the solver event.

statusTableName

groupNameRef

Name of the well status table when the status of the well is a time dependent function.
If the status function evaluates to a positive value at the current time, the well will be open otherwise the well will be shut.

surfacePressure

real64

0

Surface pressure used to compute volumetric rates when surface conditions are used [Pa]

surfaceTemperature

real64

0

Surface temperature used to compute volumetric rates when surface conditions are used [K]

timeStepFromTables

integer

0

Choose time step to honor rates/bhp tables time intervals

type

geos_WellControls_Type

required

Well type. Valid options:
* producer
* injector

useSurfaceConditions

integer

0

Flag to specify whether rates are checked at surface or reservoir conditions.
Equal to 1 for surface conditions, and to 0 for reservoir conditions.
See note on referenceReservoirRegion for reservoir condition options

useTotalMassEquation

integer

1

Use total mass equation

writeCSV

integer

1

When set to 1, write the rates into a CSV file.

InjectionMassRateConstraint

node

XML Element: InjectionMassRateConstraint

InjectionPhaseVolumeRateConstraint

node

XML Element: InjectionPhaseVolumeRateConstraint

InjectionVolumeRateConstraint

node

XML Element: InjectionVolumeRateConstraint

MaximumBHPConstraint

node

XML Element: MaximumBHPConstraint

MinimumBHPConstraint

node

XML Element: MinimumBHPConstraint

ProductionMassRateConstraint

node

XML Element: ProductionMassRateConstraint

ProductionPhaseVolumeRateConstraint

node

XML Element: ProductionPhaseVolumeRateConstraint

ProductionVolumeRateConstraint

node

XML Element: ProductionVolumeRateConstraint

WellNewtonSolver

node

XML Element: WellNewtonSolver

Example

    <WellManager
      name="compositionalMultiphaseWell"
      logLevel="1"
      targetRegions="{ wellRegion1, wellRegion2, wellRegion3 }">
      <CompositionalMultiphaseWell
        name="wellControls1"
        type="producer"
        control="BHP">
        <ProductionPhaseVolumeRateConstraint
          name="maxoilprod"
          phaseName="oil"
          phaseRate="1e-3"/>
        <MinimumBHPConstraint
          name="minbhp"
          targetBHP="4e6"
          referenceElevation="0.5"/>
      </CompositionalMultiphaseWell>
      <CompositionalMultiphaseWell
        name="wellControls2"
        type="producer"
        control="phaseVolRate">
        <ProductionPhaseVolumeRateConstraint
          name="maxoilprod"
          phaseName="oil"
          phaseRate="2.5e-7"/>
        <MinimumBHPConstraint
          name="minbhp"
          targetBHP="2e6"
          referenceElevation="0.5"/>
      </CompositionalMultiphaseWell>
      <CompositionalMultiphaseWell
        name="wellControls3"
        type="injector"
        control="totalVolRate">
        <MaximumBHPConstraint
          name="maxbhp"
          targetBHP="4e7"
          referenceElevation="0.5"/>
        <InjectionVolumeRateConstraint
          name="maxvolrateinj"
          volumeRate="5e-7"
          injectionStream="{ 0.1, 0.1, 0.1, 0.7 }"
          injectionTemperature="297.15"/>
      </CompositionalMultiphaseWell>
    </WellManager>