HomeFeaturesExamplesTutorialsHelpTheoryVerificationPricingContact
BoreTherm / TutorialsTutorial 09 / 19
Workflow and theory · Layout & site

Layout optimization

How the optimizer searches layouts on a plot, sizes each one, ranks them by length or cost, and how a candidate becomes the project’s field. The numbers are those of the example project: a small office or school building of about 3000 m² with monthly loads of 200 MWh/year heating, 8 MWh/year hot water and 45 MWh/year cooling (peaks 100 kW heating, 45 kW cooling), simulated over 25 years. The optimizer searches a 40 × 30 m plot for a field of 12–16 boreholes.

01 / The one idea

The one idea: size every layout that fits, then compare

Size borehole length (menu Calculation › Size borehole length) answers one question: how long must the boreholes of this layout be? The optimizer (Optimize, menu Calculation › Optimize) asks the same question for every layout that fits the plot and keeps the best answers. Each candidate is sized so that the mean fluid temperature Tf (the average of the fluid temperatures entering and leaving the boreholes) just stays inside the design limits Tmin and Tmax. The building, the ground, the borehole design and the limits are the same for all candidates; only the layout, the length H of each borehole and the cost differ.

Search spaceRectangle and Line12–16 boreholesspacing 6–8 mEnumerate9 layouts fit theplot 40 × 30 mSize each layoutsmallest H that keepsTf in −3 … +20 °CRankby total cost9 candidates keptBest candidateRectangle 6 × 2, 8 m12 × 164.0 mSize borehole length sizes one layout; Optimize sizes every layout that fits and keeps the best ones.All candidates meet the same design limits, so they differ only in layout, length and cost.
The search in the example. The best candidate is the cheapest of the sized layouts.
Sizing of one candidate (as Size borehole length)smallest H with f(H) = max(Tmin − Tf,min(H), Tf,max(H) − Tmax) ≤ 0
Total lengthL = Σ Hi = N · H
Cost, simple model (net)C = C0 + cbh · N + cm · L + ct · Ltrench
Objectiveminimise L, or C, or the life-cycle heat cost

Tf,min and Tf,max are the lowest and highest Tf over the simulated period. H must lie between the borehole length min and max of the setup (60 and 250 m here). A layout that cannot meet the limits inside that range is not a candidate.

02 / The workflow

The workflow

Use the optimizer when the layout is still open. Two choices shape the search: where the boreholes may go, and what counts as “best”.

Inputs ready: ground, borehole, fluid, loads, design limitsIs the layout alreadyfixed by the site?yesSize borehole lengththe length of this layout;no search needednoIs there a site planwith drilling areas?noyesRegion: Rectangular plotlength × width of free land;no site plan neededRegion: Site planlayouts and fills inside thedrilling areas, setbacksWhat should beminimised?Total borehole lengthdrilling metres only;no prices neededTotal costBorefield costs page:simple or detailed modelLife-cycle heat costneeds the heating-systemcomparison, monthly loadsThen: Optimize → Optimization candidates → Apply to project → Calculate or Size borehole length to confirm → report.
A fixed layout needs only Size borehole length. Otherwise choose the region and the objective. Total length needs no prices; total cost uses the Borefield costs page; the life-cycle heat cost (the cost of the heat over the service life) uses the heating-system comparison.

In the program the optimizer is one dialog and one results page:

Input pagesground, borehole, fluid,loads, design limitsBorefield costsEconomics: the costmodel and the pricesOptimize…region, plot, spacing,types, objectiveOptimization candidatesResults: ranked table,Export CSVReportsection LayoutoptimizationConfirm the designCalculate or Sizeborehole lengthField layouttype, n1 × n2, spacingand length replacedApply to projector double-click a row;one undo stepset up and runuse the result
The dialog takes the cost model from the Borefield costs page (button Edit costs…). Apply to project is the bridge back to the design; then Calculate (menu Calculation › Calculate) or Size borehole length confirms the fluid temperatures and the length.
  • Optimize…, menu Calculation. Region: rectangular plot or site plan. Plot and geometry: plot length and width, borehole distance min and max, layout spacing step (0 = automatic), borehole length min and max, boreholes min and max. Layout types: single, line, L, double L, U, open rectangle, rectangle, circle, hexagonal, concentric rings. Site plan: fills: grid, staggered, row-wise, perimeter, angle step. Objective and Keep best.
  • Optimization candidates (Results): rank, layout, n1, n2, boreholes, min. distance, layout spacing, H, total length, drilled length, trench, cost, minimum and maximum mean fluid temperature. Click a header to sort.
  • Apply to project asks “Replace the layout with …?”, then sets the layout type, n1, n2 and the spacing, regenerates the field and gives every borehole the length H. Inclination and rotation are cleared. It is one undo step, and the Field layout page opens. A site plan candidate becomes a custom field.
