HomeFeaturesExamplesTutorialsHelpTheoryVerificationPricingContact
BoreTherm / Example libraryExample 14 / 23
Worked feature example

Monte Carlo analysis

Sample the stored uncertain office inputs with a fixed seed. Size each sample and run a separate fixed-length simulation to estimate the probability of meeting temperature limits.

16Boreholes
-2.41 °CMinimum mean fluid temperature
16.03 °CMaximum mean fluid temperature
1Variants compared
01 / Project

What the example does

The ground and the demand of the office are uncertain. A Monte Carlo analysis draws 100 combinations of the uncertain inputs, sizes the field for each, and checks how often the original 150 m design meets the limits.

Inputs

InputValue
Field16 boreholes, 4 × 4 rectangle, spacing 6.0 × 6.0 m
Boreholeslength 150.0 m, top 4.0 m below the surface, diameter 140 mm
Constructionsingle U, PE pipe 32 × 2.9 mm, shank spacing 70 mm, grout 1.60 W/(m·K)
Groundthermal conductivity 2.60 W/(m·K), heat capacity 2.20 MJ/(m³·K), surface temperature 9.0 °C, geothermal heat flux 0.060 W/m²
Fluid and flow25 % monopropylene glycol, 0.50 l/s per borehole
Loadsmonthly: heating 200 MWh, hot water 8 MWh and cooling 45 MWh per year; peaks 100 kW heating and 45 kW cooling for 6 h
Heat pumpseasonal performance factors 3.8 heating, 2.8 hot water, 5.0 cooling
Design limitsmean fluid temperature between −3.0 °C and 20.0 °C
Period25 years
Uncertain inputsconductivity normal 2.6 ± 0.3 W/(m·K); heat capacity uniform 2.0–2.6 MJ/(m³·K); surface temperature normal 9.0 ± 0.5 °C; heating demand triangular 0.9–1.0–1.15
Sampling100 Latin hypercube samples, seed 1

Run the example in BoreTherm

  1. Press Monte Carlo. Check the distributions of the uncertain inputs, the number of samples and the seed.
  2. Run the analysis.
  3. Advanced analysis → Studies & uncertainty → Monte Carlo: the histogram of the required length, the percentiles, the convergence and the sensitivity ranks.
02 / How BoreTherm calculates it

How the Monte Carlo analysis works

1 Distributionsnormal, uniform, triangularper uncertain input2 Latin hypercube100 samples spread evenlyover each distribution3 Size eachrequired H for the limits→ 100 lengths4 Fixed lengthsimulate each sampleat 150 m → limits met?5 Statisticsmedian, P90, P95 of H;share meeting the limits6 SensitivitySpearman rank correlationof each input with HMedian 145.1 m, P95 166.3 m; 73 % meet the limits at 150 m
Each sample is sized and also simulated at the original length.
  1. DistributionsEach uncertain input gets a distribution and its parameters.
  2. Latin hypercubeEach distribution is split into 100 equally likely intervals, and each interval is used once: fewer samples are needed than with random draws.
  3. Size eachEvery sample gets its required length.
  4. Fixed lengthEvery sample is also simulated at 150 m and checked against the limits.
  5. StatisticsThe lengths give the percentiles; the fixed-length runs the share that passes.
  6. SensitivityThe conductivity dominates (−0.77): higher conductivity, shorter boreholes. The heating demand acts the other way (+0.41).
03 / In BoreTherm

The example in BoreTherm

The Monte Carlo dialog: distributions, samples and seed.
The Monte Carlo dialog: distributions, samples and seed.
The histogram of the required length with its percentiles.
The histogram of the required length with its percentiles.
The sensitivity ranks of the uncertain inputs.
The sensitivity ranks of the uncertain inputs.
04 / Results

Calculated results

Calculated with BoreTherm for every variant of the example. Displayed values are rounded.

MetricValue
Samples100
Failed sizes0
Median H [m]145.111
90th percentile H [m]158.671
95th percentile H [m]166.334
Fixed-length probability of meeting limits0.730
Uncertain inputSpearman correlation with required H
ground.conductivity-0.7676
ground.volumetricHeatCapacity-0.1724
ground.surfaceTemperature-0.4279
loads.heatingScale0.4112
Monte Carlo analysis results plotted from BoreTherm output
Chart of the BoreTherm results in the tables of this section.

Temperatures by variant

VariantBoreholesLength H [m]Tf min [°C]Tf max [°C]Rb* [m K/W]Pump [W]Design limits
office reference16150.000-2.41316.0260.11943,033.2within limits
05 / Discussion

What the example shows

Half of the sampled designs need less than 145.1 m, and 95 % less than 166.3 m. At the original 150 m, 73 % of the samples meet the limits. The size-mode percentiles describe resized designs; the 73 % is the reliability of the original field.

The results hold only for the assumed distributions, and 100 samples do not give precise tail probabilities. The fixed seed makes the example reproducible.