Governing equations in geothermal energy
Fimbul currently supports pure H₂O as a single-component, two-phase fluid system. Water may be present in a liquid phase (
Conservation of mass
Mass conservation is written as
where
where
NOTE: In practice, the interface between liquid and vapor phases in an H₂O system may exhibit non-negligible capillary pressure effects. This is currently not modeled in Fimbul; support is planned for a future release.
Conservation of thermal energy
Thermal energy conservation is expressed as
where
The term
Fluid properties
The fluid properties of H₂O—such as density, viscosity, enthalpy, and phase state—depend on pressure and enthalpy (or temperature) and are provided through precomputed lookup tables.
For the high-enthalpy (two-phase) regime, the steam tables are generated using the CoolProp library [] via the FimbulCoolPropExt extension. They are stored as Artifacts that are loaded automatically when using the high-enthalpy formulation. The tables can also be loaded directly using the Artifacts API. To generate your own tables, see build_steam_tables_h2o in FimbulCoolPropExt.
The figure below shows the temperature, density, and vapor saturation of H₂O as functions of pressure and specific enthalpy, covering the full range of both single-phase and two-phase states. The saturation line separates the single-phase liquid region (left), two-phase region (center), and single-phase vapor region (right). These phase diagram contours can be visualized using plot_phase_diagram_contours.

For the low-enthalpy (single-phase liquid) regime, Fimbul uses PVT tables from JutulDarcy generated using the NIST database. In this case,
Wells
Flow in wells can be modeled in two different ways:
As a simple well where flow in and out of the wellbore is computed based on an explicitly computed pressure drawdown from the top to each perforated cell—see JutulDarcy's
SimpleWell. In this formulation, the entire wellbore gets a single temperature, which in many cases is a poor approximation for geothermal wells.As a multisegment well where each wellbore is discretized as a 1D object with its own conservation equations for mass and energy, with accompanying pressure and heat variables (either temperature or enthalpy depending on the formulation)—see JutulDarcy's
MultiSegmentWell.
In geothermal energy, heat is exchanged with the formation along the entire wellbore, so a multisegment well formulation is the preferred modeling choice. For closed-loop geothermal wells (e.g., AGS, BHE and BTES), a multisegment well formulation is necessary, since temperature changes along the wellbore are crucial to model. All examples in Fimbul use the multisegment well formulation. This models conservation of mass and energy as in Equations (1) and (2), but with only void space,
where
where
where
Perforations of both simple and multisegment wells compute mass and conductive heat flow using Peaceman-type well indices, with the exception of U-tube and coaxial closed-loop wells (see below). The well index compute_peaceman_index and the JutulDarcy documentation on wells. For a perforation connecting well node
where
where the phase enthalpy
Thermal well index
The thermal well index
where the casing, grout and rock terms are
Here, WI and WIth in setup_well).
Closed-loop wells
Closed-loop wells (see setup_closed_loop_well) do not exchange mass with the reservoir, so
where
Generic closed-loop well (ClosedLoopGenericWell): the pipe exchanges heat directly with the reservoir through
Single U-tube (ClosedLoop1UWell): two pipes with outer diameter
the resistances are
where
Coaxial (ClosedLoopCoaxialWell): an inner pipe inside an outer pipe (the annulus), surrounded by grout. The subscripts
the resistances are
For the U-tube and coaxial wells, the grout-to-reservoir index
NOTE: For the U-tube and coaxial wells,
only accounts for the thermal resistance inside the borehole. Unlike the Peaceman-type index above (used by the generic closed-loop well), it contains no term for conduction from the borehole wall to the center of the reservoir cell, i.e., the temperature of the perforated cell is assumed to approximate the borehole wall temperature. This is the same assumption as in [], and requires the reservoir grid to be refined around the well.
Fracture flow
In many geothermal systems, flow is dominated by fractures. In enhanced geothermal systems (EGS), hydraulically stimulated fractures provide the flow paths between injection and production wells in otherwise low-permeability rock. In fracture thermal energy storage (FTES), heat is stored by circulating hot water through fractures in crystalline rock. Such fractures are much thinner than the grid cells but far more permeable than the surrounding rock, and they are therefore poorly represented by the matrix permeability alone.
To model fractured systems, Fimbul can be combined with the discrete fracture modeling (DFM) framework in JutulDarcy—see the EGS and FTES setup functions. In DFM, the fractures are represented as a separate, lower-dimensional mesh made up of faces of the matrix mesh, and we model conservation of mass and energy in the fractures just as in the matrix using Equations (1) and (2). A fracture cell has volume
Matrix–fracture exchange. Each fracture cell lies on a face of the matrix mesh and is connected to the two matrix cells on either side of that face. The direct connection between the two matrix cells is removed, so that all flow across the face passes through the fracture, and half of the fracture volume is subtracted from each of the two matrix cells. The mass flow of phase
where
where the phase enthalpy
Well–fracture exchange. Multisegment wells that cross a fracture are connected directly to the fracture cells they intersect: each crossing gets an additional well node that perforates the fracture cell. Mass and heat exchange through these perforations is computed as for the matrix (see Wells), with Peaceman-type well indices computed from the fracture permeability and thermal conductivity. Simple wells do not currently support crossing fractures: they are only connected to the matrix cells they perforate.