03 / How the search works

How the search works

1 Check the setupranges in order, at least one layout type, keep best ≥ 12 Enumerate the layoutsevery type × spacing on the grid × n1, n2 that fit theplot (either orientation), borehole count in range3 Screen: size every layout, in parallelfast g-function (equivalent boreholes),tolerance max(0.5 m, project tolerance)4 Automatic spacing only (step = 0)refine ±1 … 4 m around the 10 best5 Rankby the objective; ties: by the other measure6 Exact sizing of the bestkeep best + keep best/5 + 5 layouts, with theproject’s g-function settings and tolerance7 Sort again and keep the best→ Results › Optimization candidatesLimits met withinH min … H max?yesnodroppedexample: 9 layouts9 of 9 sizedstep 2 m: skippedmin(9, 10 + 2 + 5) = 9keep best = 10analytic engine(FEM: size afterwards)project tolerance(0.1 m here)
Two stages: a fast screening of every layout, then an exact sizing of the best ones. Green: the example’s numbers.
  • Enumerate. For each ticked type and each spacing of the grid (min, min + step, …, max) every n1 × n2 whose extent fits the plot, in either orientation. The rotation does not change the thermal response, and mirror images (4 × 3 and 3 × 4) are tried once. Spacing step 0 means a coarse 5 m grid first.
  • Screen. Every layout is sized in parallel with a fast g-function (equivalent boreholes, Prieto and Cimmino 2021) and a coarser tolerance. The g-function is the dimensionless temperature response of the whole field to a constant heat rate; it carries the interaction between the boreholes. Layouts whose boreholes would intersect are rejected. A layout that cannot meet the limits within the length range is dropped.
  • Refine (automatic spacing only): the 10 best are tried again at ±1, 2, 3 and 4 m spacing.
  • Rank by the objective. Equal values are ordered by the other measure (cost or length), then by the borehole count.
  • Exact sizing of the best keep best + keep best/5 + 5 layouts with the project’s own g-function method and tolerance. Their order can change, so they are sorted again and the best keep best are shown.

Every candidate is a vertical, unrotated field with the default connection: all boreholes in parallel, or strings of boreholes in series. The optimizer always uses the analytic g-function; with the FEM (finite-element) engine, size the chosen layout afterwards.

04 / What decides the ranking

What decides the ranking

Two effects compete. Boreholes that stand further apart disturb each other less, so the field needs fewer metres. But the trench gets longer, and the plot runs out. The chart repeats the sizing of three rectangles of the candidate list for spacings from 4 to 14 m (a parametric study that sizes the length at each spacing).

allowedallowedTotal borehole length46810121418002000220024002600spacing B [m]total length [m]Cost (simple model)468101214100110120130140spacing B [m]cost [thousand EUR]4 × 44 × 36 × 24 × 44 × 36 × 2Solid: the rectangle fits the 40 × 30 m plot. Open circle: the largest spacing that fits. Dashed: it would need more land.
Left: the total length falls with every metre of spacing. Right: so does the cost, because the saved drilling is worth more than the added trench. Shaded: the spacing range of the setup.
The best candidate sits on a boundary. From 8 to 9 m the 6 × 2 field saves 40 m of drilling (1,800 EUR) and adds 11 m of trench (660 EUR). The search therefore stops at the largest spacing the setup allows: 8 m, where the 6 × 2 field spans exactly 40 m, the plot length. When the best candidate touches a bound (spacing max, plot edge, count limit, length range), the bound decided, not the physics. Widen it, if the site allows, and run again.

The shape matters too. With the same 12 boreholes at 8 m, the long 6 × 2 field needs 1968 m and the compact 4 × 3 field 2018 m: in a block more boreholes have neighbours on several sides. More boreholes do not help either: the 4 × 4 field at 8 m needs shorter boreholes but more metres in total.

05 / How each result is derived

How each result is derived

The cost uses the project’s Borefield costs settings. The example project has none, so the four prices of the optimization setup apply: 5,000 EUR fixed, 800 EUR per borehole, 45 EUR per metre and 60 EUR per trench metre. The detailed model gives a step function (depth surcharges, manifold sizes); the search needs no gradient, so it works the same.

