Wells and controls

Well setup routines

Wells can be set up using the convenience functions setup_well and setup_vertical_well. These routines act on the output from reservoir_domain and can set up both types of wells. We recommend that you use these functions instead of manually calling the well constructors.

Types of wells

Simple wells

Equations

Multisegment wells

JutulDarcy.MultiSegmentWellType
MultiSegmentWell(reservoir_cells, volumes, centers;
                N = nothing,
                name = :Well,
                perforation_cells = nothing,
                segment_models = nothing,
                segment_length = nothing,
                reference_depth = 0,
                dz = nothing,
                surface_conditions = default_surface_cond(),
                accumulator_volume = mean(volumes),
                )

Create well perforated in a vector of reservoir_cells with corresponding volumes and cell centers.

Note

setup_vertical_well or setup_well are the recommended way of setting up wells.

Fields

  • volumes

  • perforations

  • neighborship

  • top

  • centers

  • surface

  • name

  • segment_models

source

Well controls and limits

Types of well controls

JutulDarcy.InjectorControlType
InjectorControl(target, mix, [density])

Well control that specifies injection into the reservoir. target specifies the type of target and mix defines the injection mass fractions for all species in the model during injection.

For example, for a three-component system made up of CO2, H2O and H2, setting [0.1, 0.6, 0.3] would mean that the injection stream would contain 1 part CO2, 6 parts H2O and 3 parts H2 by mass. For an immiscible system (e.g. LiquidPhase(), VaporPhase()) the species corresponds to phases and [0.3, 0.7] would mean a 3 to 7 mixture of liquid and vapor by mass.

The density of the injected fluid at surface conditions is given by density which is defaulted to 1.0 if not given.

See also ProducerControl, DisabledControl.

source
JutulDarcy.DisabledControlType
DisabledControl()

Control that disables a well. If a well is disabled, it is disconnected from the surface network and no flow occurs between the well and the top side. Mass transfer can still occur inside the well, and between the well and the reservoir unless perforations are also closed by a PerforationMask.

See also ProducerControl, InjectorControl.

source
JutulDarcy.replace_targetFunction
replace_target(ctrl, new_target)

Create new well control using ctrl as a template that operates under new_target.

source
JutulDarcy.default_limitsFunction
default_limits(ctrl)

Create reasonable default limits for well control ctrl, for example to avoid BHP injectors turning into producers.

source

Types of well targets

JutulDarcy.BottomHolePressureTargetType
BottomHolePressureTarget(q, phase)

Bottom-hole pressure (bhp) target with target pressure value bhp. A well operating under a bhp constraint will keep the well pressure at the bottom hole (typically the top of the perforations) fixed at this value unless doing so would violate other constraints, like the well switching from injection to production when declared as an injector.

Examples

julia> BottomHolePressureTarget(100e5)
BottomHolePressureTarget with value 100.0 [bar]
source
JutulDarcy.SinglePhaseRateTargetType
SinglePhaseRateTarget(q, phase)

Single-phase well target with value q specified for phase.

Examples

julia> SinglePhaseRateTarget(0.001, LiquidPhase())
SinglePhaseRateTarget of 0.001 [m^3/s] for LiquidPhase()
source
JutulDarcy.SurfaceLiquidRateTargetType
SurfaceLiquidRateTarget(q)

Well target of specified liquid rate at surface conditions with value q. Typically used for a ProducerControl as you have full control over the mixture composition during injection.

Liquid rate, sometimes abbreviated LRAT, is made up of the phases that remain liquid at surface conditions. Typically, this will be water and oil if present in the model, but never different types of gas. If a producing becomes nearly or completely flooded by gas the well can go to very high or even infinite flows. It is therefore important to combine this control with a limit such as a bottom-hole-pressure constraint.

source
JutulDarcy.SurfaceOilRateTargetType
SurfaceOilRateTarget(q)

Well target of specified oil rate with value q at surface conditions. Typically used for a ProducerControl as oil, for economic reasons, is rarely injected into the subsurface. Abbreviated as ORAT in some settings.

source
JutulDarcy.SurfaceGasRateTargetType
SurfaceGasRateTarget(q)

Well target of specified gas rate with value q at surface conditions.

Often used for both InjectorControl ProducerControl. Abbreviated as GRAT in some settings. If used for production it is important to also impose limits, as the well rate may become very high if there is little gas present.

source
JutulDarcy.ReservoirVoidageTargetType
ReservoirVoidageTarget(q, weights)

RESV target for history matching cases. The weights input should have one entry per phase (or pseudocomponent) in the system. The well control equation is then:

$|q_{ctrl} - \sum_i w_i q_i^s|$

where $q_i^s$ is the surface rate of phase $i$ and $w_i$ the weight of component stream $i$.

This constraint is typically set up from .DATA files for black-oil and immiscible cases.

source
JutulDarcy.DisabledTargetType
DisabledTarget(q)

Disabled target used when a well is under DisabledControl() only. The well will be disconnected from the surface.

source

Imposing limits on wells (multiple constraints)

Well forces

Changing perforations

JutulDarcy.PerforationMaskType
mask = PerforationMask(mask::Vector)

Create a perforation mask. This can be passed to setup_forces for a well under the mask argument. The mask should equal the number of perforations in the well and is applied to the reference well indices in a multiplicative fashion. For example, if a well named :Injector has two perforations, the following mask would disable the first perforation and decrease the connection strength for the second perforation by 50%:

mask = PerforationMask([0.0, 0.5])
iforces = setup_forces(W, mask = mask)
forces = setup_reservoir_forces(model, control = controls, Injector = iforces)
source

Other forces

Can use SourceTerm or FlowBoundaryCondition