The one idea: the same step response, computed on a mesh
Every design calculation in BoreTherm rests on the step response of the ground: the temperature at the borehole wall after a constant heat rate of 1 W/m starts at t = 0. Made dimensionless it is the g-function. The analytic model, which the program calls 2D, gets it from finite line sources: each borehole is a line of finite length that releases heat into the ground below a surface held at constant temperature. This model serves every design command: Calculation › Calculate, Calculation › Size borehole length, Calculation › Optimize, Tools › Parametric study and Tools › Monte Carlo. The 3D analysis computes the step response with the finite element method (FEM: the ground divided into small cells, the heat equation solved on them) on a mesh of the ground. The loads enter afterwards, by superposition (a load history is a sum of load steps, so its response is the sum of shifted step responses), in the same way for both. One FEM run therefore serves every load case.
g(t) = 2πλ · Tw(t) / qT(x, t) = Tu(z) + Σ Δqi Φ(x, t − ti)Tf(tn) = Tm + Σi Δqi · g(tn − ti−1) / (2πλ) + qn Rb*λ: thermal conductivity of the ground; Tw: borehole wall temperature; Tu(z): undisturbed ground temperature at depth z; Φ: the temperature field after a unit step of 1 W/m; Tf: mean fluid temperature, the average of inlet and outlet; Tm: undisturbed ground temperature averaged over the borehole; Rb*: effective borehole thermal resistance between the fluid and the borehole wall.
The comparison is Δ = Tf,3D − Tf,2D, per year and over the period. The 2D side is recomputed with the analytic g-function on the FEM's time grid, so that only the g-function differs.
The workflow
The 3D analysis is an extra step after the design. It answers two questions: is the analytic result right for this ground and this field, and what does the ground around the field look like over the years?
In the program the 3D analysis is switched on on the Project page (3D analysis: Simple FEM, the analysis described here; Full FEM is a further level that time-steps the ground with the actual loads) and has one page of its own:
- 3D analysis page, left: the mesh (Auto, Coarse, Medium, Fine, Very fine, Custom), the elements (hexahedra or tetrahedra), cells per ground layer, the domain, the estimate (nodes, memory, run time, expected error of g), Suggest and Check mesh, then Run 3D analysis and the temperature field settings (thresholds, evaluation lines, VTU export).
- Right: 3D view (mesh coloured by layer, cell size, quality or temperature), Plan map and Section of the ground temperature, 2D / 3D with the chart and the table of the comparison.
What Run 3D analysis does
- Fingerprint. A SHA-256 over every input that can change the FEM run: field and layout geometry, ground and layers, groundwater, borehole construction and sections, fluid and flow, network, boundary condition, mesh and domain settings, design period and the time grid. Loads, limits, names and costs are not part of it.
- Mesh. A graded tensor-product grid of hexahedra for vertical boreholes; an adaptive tetrahedral mesh as soon as a borehole is inclined (Elements: Auto). Small cells at the borehole axes, ends, layer interfaces and section boundaries; they grow by the growth ratio away from them.
- Assemble. Conduction matrix K of trilinear elements, lumped heat capacity C, the ground at T = 0 on all faces. Each borehole is a line of points carrying its share of the heat.
- Time stepping. Backward Euler, (C/Δt + K) Tn+1 = C/Δt Tn + f. The steps are constant inside a time level and each level is twice as long as the one before, so one factorisation serves a level.
- Wall temperature. The node on the axis sees the average of its cells, not the wall. The well index adds q · ln(c h / rb)/(2πλ); a near-field correction removes the lag of the first levels. Before tP = h²/(4α) (h the cell size at the axis, α the thermal diffusivity of the ground), the time below which the mesh cannot resolve the borehole, the response keeps the shape of the analytic self response, scaled to the FEM value at tP.
- Superpose. The monthly loads (and peaks) of the project give Tf with g3D and with g2D, the comparison per year, and the ground temperature from the stored frames.
The mesh
The block must be large enough that its faces stay at the undisturbed temperature: its sides lie at least 4 √(α tend) from the field (tend: the last time of the time grid), where the temperature change is below 0.5 % of the change at the boreholes. The cell at the axis must be larger than the borehole: the line source in a cell behaves like a borehole of radius c·h (c ≈ 0.115, calibrated), so h is raised to at least 1.1 rb/c ≈ 9.5 rb. A finer mesh therefore does not mean smaller cells at the axis; it refines the rest of the block and the time steps.
Theory: how close are 2D and 3D, and why
For a single borehole both models describe the same physics: conduction in a homogeneous ground with an isothermal surface. The remaining difference of about 0.4 % comes from the discretisation and from the boundary condition (a uniform wall temperature, UBWT, solved on the mesh and with the segments of the analytic model). It changes the fluid temperature by hundredths of a kelvin:
Is the mesh fine enough? The same project run with each mesh preset (g at the last time of the grid; the lowest Tf of the period, 2D: −2.933 °C):
| Mesh | g3D/g2D − 1 | Tf,min 3D | Δ against 2D |
|---|---|---|---|
| Coarse (example) | −0.43 % | −2.909 °C | 0.025 K |
| Medium | −0.44 % | −2.908 °C | 0.026 K |
| Fine | −0.44 % | −2.908 °C | 0.025 K |
| Very fine | −0.48 % | −2.907 °C | 0.027 K |
| Auto | −0.43 % | −2.908 °C | 0.025 K |
For this single borehole every preset gives the same answer within a few hundredths of a per cent: Coarse is enough here. For a field of many boreholes the presets differ more; there Check mesh (the chosen mesh against one 1.5 times coarser) estimates the error of g before you trust Δ.
Why a load change needs no new run. The FEM is linear: constant properties, T = 0 initial and boundary values. Its g-function and its field are responses to a unit step, and any load history is a sum of steps. Changing the monthly loads, the per-year loads, the design limits, the thresholds or the evaluation lines only redoes the superposition (milliseconds). Changing the geometry, the ground, the flow, the mesh or the period changes the fingerprint: the page then says The inputs changed since the 3D analysis: run it again.
How each result is derived
| Result | How BoreTherm derives it | Example project |
|---|---|---|
| Mesh | tensor-product grid nx × ny × nz; hexahedra (nx−1)(ny−1)(nz−1); unknowns = interior nodes | 23 × 23 × 40 = 21160 nodes; 18876 Hex8; 16759 unknowns |
| Domain | margin = larger of 4 √(α tend) and the field-size rule (3 × field width, 2 × depth) | 4 √(8.33·10⁻⁷ m²/s × 1.04·10⁸ s) = 37.2 m → 74.5 × 74.5 × 208 m |
| Cell at the axis | hMin = max(preset, 1.1 rb/c): the equivalent radius c·h must exceed rb | max(1.0, 0.71) = 1.0 m; c = 0.1154 |
| Time stepping | levels of doubling length, 6 backward-Euler steps each, up to the last time of the grid | 12 levels, 69 steps to 3.3 a |
| Analytic below tP | tP = h²/(4α): the mesh cannot resolve the hole earlier | 1² / (4 × 8.33·10⁻⁷) = 300000 s = 83 h |
| g-function | g = 2πλ Tw/q for q = 1 W/m (UBWT: the common wall temperature) | last time: 3D 5.075, 2D 5.097 (−0.43 %) |
| Energy balance | Q Δt = ΔE + Δt · heat through the faces, at every step | 3.51·10⁻¹³ relative |
| Field | the ground part of the solution at every step (float32), stored losslessly compressed | 69 frames, 4.6 MB; sidecar file 0.59 MB |
| Comparison | per year min / max of Tf over base and peak loads; Δ = 3D − 2D | Tf,min −2.93 → −2.91 °C (Δ 0.025 K) |
Run figures from the saved FEM results; the FEM run took 1.0 s on the development PC.
The example in numbers
Comparison table of the 2D / 3D tab (minimum and maximum mean fluid temperature per year, including peaks):
| Year | Tf,min 2D | Tf,min 3D | Δ min [K] | Tf,max 2D | Tf,max 3D | Δ max [K] |
|---|---|---|---|---|---|---|
| 1 | −2.11 °C | −2.08 °C | 0.023 | 8.60 °C | 8.61 °C | 0.004 |
| 2 | −2.93 °C | −2.91 °C | 0.025 | 8.34 °C | 8.35 °C | 0.006 |
Largest difference of the monthly base-load fluid temperature: 0.018 K. The design limit is −3.0 °C. The design keeps it with a margin of 0.07 K; the FEM g-function moves Tf,min by 0.025 K, so the 3D analysis confirms the design.
- Open the example project with its saved FEM results. The page shows From saved results.
- Calculation › Run 3D analysis: the saved run is reused, only the superposition runs.
- Look at the 3D view, the Plan map and the Section at years 1 and 2; read the 2D / 3D tab.
- Change a monthly load and run again: still no FEM run. Change the borehole length: the results are out of date and the next run is a new FEM run.
Limits to keep in mind
- Design and sizing stay analytic in the GUI. Calculate, Size borehole length, Optimize and the studies never use the 3D result. If Δ is large and the mesh is checked, adjust the design so that the 3D Tf stays inside the limits (the command-line program boretherm-cli can size with settings.gfunction.engine = FEM).
- Peaks are only partly checked. A 6-hour peak lies below tP (83 h at hMin 1 m), where the FEM g-function follows the scaled analytic shape. The temperature field contains the monthly base loads only; peaks reach centimetres to decimetres into the ground.
- Simple FEM is linear. Constant properties, no freezing, superposed loads, steady-state boreholes. The direct time stepping with the actual loads is Full FEM, the next level on the Project page.
- Coarse is a preview. Use Suggest or Check mesh before trusting Δ for a field. Hexahedra take vertical boreholes only; inclined fields use tetrahedra.
- Groundwater on hexahedra. The well index assumes conduction around the axis; at strong flow the late-time g can be about 1 % low.
- Memory. Above the field memory limit (default 1000 MB) only every k-th time step is kept and values between them are interpolated.
Numbers calculated with BoreTherm. Theory: BoreTherm theory manual.