Skip to content

Closed-loop wells ​

Closed-loop wells (e.g. BTES wells and coaxial borehole heat exchangers) are set up as a single merged multisegment well, where the supply and return parts are connected by a regular well segment. The two parts are controlled as separate wells, named by closed_loop_well_names.

Setup ​

Fimbul.setup_closed_loop_well Function
julia
setup_closed_loop_well(D::DataDomain, reservoir_cells;
    closed_loop_type = :generic, name = :CL, kwarg...)

Set up a closed-loop well in reservoir_cells of the reservoir domain D. closed_loop_type is either an AbstractClosedLoopWell or one of :generic, :u1 and :coaxial. The result is a single merged well domain named name, with supply and return parts named by closed_loop_well_names. The return part is connected to the reservoir in return_reservoir_cell with zero well indices. By default, this is the reservoir cell perforated by the end node of the supply part, or the first perforated reservoir cell if the end node is not perforated.

source
Fimbul.setup_vertical_closed_loop_well Function
julia
setup_vertical_closed_loop_well(D::DataDomain, i, j; heel = 1, toe = missing, kwarg...)

Set up a vertical closed-loop well in column (i, j) of a logically structured mesh, from layer heel to layer toe (defaults to the bottom layer). See setup_closed_loop_well for the keyword arguments.

source
Fimbul.setup_btes_well Function
julia
setup_btes_well(D::DataDomain, reservoir_cells; name = :BTES, closed_loop_type = :u1, kwarg...)

Set up a borehole thermal energy storage (BTES) well. This is a closed-loop well (see setup_closed_loop_well) that defaults to a 1U well.

source
Fimbul.setup_vertical_btes_well Function
julia
setup_vertical_btes_well(D::DataDomain, i, j; name = :BTES, closed_loop_type = :u1, heel = 1, toe = missing, kwarg...)

Set up a vertical BTES well in column (i, j) of a logically structured mesh. See setup_btes_well and setup_vertical_closed_loop_well.

source
Fimbul.closed_loop_well_names Function
julia
supply_name, return_name = closed_loop_well_names(type, name)
supply_name, return_name = closed_loop_well_names(well::DataDomain)

Names of the supply and return parts of a closed-loop well, used for controls and well results. The names are name with a suffix that depends on the closed-loop type:

For a merged closed-loop well domain, the names are taken from the domain.

source

Closed-loop well types ​

Fimbul.AbstractClosedLoopWell Type
julia
AbstractClosedLoopWell

Abstract type for closed-loop wells. A closed-loop well is set up as a single multisegment well with two controllable parts: a supply well, which holds the full closed-loop topology (pipes and grout), and a return well, which is a single outlet node connected to the end node of the supply well by a regular well segment. The two parts are merged into one well domain using JutulDarcy.WellMerging.merge_well_domains, so that each part can be controlled independently without the need for a cross term between them. The names of the two parts are given by closed_loop_well_names.

The closed-loop type is stored as the type of the MultiSegmentWell. Concrete types implement setup_closed_loop_supply.

source
Fimbul.ClosedLoopGenericWell Type
julia
ClosedLoopGenericWell()

Closed-loop well with direct thermal communication between the pipe and the reservoir. If no topology is given, the well is a single pipe that starts in the first and ends in the last of the given reservoir cells. A general topology (e.g., for advanced geothermal systems with multiple laterals) can be given using neighborship, perforation_cells_well, well_cell_centers and end_nodes.

source
Fimbul.ClosedLoop1UWell Type
julia
ClosedLoop1UWell()

Single U-tube closed-loop well with two pipes embedded in grout.

source
Fimbul.ClosedLoopCoaxialWell Type
julia
ClosedLoopCoaxialWell()

Coaxial closed-loop well with an inner pipe and an outer annulus embedded in grout.

source
Fimbul.setup_closed_loop_supply Function
julia
setup_closed_loop_supply(type::AbstractClosedLoopWell, D, reservoir_cells; name, kwarg...)

Set up the supply part of a closed-loop well of the given type. This is a multisegment well holding the full closed-loop topology, with exactly one end node where the fluid leaves the loop.

source

Controls ​

Fimbul.ClosedLoopRestControl Type
julia
ClosedLoopRestControl(pressure)
ClosedLoopRestControl(target::BottomHolePressureTarget)

Well control for a closed-loop well that is at rest, i.e. one that is not circulating. The top node of the well is held at the given wellhead pressure, and mass is free to flow either into or out of the well as the fluid in the loop contracts or expands with temperature. Fluid that enters the loop carries the enthalpy of the top node, so the exchange is energy-neutral.

This mimics the expansion vessel of a real closed-loop installation. Without it, a shut-in loop is a sealed, rigid volume, and a temperature change of the fluid it contains must be balanced by pressure alone (of order 10 bar/K for water), which cannot be resolved for cooling loops in particular.

The control is meant to replace DisabledControl for the supply well of a closed loop during rest periods. The return well should be disabled, so that the loop has a single connection to the surface.

See also JutulDarcy's DisabledControl, InjectorControl and ProducerControl.

source

Borehole fill ​

The material filling the borehole around the pipes (grout by default) is set with the fill_material keyword argument of the closed-loop setup functions, either as a predefined material or as a named tuple of properties. Each property can be overridden by the fill_thermal_conductivity, fill_density and fill_heat_capacity keyword arguments.

Fimbul.borehole_fill_properties Function
julia
borehole_fill_properties(material = :grout;
    thermal_conductivity = missing, density = missing, heat_capacity = missing)

Thermal properties of the material filling the borehole around the pipes of a closed-loop well, returned as a named tuple with fields thermal_conductivity [W/(m K)], density [kg/m³] and heat_capacity [J/(kg K)].

material is either the name of a predefined material (:grout) or a named tuple with the three properties. Each property can be overridden by the corresponding keyword argument.

source