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
8#include "BaseLib/Error.h"
9
10namespace ProcessLib
11{
12namespace HeatTransportBHE
13{
14namespace BHE
15{
17inline double computeRgs(double const chi, double const R_g)
18{
19 return (1 - chi) * R_g;
20}
21
24inline double computeRgg(double const chi, double const R_gs, double const R_ar,
25 double const R_g)
26{
27 double const R_gg = 2.0 * R_gs * (R_ar - 2.0 * chi * R_g) /
28 (2.0 * R_gs - R_ar + 2.0 * chi * R_g);
29 if (!std::isfinite(R_gg))
30 {
32 "Error!!! Grout Thermal Resistance is an infinite number! The "
33 "simulation will be stopped!");
34 }
35 return R_gg;
36}
37} // namespace BHE
38} // namespace HeatTransportBHE
39} // namespace ProcessLib
#define OGS_FATAL(...)
Definition Error.h:19
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.