HomeFeaturesExamplesTutorialsHelpTheoryVerificationPricingContact
Theory manual

9. Sizing and optimization

9.1 Objective

Sizing finds the borehole length H (equal for all boreholes, positions fixed) such that the mean fluid temperature stays within [Tlim,min,Tlim,max]. The violation

f(H)=max(Tlim,min−Tf,min(H),Tf,max(H)−Tlim,max)
(9.1)

is positive where the limits are violated, and the smallest H in [Hmin,Hmax] with f(H)≤0 is sought. H enters through g (B/H, D/H, rb/H and ts), Rb* (eq. (5.21)), Tm (eq. (3.2)) and q=Q/(NH). The limit that is active at the solution is reported as the limiting condition. In a field of unequal boreholes H is the mean length and the boreholes keep their proportions ((13.7)); with layered ground λeff, αeff and Tm are recomputed at every trial length.

9.2 Root finding

f is continuous and, for realistic cases, decreasing in H. After bracketing (f(Hmin)>0≥f(Hmax)), the root is found with Brent's method (Brent 1973, zeroin): inverse quadratic interpolation or secant steps, safeguarded by bisection, to a tolerance of 0.1 m. The feasible end of the final bracket is returned.

9.3 g-function cache

Computing the exact g-function at every iteration is the dominant cost. By default BoreTherm computes exact g-functions in parallel at five lengths spaced geometrically over [Hmin,Hmax],

Hk=Hmin(HmaxHmin)k/4,k=0…4
(9.2)

all on one grid of xj=ln(t/ts) values with the spacing of (4.24). During the search g is interpolated at fixed xj with cubic Lagrange polynomials in lnH over the four nearest nodes, as in Peere et al. (2021). Figure 8 shows why this works: at fixed ln(t/ts), g varies smoothly with lnH. Below a node's first time the infinite line source continues the curve:

g(t)=g(t0)+12[E1(rb24αt)−E1(rb24αt0)]
(9.3)
g-function of the 4 × 4 example field (B = 6 m) at fixed ln(t/ts) against the borehole length (computed at 11 lengths).
Figure 8. g-function of the 4 × 4 example field (B = 6 m) at fixed ln(t/ts) against the borehole length (computed at 11 lengths).

The root of the interpolated problem is then confirmed with the exact g-function and polished by Newton or secant steps on exact simulations (usually one) until an exact point is feasible and within the tolerance; the reported length and simulation are therefore exact. If the exact and interpolated roots differ by more than 5 % or five exact steps do not converge, sizing is repeated with the exact g-function at every iteration (also selectable as an option). Measured on the example and on 10 × 10 fields (H = 60–280 m), the cached search gives extreme temperatures within 0.1 K of the exact ones (sized H within 0.4 %). For the example both variants give H = 143.7 m (12 simulations of which 2 exact, against 8 exact). The cache adds a node wherever D+H crosses a layer interface; with groundwater flow it uses 9 nodes (g depends on H also through the Péclet number, Chapter 12); on the segmented ground 9 nodes with linear stencils inside the pieces keep the extremes within 0.1 K; with sections under UFT the exact g-function is used.

Table 16. Sizing trace of the example: bracket, Brent iterations on the interpolated g-function, then exact confirmation.
StepH [m]Tf,min [°C]Tf,max [°C]g-function
120.000−63.24649.251interpolated
2300.0005.38815.248interpolated
3279.5304.70315.198interpolated
4149.765−2.41116.024interpolated
5132.857−4.07616.460interpolated
6143.780−2.98416.164interpolated
7143.616−3.00016.168interpolated
8143.628−2.99916.168interpolated
9144.347−2.92916.149interpolated
10142.910−3.06916.186interpolated
11143.628−3.00616.180exact
12143.718−2.99816.178exact

Table 16 shows the procedure on the example: the ends of the range, eight Brent steps on interpolated g-functions, and two exact simulations; the second exact point is feasible and within 0.1 m of the root.

9.4 Last-year sizing and non-monotonic cases

The classic monthly method sizes on the last simulated year only. BoreTherm checks all years by default; with the last-year option the violation (9.1) uses Tmin,Y and Tmax,Y of (8.6) for the last year Y instead:

flast(H)=max(Tlim,min−Tmin,Y(H),Tmax,Y(H)−Tlim,max)
(9.4)

The option acts on the exact and the cached sizing paths, the sizing trace, the sizing curve and the optimizer. BoreTherm's last year is the last operating year, which equals the classic method's calendar year when the start month is January. The difference matters when the first years are critical: in case 3 of Ahmadfard & Bernier (2019) the classic method gives 87.8 m over 10 years (and misses the first-year limit) but 112 m for a one-year run. BoreTherm gives 110.9 m by default and 88.9 m with the last-year option.

The classic-method preset combines the classic convection (5.5), the classic peak response (8.5) and (9.4). Table 68 (Appendix A) lists the measured agreement with published results of the classic method.

With a geothermal heat flux, Tf,max can be non-monotonic in H because Tm rises with depth (eq. (3.2)); in the Linden worked example of the classic method's manual Tmax is violated both below the design length and above about 300 m. A Tmax-limited sizing can also be ill-conditioned (dTmax/dH of the order of 0.002 K/m). The trace of all evaluated lengths shows such cases.

9.5 Layout optimization

The optimizer finds the cheapest or shortest layout on a rectangular plot:

  1. Enumerate every layout of the selected types (line, L, U, open rectangle, rectangle, and optionally single, L2 and circle) that fits the plot in either orientation, for spacings on a grid (coarse 5 m steps when no spacing step is given), within the allowed borehole count. Mirror duplicates (n1×n2 against n2×n1) are skipped.
  2. Screen: size each candidate in parallel with the equivalent-borehole g-function and a sizing tolerance of max(0.5 m, tolerance), within the allowed depth range.
  3. Refine (automatic spacing): around the ten best feasible candidates, try spacings ±1 … ±4 m in 1 m steps with the same shape.
  4. Rank by the objective and re-size exactly the best k+k/5+5 candidates with the project's own g-function settings, where k is the number of layouts to keep; return the best k.

The cost of a candidate with N boreholes of length H is

C=Cfixed+cbhN+cdrillNH+ctrenchLtrench
(9.5)

where Ltrench is the length of the minimum spanning tree of the borehole heads (Prim's algorithm, O(N2)), an estimate of the connecting trench. The total-length objective ranks by NH instead. For the example plot (40 × 30 m) the optimizer screened and re-sized the candidates in 0.6 s (219 layouts screened in 0.5 s, 29 re-sized exactly; total 0.6 s). With a site plan the same search runs inside the drilling areas, with placed layout types and fill patterns as candidates and the trench to the connection point (Chapter 16).