HomeFeaturesExamplesTutorialsHelpTheoryVerificationPricingContact
BoreTherm / Example libraryExample 23 / 23
Worked feature example

Automation and interface

Run a small multi-job CLI batch with JSON results, use the C API to save a parameter change, and demonstrate display units and language through the installed application.

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

What the example does

BoreTherm runs without the window as well: a command-line program calculates, sizes and prices projects, alone or many at once, and writes results as JSON. The desktop program shows the same results in metric or imperial units and in several languages.

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
Batchthree jobs: simulate, size, cost
DisplaySI and imperial units; English and German

Run the example in BoreTherm

  1. On the command line: boretherm-cli simulate, size or cost with the project and --json; boretherm-cli run runs a list of jobs in parallel.
  2. --set changes an input for one run without editing the project.
  3. In the program, Project → Units switches the display units and View → Language the language.
02 / How BoreTherm calculates it

One engine, two interfaces

1 Projectthe same project file forthe program and the CLI2 Overrides--set id=value for onerun; validated ranges3 Enginethe same calculation asCalculate / Size / Cost4 JSONone document per run,SI units, exit code5 Displayunits and language onlychange the presentationBatch: 3 jobs, exit code 0 each
The command line and the desktop program share the calculation.
  1. ProjectBoth read and write the same project files.
  2. OverridesInputs can be changed per run; unknown names and values out of range are refused.
  3. EngineThe results are identical to the program's.
  4. JSONEvery number in the JSON output is in SI units with temperatures in °C; the exit code tells success, limits exceeded or input errors.
  5. DisplayImperial units and another language change what is shown, not the calculation.
03 / In BoreTherm

The example in BoreTherm

The units dialog: SI or imperial.
The units dialog: SI or imperial.
The Results summary in German.
The Results summary in German.
04 / Results

Calculated results

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

Batch jobCommandExit codeDesign limits
temperaturesimulate0within limits
required_lengthsize0within limits
costcost0within limits
Automation and interface 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, SI units16150.000-2.41316.0260.11943,033.2within limits
office, imperial units16150.000-2.41316.0260.11943,033.2within limits
05 / Discussion

What the example shows

The same project gives the same numbers in the program, on the command line and in another language or unit system. The command line suits batch work, parameter variations and the integration of BoreTherm into other tools; its JSON output always stays in SI units.