Skip to content

Add option to read precomputed g-function (TStep) from a .mat file for borefield models #1471

@LoneMeertens

Description

@LoneMeertens

Summary

Add an opt-in feature to import a precomputed temperature-response matrix (TStep) from a user-provided .mat file instead of computing the g-function at startup. This enables users to supply externally computed g-functions (for example using pygfunction) for advanced or non-standard borefield configurations (e.g. inclined boreholes), improving flexibility and accuracy.

.mat format / semantics

  • The .mat file must contain a variable named TStep with dimensions nTimTot × 2 where:
    • Column 1: time (seconds)
    • Column 2: TStep values (g-function divided by 2 * π * H * nBor * kSoi) — same normalization the library currently writes.
  • nTimTot = nTimSho + nTimLon (defaults: 26 + 50 = 76).
  • This feature is opt-in: default temResMatInput = false (fully backwards compatible)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions