OGS
ThermalResistanceHelpers.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <cmath>
7#include <numbers>
8
9#include "BaseLib/Error.h"
10#include "Pipe.h"
11
12namespace ProcessLib
13{
14namespace HeatTransportBHE
15{
16namespace BHE
17{
22inline double pipeWallThermalResistance(Pipe const& pipe,
23 double const wall_thermal_conductivity)
24{
25 return std::log(pipe.outsideDiameter() / pipe.diameter) /
26 (2.0 * std::numbers::pi * wall_thermal_conductivity);
27}
28
30inline double computeRgs(double const chi, double const R_g)
31{
32 return (1 - chi) * R_g;
33}
34
37inline double computeRgg(double const chi, double const R_gs, double const R_ar,
38 double const R_g)
39{
40 double const R_gg = 2.0 * R_gs * (R_ar - 2.0 * chi * R_g) /
41 (2.0 * R_gs - R_ar + 2.0 * chi * R_g);
42 if (!std::isfinite(R_gg))
43 {
45 "Error!!! Grout Thermal Resistance is an infinite number! The "
46 "simulation will be stopped!");
47 }
48 return R_gg;
49}
50} // namespace BHE
51} // namespace HeatTransportBHE
52} // namespace ProcessLib
#define OGS_FATAL(...)
Definition Error.h:10
double computeRgg(double const chi, double const R_gs, double const R_ar, double const R_g)
double computeRgs(double const chi, double const R_g)
Grout-soil thermal resistance: R_gs = (1 - chi) * R_g.
double pipeWallThermalResistance(Pipe const &pipe, double const wall_thermal_conductivity)
double const diameter
Inner diameter [m].
Definition Pipe.h:30