Metadata-Version: 2.4
Name: BHResist
Version: 0.4.0
Summary: Functionality to compute the thermal resistance of borehole heat exchangers
Author: Matt Mitchell
Author-email: Matt Mitchell <Matt.Mitchell@nlr.gov>
License-Expression: BSD-3-Clause
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Requires-Dist: secondarycoolantprops>=1.5
Requires-Python: >=3.10
Project-URL: Repository, https://github.com/NatLabRockies/BHResist
Project-URL: Documentation, https://bhresist.readthedocs.io/
Project-URL: Releases, https://github.com/NatLabRockies/BHResist/releases
Description-Content-Type: text/markdown

# BHResist

A pure Python library for calculating the effective thermal resistance of grouted single U-tube, parallel double U-tube, and coaxial borehole heat exchangers. The single- and double-U-tube models use first-order closed-form multipole approximations. The coaxial model uses a one-dimensional resistance network. Uniform heat-flux and uniform borehole-wall-temperature boundary conditions are supported.

The public calculation methods accept total borehole mass flow rate. For a parallel double U-tube, BHResist divides that flow equally between the two U-tubes. Thermal resistances are reported in K/(W/m), equivalently m-K/W.

BHResist is intended to be a lightweight library that can be imported into other Python applications without bulky dependencies.

## Fluid properties

BHResist uses the public fluid API provided by SecondaryCoolantProps 1.5 or newer. Built-in fluids can be selected with the `fluid_type` and `fluid_concentration` initializer arguments.

User-defined fluids can contain constant or temperature-dependent properties:

    from scp import get_fluid

    custom_fluid = get_fluid(
        "user_defined",
        name="BoreholeFluid",
        viscosity=lambda temp: 0.003 - 1.0e-5 * temp,
        specific_heat=3200.0,
        density=lambda temp: 1050.0 - 0.4 * temp,
        conductivity=0.42,
        t_min=-20.0,
        t_max=80.0,
    )

Pass this object as `fluid=custom_fluid` when initializing a borehole and omit `fluid_type` and `fluid_concentration`. An initialized model can adopt another SecondaryCoolantProps fluid with `borehole.set_fluid(custom_fluid)`.

## Documentation

Documentation for BHResist can be found at https://bhresist.readthedocs.io.

## Citation

Mitchell, Matt, Adams, Sonja, Lee, Edwin, and Swindler, Alexander. BHResist [SWR-25-57]. Computer Software. https://github.com/NatLabRockies/BHResist. USDOE Office of Energy Efficiency and Renewable Energy (EERE), Renewable Power Office. Geothermal Technologies Office. 04 Apr. 2025. Web. doi:10.11578/dc.20250421.3.

## References

Hellström, G. 1991. "Ground Heat Storage: Thermal Analyses of Duct Storage Systems." PhD dissertation. Department of Mathematical Physics, University of Lund, Sweden.

Grundmann, R.M. 2016. "Improved design methods for ground heat exchangers." Master’s thesis, Oklahoma State University.

Javed, S. and J.D. Spitler. 2016. "Calculation of borehole thermal resistance." In _Advances in Ground-Source Heat Pump Systems_. Ed. S.J. Rees. Woodhead Publishing. https://doi.org/10.1016/B978-0-08-100311-4.00003-0

Javed, S., and J.D. Spitler. 2017. "Accuracy of borehole thermal resistance calculation methods for grouted single U-tube ground heat exchangers." _Applied Energy,_ 187:790-806. https://doi.org/10.1016/j.apenergy.2016.11.079

Claesson, J., and S. Javed. 2019. "Explicit multipole formulas and thermal network models for calculating thermal resistances of double U-pipe borehole heat exchangers." _Science and Technology for the Built Environment,_ 25(8) pp. 980–992. https://doi.org/10.1080/23744731.2019.1620565
