Skip to content

Driving forces

JutulDarcy.setup_reservoir_forces Function
julia
setup_reservoir_forces(model; control = nothing, limits = nothing, set_default_limits = true, <keyword arguments>)

Set up driving forces for a reservoir model with wells

source

Source terms

JutulDarcy.SourceTerm Type
julia
SourceTerm(cell, value; fractional_flow = [1.0], type = MassSource)

Create source term in given cell with given total value.

The optional fractional_flow argument controls how this term is divided over components if used for inflow and should contain one entry per component in the system: (number_of_components(system)). fractional_flow should sum up to 1.0. The type argument should be an instance of the FlowSourceType enum, with interpretations as follows:

  • MassSource: Source is directly interpreted as component masses.

  • StandardVolumeSource: Source is volume at standard/surface conditions. References densities are used to convert into mass sources.

  • VolumeSource: Source is volume at in-situ / reservoir conditions.

source
JutulDarcy.FlowSourceType Type

MassSource: Source is directly interpreted as component masses. StandardVolumeSource: Source is volume at standard/surface conditions. References densities are used to convert into mass sources. VolumeSource: Source is volume at in-situ / reservoir conditions.

source

Boundary conditions

JutulDarcy.FlowBoundaryCondition Type
julia
FlowBoundaryCondition

Boundary condition for prescribed pressure/temperature flow across a reservoir boundary. Optional fractional_flow, density, and enthalpy values can be used to specify the injected stream.

If enthalpy is left as nothing, thermal inflow falls back to the local reservoir-state enthalpy at the boundary cell: Enthalpy when available, otherwise a saturation-weighted value from FluidEnthalpy.

source
JutulDarcy.flow_boundary_condition Function
julia
flow_boundary_condition(cells, domain, pressures, temperatures = 298.15; kwarg...)

Add flow boundary conditions to a vector of cells for a given domain coming from reservoir_domain. The input arguments pressures and temperatures can either be scalars or one value per cell. Optional injected-stream properties such as fractional_flow, density, and enthalpy can be provided through keyword arguments, which are passed onto the FlowBoundaryCondition constructor.

The output of this function is a Vector of boundary conditions that can be passed on the form forces = setup_reservoir_forces(model, bc = bc).

source