020406080100120140cost of the candidate [thousand EUR]total [EUR]fixedper boreholeper metretrench1 · 6 × 2 · 8 m108,4472 · 4 × 3 · 8 m110,7053 · 6 × 2 · 6 m112,1624 · 4 × 3 · 6 m114,6315 · 7 × 2 · 6 m117,1606 · 5 × 3 · 8 m118,3017 · 4 × 4 · 8 m121,3958 · 5 × 3 · 6 m123,1889 · 4 × 4 · 6 m126,675
Cost of the candidates by term, in rank order. Drilling is 82 % of the cost of rank 1; the borehole count and the trench decide between candidates of similar length.

The columns of the Optimization candidates page, with rank 1 of the example:

ColumnHow BoreTherm derives itRank 1 (Rectangle 6 × 2, 8 m)
Layout, n1, n2, Boreholesthe enumerated shape; Boreholes = n1 · n2 for a rectangleRectangle 6 × 2, 12
Min. distance / Layout spacingclosest pair of heads / spacing that generated the layout8.0 / 8.0 m
H [m]smallest length in 60 … 250 m that keeps Tf within both limits (Brent’s method, exact g-function)164.0 m
Total lengthΣ H = N · H12 × 164.01 = 1968.2 m
DrilledΣ (D + H + foot length); D = buried depth, foot = drilled below H1968.2 + 12 × 4 = 2016.2 m
Trenchminimum spanning tree of the borehole heads; for a grid (N − 1) · B(12 − 1) × 8 = 88 m
Costfixed + per borehole · N + per metre · total length + per trench metre · trench; net, here without contingency or VAT5,000 + 800 × 12 + 45 × 1968.2 + 60 × 88 = 108,447 EUR
Mean fluid temperature min / maxextremes of the sized simulation over the whole period−3.00 °C / 17.82 °C: Tf,min is the binding limit
06 / The example in numbers

The example in numbers

1 · 6 × 2 · 8 m12 × 164.0 = 1968 m2 · 4 × 3 · 8 m12 × 168.2 = 2018 m3 · 6 × 2 · 6 m12 × 173.3 = 2080 m4 · 4 × 3 · 6 m12 × 177.9 = 2135 m5 · 7 × 2 · 6 m14 × 152.8 = 2140 m6 · 5 × 3 · 8 m15 × 140.1 = 2102 m7 · 4 × 4 · 8 m16 × 133.9 = 2142 m8 · 5 × 3 · 6 m15 × 149.8 = 2248 m9 · 4 × 4 · 6 m16 × 143.7 = 2299 m7 × 2 · 8 m48 m long > 40 m
The 9 candidates on the 40 × 30 m plot (dashed), in rank order by cost, with N × H = total length below each. The last panel shows a layout that is not enumerated: it does not fit.
  • No line is a candidate: 12 boreholes in a line at 6 m are 66 m long, longer than the plot.
  • All candidates are sized to Tf,min = −3 °C: heating decides. Tf,max stays below 17.8 °C.
  • The objective changes the order. By length, the 5 × 3 field at 8 m (2102 m) ranks 4th and beats the 4 × 3 field at 6 m (2135 m). By cost it ranks 6th: three more boreholes and 46 m more trench.
  • After Apply to project and Calculate the simulation gives Tf,min = −3.00 °C and Tf,max = 17.82 °C: the candidate’s values. The exact sizing used the project’s own settings.
07 / Limits to keep in mind

Limits to keep in mind

  • The result is the best of the layouts tried, within the bounds you set. It is not a proof of a global optimum. Custom and inclined layouts are not generated; apply a candidate, then edit it.
  • A candidate at a bound (spacing max, plot edge, count limit, length max) means the bound decided. Check whether it can move.
  • Screening uses a fast g-function and a 0.5 m tolerance. Layouts outside the best keep best + keep best/5 + 5 of the screening are never sized exactly; for close calls raise Keep best.
  • The cost is an estimate from unit prices, not a quote. The simple model has five unit prices (fixed, per borehole, per metre, per circuit, per trench metre); a ranking by cost is only as good as those prices.
  • Candidates have equal lengths and are evaluated with the default connection; explicit strings of the project are not carried over. Check the circuits after Apply to project.
  • The life-cycle objective needs the heating-system comparison with exactly one enabled ground-source heat pump variant, and monthly building loads.
  • The optimizer uses the analytic g-function only. With the FEM engine, size the applied layout again with Size borehole length.

Numbers calculated with BoreTherm. Costs are illustrative.