OGS 6.2.2-330-gf48c72f61.dirty.20200225212913
ProcessLib::HeatTransportBHE::BHE Namespace Reference

Classes

struct  AdvectiveThermalResistanceCoaxial
 
class  BHE_1U
 
class  BHE_2U
 
class  BHE_CXA
 
class  BHE_CXC
 
struct  BHECommon
 
class  BHECommonCoaxial
 
class  BHECommonUType
 
struct  BoreholeGeometry
 
struct  FixedPowerConstantFlow
 
struct  FixedPowerFlowCurve
 
struct  FlowAndTemperature
 
struct  GroutAndGroutSoilExchangeThermalResistanceCoaxial
 
struct  GroutParameters
 
struct  Pipe
 
struct  PipeConfigurationCoaxial
 
struct  PipeConfigurationUType
 
struct  PipeWallThermalResistanceCoaxial
 
struct  PowerCurveConstantFlow
 
struct  RefrigerantProperties
 
struct  TemperatureCurveConstantFlow
 
struct  ThermoMechanicalFlowProperties
 

Typedefs

using BHETypes = std::variant< BHE_1U, BHE_CXA, BHE_CXC, BHE_2U >
 
using FlowAndTemperatureControl = std::variant< TemperatureCurveConstantFlow, FixedPowerConstantFlow, FixedPowerFlowCurve, PowerCurveConstantFlow >
 

Functions

double compute_R_gs (double const chi, double const R_g)
 
double compute_R_gg (double const chi, double const R_gs, double const R_ar, double const R_g)
 
std::pair< double, double > thermalResistancesGroutSoil (double chi, double const R_ar, double const R_g)
 
double compute_R_gs_2U (double const chi, double const R_g)
 
double compute_R_gg_2U (double const chi, double const R_gs, double const R_ar, double const R_g)
 
std::vector< double > thermalResistancesGroutSoil2U (double chi, double const R_ar_1, double const R_ar_2, double const R_g)
 
BoreholeGeometry createBoreholeGeometry (BaseLib::ConfigTree const &config)
 
static std::tuple< BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfigurationCoaxial, bool > parseBHECoaxialConfig (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
template<typename T_BHE >
T_BHE createBHECoaxial (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
template BHE_CXA createBHECoaxial< BHE_CXA > (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
template BHE_CXC createBHECoaxial< BHE_CXC > (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
static std::tuple< BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfigurationUType, bool > parseBHEUTypeConfig (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
template<typename T_BHE >
T_BHE createBHEUType (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
template BHE_1U createBHEUType< BHE_1U > (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
template BHE_2U createBHEUType< BHE_2U > (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
FlowAndTemperatureControl createFlowAndTemperatureControl (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves, RefrigerantProperties const &refrigerant)
 
GroutParameters createGroutParameters (BaseLib::ConfigTree const &config)
 
double prandtlNumber (double const &viscosity, double const &heat_capacity, double const &heat_conductivity)
 
double reynoldsNumber (double const velocity_norm, double const pipe_diameter, double const viscosity, double const density)
 
double nusseltNumber (double const reynolds_number, double const prandtl_number, double const pipe_diameter, double const pipe_length)
 
double nusseltNumberAnnulus (double const reynolds_number, double const prandtl_number, double const diameter_ratio, double const pipe_aspect_ratio)
 
Pipe createPipe (BaseLib::ConfigTree const &config)
 
double coaxialPipesAnnulusDiameter (Pipe const &inner_pipe, Pipe const &outer_pipe)
 
RefrigerantProperties createRefrigerantProperties (BaseLib::ConfigTree const &config)
 
AdvectiveThermalResistanceCoaxial calculateAdvectiveThermalResistance (Pipe const &inner_pipe, Pipe const &outer_pipe, RefrigerantProperties const &fluid, double const Nu_inner_pipe, double const Nu_annulus)
 
PipeWallThermalResistanceCoaxial calculatePipeWallThermalResistance (Pipe const &inner_pipe, Pipe const &outer_pipe)
 
GroutAndGroutSoilExchangeThermalResistanceCoaxial calculateGroutAndGroutSoilExchangeThermalResistance (Pipe const &outer_pipe, GroutParameters const &grout_parameters, double const borehole_diameter)
 
ThermoMechanicalFlowProperties calculateThermoMechanicalFlowPropertiesPipe (Pipe const &pipe, double const length, RefrigerantProperties const &fluid, double const flow_rate)
 
ThermoMechanicalFlowProperties calculateThermoMechanicalFlowPropertiesAnnulus (Pipe const &inner_pipe, Pipe const &outer_pipe, double const length, RefrigerantProperties const &fluid, double const flow_rate)
 

Typedef Documentation

◆ BHETypes

Definition at line 25 of file BHETypes.h.

◆ FlowAndTemperatureControl

Function Documentation

◆ calculateAdvectiveThermalResistance()

AdvectiveThermalResistanceCoaxial ProcessLib::HeatTransportBHE::BHE::calculateAdvectiveThermalResistance ( Pipe const &  inner_pipe,
Pipe const &  outer_pipe,
RefrigerantProperties const &  fluid,
double const  Nu_inner_pipe,
double const  Nu_annulus 
)
inline

Definition at line 42 of file ThermalResistancesCoaxial.h.

References coaxialPipesAnnulusDiameter(), ProcessLib::HeatTransportBHE::BHE::Pipe::diameter, ProcessLib::HeatTransportBHE::BHE::Pipe::outsideDiameter(), and ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::thermal_conductivity.

Referenced by ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::calcThermalResistances().

46 {
47  double const hydraulic_diameter =
48  coaxialPipesAnnulusDiameter(inner_pipe, outer_pipe);
49 
50  auto advective_thermal_resistance = [&](double Nu, double diameter_ratio) {
51  constexpr double pi = boost::math::constants::pi<double>();
52  return 1.0 / (Nu * fluid.thermal_conductivity * pi) * diameter_ratio;
53  };
54  return {advective_thermal_resistance(Nu_inner_pipe, 1.),
55  advective_thermal_resistance(
56  Nu_annulus, hydraulic_diameter / inner_pipe.outsideDiameter()),
57  advective_thermal_resistance(
58  Nu_annulus, hydraulic_diameter / outer_pipe.diameter)};
59 }
double coaxialPipesAnnulusDiameter(Pipe const &inner_pipe, Pipe const &outer_pipe)
Definition: Pipe.h:57

◆ calculateGroutAndGroutSoilExchangeThermalResistance()

GroutAndGroutSoilExchangeThermalResistanceCoaxial ProcessLib::HeatTransportBHE::BHE::calculateGroutAndGroutSoilExchangeThermalResistance ( Pipe const &  outer_pipe,
GroutParameters const &  grout_parameters,
double const  borehole_diameter 
)
inline

Definition at line 69 of file ThermalResistancesCoaxial.h.

References ProcessLib::HeatTransportBHE::BHE::GroutParameters::lambda_g, and ProcessLib::HeatTransportBHE::BHE::Pipe::outsideDiameter().

Referenced by ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::calcThermalResistances().

72 {
73  constexpr double pi = boost::math::constants::pi<double>();
74 
75  double const outer_pipe_outside_diameter = outer_pipe.outsideDiameter();
76  double const chi =
77  std::log(std::sqrt(borehole_diameter * borehole_diameter +
78  outer_pipe_outside_diameter *
79  outer_pipe_outside_diameter) /
80  std::sqrt(2) / outer_pipe_outside_diameter) /
81  std::log(borehole_diameter / outer_pipe_outside_diameter);
82  double const R_g =
83  std::log(borehole_diameter / outer_pipe_outside_diameter) / 2 /
84  (pi * grout_parameters.lambda_g);
85  double const conductive_b = chi * R_g;
86  double const grout_soil = (1 - chi) * R_g;
87  return {conductive_b, grout_soil};
88 }

◆ calculatePipeWallThermalResistance()

PipeWallThermalResistanceCoaxial ProcessLib::HeatTransportBHE::BHE::calculatePipeWallThermalResistance ( Pipe const &  inner_pipe,
Pipe const &  outer_pipe 
)
inline

Definition at line 61 of file ThermalResistancesCoaxial.h.

References ProcessLib::HeatTransportBHE::BHE::Pipe::wallThermalResistance().

Referenced by ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::calcThermalResistances().

63 {
64  return {inner_pipe.wallThermalResistance(),
65  outer_pipe.wallThermalResistance()};
66 }

◆ calculateThermoMechanicalFlowPropertiesAnnulus()

ThermoMechanicalFlowProperties ProcessLib::HeatTransportBHE::BHE::calculateThermoMechanicalFlowPropertiesAnnulus ( Pipe const &  inner_pipe,
Pipe const &  outer_pipe,
double const  length,
RefrigerantProperties const &  fluid,
double const  flow_rate 
)
inline

Definition at line 47 of file ThermoMechanicalFlowProperties.h.

References ProcessLib::HeatTransportBHE::BHE::Pipe::area(), ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::density, ProcessLib::HeatTransportBHE::BHE::Pipe::diameter, ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::dynamic_viscosity, ProcessLib::HeatTransportBHE::BHE::ThermoMechanicalFlowProperties::nusselt_number, nusseltNumberAnnulus(), ProcessLib::HeatTransportBHE::BHE::Pipe::outsideArea(), ProcessLib::HeatTransportBHE::BHE::Pipe::outsideDiameter(), prandtlNumber(), reynoldsNumber(), ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::specific_heat_capacity, ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::thermal_conductivity, and ProcessLib::HeatTransportBHE::BHE::ThermoMechanicalFlowProperties::velocity.

Referenced by ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::updateHeatTransferCoefficients().

50 {
51  double const Pr =
52  prandtlNumber(fluid.dynamic_viscosity, fluid.specific_heat_capacity,
53  fluid.thermal_conductivity);
54 
55  double const inner_pipe_outside_diameter = inner_pipe.outsideDiameter();
56 
57  // Velocity between the outer pipe and inner pipe.
58  double const velocity =
59  flow_rate / (outer_pipe.area() - inner_pipe.outsideArea());
60 
61  double const Re = reynoldsNumber(
62  velocity, outer_pipe.diameter - inner_pipe_outside_diameter,
63  fluid.dynamic_viscosity, fluid.density);
64 
65  double const diameter_ratio =
66  inner_pipe_outside_diameter / outer_pipe.diameter;
67  double const pipe_aspect_ratio =
68  (outer_pipe.diameter - inner_pipe_outside_diameter) / length;
69  double const nusselt_number =
70  nusseltNumberAnnulus(Re, Pr, diameter_ratio, pipe_aspect_ratio);
71  return {velocity, nusselt_number};
72 }
double prandtlNumber(double const &viscosity, double const &heat_capacity, double const &heat_conductivity)
Definition: Physics.h:19
double nusseltNumberAnnulus(double const reynolds_number, double const prandtl_number, double const diameter_ratio, double const pipe_aspect_ratio)
Definition: Physics.h:63
double reynoldsNumber(double const velocity_norm, double const pipe_diameter, double const viscosity, double const density)
Definition: Physics.h:26

◆ calculateThermoMechanicalFlowPropertiesPipe()

ThermoMechanicalFlowProperties ProcessLib::HeatTransportBHE::BHE::calculateThermoMechanicalFlowPropertiesPipe ( Pipe const &  pipe,
double const  length,
RefrigerantProperties const &  fluid,
double const  flow_rate 
)
inline

Definition at line 30 of file ThermoMechanicalFlowProperties.h.

References ProcessLib::HeatTransportBHE::BHE::Pipe::area(), ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::density, ProcessLib::HeatTransportBHE::BHE::Pipe::diameter, ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::dynamic_viscosity, ProcessLib::HeatTransportBHE::BHE::ThermoMechanicalFlowProperties::nusselt_number, nusseltNumber(), prandtlNumber(), reynoldsNumber(), ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::specific_heat_capacity, ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::thermal_conductivity, and ProcessLib::HeatTransportBHE::BHE::ThermoMechanicalFlowProperties::velocity.

Referenced by ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::updateHeatTransferCoefficients(), ProcessLib::HeatTransportBHE::BHE::BHE_1U::updateHeatTransferCoefficients(), and ProcessLib::HeatTransportBHE::BHE::BHE_2U::updateHeatTransferCoefficients().

34 {
35  double const Pr =
36  prandtlNumber(fluid.dynamic_viscosity, fluid.specific_heat_capacity,
37  fluid.thermal_conductivity);
38 
39  double const velocity = flow_rate / pipe.area();
40  double const Re = reynoldsNumber(velocity, pipe.diameter,
41  fluid.dynamic_viscosity, fluid.density);
42  double const nusselt_number = nusseltNumber(Re, Pr, pipe.diameter, length);
43  return {velocity, nusselt_number};
44 }
double prandtlNumber(double const &viscosity, double const &heat_capacity, double const &heat_conductivity)
Definition: Physics.h:19
double reynoldsNumber(double const velocity_norm, double const pipe_diameter, double const viscosity, double const density)
Definition: Physics.h:26
double nusseltNumber(double const reynolds_number, double const prandtl_number, double const pipe_diameter, double const pipe_length)
Definition: Physics.h:34

◆ coaxialPipesAnnulusDiameter()

double ProcessLib::HeatTransportBHE::BHE::coaxialPipesAnnulusDiameter ( Pipe const &  inner_pipe,
Pipe const &  outer_pipe 
)
inline

Definition at line 57 of file Pipe.h.

References createPipe(), ProcessLib::HeatTransportBHE::BHE::Pipe::diameter, and ProcessLib::HeatTransportBHE::BHE::Pipe::wall_thickness.

Referenced by calculateAdvectiveThermalResistance().

59 {
60  return outer_pipe.diameter - inner_pipe.diameter -
61  2 * inner_pipe.wall_thickness;
62 }

◆ compute_R_gg()

double ProcessLib::HeatTransportBHE::BHE::compute_R_gg ( double const  chi,
double const  R_gs,
double const  R_ar,
double const  R_g 
)

Definition at line 86 of file BHE_1U.cpp.

References OGS_FATAL.

Referenced by thermalResistancesGroutSoil().

88 {
89  double const R_gg = 2.0 * R_gs * (R_ar - 2.0 * chi * R_g) /
90  (2.0 * R_gs - R_ar + 2.0 * chi * R_g);
91  if (!std::isfinite(R_gg))
92  {
93  OGS_FATAL(
94  "Error!!! Grout Thermal Resistance is an infinite number! The "
95  "simulation will be stopped!");
96  }
97 
98  return R_gg;
99 }
#define OGS_FATAL(fmt,...)
Definition: Error.h:64

◆ compute_R_gg_2U()

double ProcessLib::HeatTransportBHE::BHE::compute_R_gg_2U ( double const  chi,
double const  R_gs,
double const  R_ar,
double const  R_g 
)

Definition at line 104 of file BHE_2U.cpp.

References OGS_FATAL.

Referenced by thermalResistancesGroutSoil2U().

106 {
107  double const R_gg = 2.0 * R_gs * (R_ar - 2.0 * chi * R_g) /
108  (2.0 * R_gs - R_ar + 2.0 * chi * R_g);
109  if (!std::isfinite(R_gg))
110  {
111  OGS_FATAL(
112  "Error!!! Grout Thermal Resistance is an infinite number! The "
113  "simulation will be stopped!");
114  }
115 
116  return R_gg;
117 }
#define OGS_FATAL(fmt,...)
Definition: Error.h:64

◆ compute_R_gs()

double ProcessLib::HeatTransportBHE::BHE::compute_R_gs ( double const  chi,
double const  R_g 
)

Definition at line 81 of file BHE_1U.cpp.

Referenced by thermalResistancesGroutSoil().

82 {
83  return (1 - chi) * R_g;
84 }

◆ compute_R_gs_2U()

double ProcessLib::HeatTransportBHE::BHE::compute_R_gs_2U ( double const  chi,
double const  R_g 
)

Definition at line 99 of file BHE_2U.cpp.

Referenced by thermalResistancesGroutSoil2U().

100 {
101  return (1 - chi) * R_g;
102 }

◆ createBHECoaxial()

template<typename T_BHE >
T_BHE ProcessLib::HeatTransportBHE::BHE::createBHECoaxial ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)

Definition at line 78 of file CreateBHECoaxial.cpp.

References createBHECoaxial< BHE_CXA >(), createBHECoaxial< BHE_CXC >(), and parseBHECoaxialConfig().

83 {
84  auto coaxial = parseBHECoaxialConfig(config, curves);
85  return {std::get<0>(coaxial), std::get<1>(coaxial), std::get<2>(coaxial),
86  std::get<3>(coaxial), std::get<4>(coaxial), std::get<5>(coaxial)};
87 }
static std::tuple< BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfigurationCoaxial, bool > parseBHECoaxialConfig(BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)

◆ createBHECoaxial< BHE_CXA >()

template BHE_CXA ProcessLib::HeatTransportBHE::BHE::createBHECoaxial< BHE_CXA > ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)

Referenced by createBHECoaxial().

◆ createBHECoaxial< BHE_CXC >()

template BHE_CXC ProcessLib::HeatTransportBHE::BHE::createBHECoaxial< BHE_CXC > ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)

Referenced by createBHECoaxial().

◆ createBHEUType()

template<typename T_BHE >
T_BHE ProcessLib::HeatTransportBHE::BHE::createBHEUType ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)

Definition at line 81 of file CreateBHEUType.cpp.

References createBHEUType< BHE_1U >(), createBHEUType< BHE_2U >(), and parseBHEUTypeConfig().

86 {
87  auto UType = parseBHEUTypeConfig(config, curves);
88  return {std::get<0>(UType), std::get<1>(UType), std::get<2>(UType),
89  std::get<3>(UType), std::get<4>(UType), std::get<5>(UType)};
90 }
static std::tuple< BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfigurationUType, bool > parseBHEUTypeConfig(BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)

◆ createBHEUType< BHE_1U >()

template BHE_1U ProcessLib::HeatTransportBHE::BHE::createBHEUType< BHE_1U > ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)

Referenced by createBHEUType().

◆ createBHEUType< BHE_2U >()

template BHE_2U ProcessLib::HeatTransportBHE::BHE::createBHEUType< BHE_2U > ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)

Referenced by createBHEUType().

◆ createBoreholeGeometry()

BoreholeGeometry ProcessLib::HeatTransportBHE::BHE::createBoreholeGeometry ( BaseLib::ConfigTree const &  config)
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__borehole__length
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__borehole__diameter

Definition at line 20 of file BoreholeGeometry.cpp.

References BaseLib::ConfigTree::getConfigParameter().

Referenced by ProcessLib::HeatTransportBHE::BHE::BoreholeGeometry::area(), parseBHECoaxialConfig(), and parseBHEUTypeConfig().

21 {
22  const auto borehole_length =
24  config.getConfigParameter<double>("length");
25  const auto borehole_diameter =
27  config.getConfigParameter<double>("diameter");
28  return {borehole_length, borehole_diameter};
29 }

◆ createFlowAndTemperatureControl()

FlowAndTemperatureControl ProcessLib::HeatTransportBHE::BHE::createFlowAndTemperatureControl ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves,
RefrigerantProperties const &  refrigerant 
)
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__type
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__TemperatureCurveConstantFlow__flow_rate
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__TemperatureCurveConstantFlow__temperature_curve
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__FixedPowerConstantFlow__power
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__FixedPowerConstantFlow__flow_rate
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__FixedPowerFlowCurve__flow_rate_curve
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__FixedPowerFlowCurve__power
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__PowerCurveConstantFlow__power_curve
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__PowerCurveConstantFlow__flow_rate

Definition at line 24 of file CreateFlowAndTemperatureControl.cpp.

References ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::density, BaseLib::ConfigTree::getConfigParameter(), BaseLib::getOrError(), OGS_FATAL, and ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::specific_heat_capacity.

Referenced by parseBHECoaxialConfig(), and parseBHEUTypeConfig().

30 {
32  auto const type = config.getConfigParameter<std::string>("type");
33  if (type == "TemperatureCurveConstantFlow")
34  {
36  auto const flow_rate = config.getConfigParameter<double>("flow_rate");
37 
38  auto const& temperature_curve = *BaseLib::getOrError(
39  curves,
41  config.getConfigParameter<std::string>("temperature_curve"),
42  "Required temperature curve not found.");
43 
44  return TemperatureCurveConstantFlow{flow_rate, temperature_curve};
45  }
46  if (type == "FixedPowerConstantFlow")
47  {
49  auto const power = config.getConfigParameter<double>("power");
50 
52  auto const flow_rate = config.getConfigParameter<double>("flow_rate");
53  return FixedPowerConstantFlow{flow_rate, power,
54  refrigerant.specific_heat_capacity,
55  refrigerant.density};
56  }
57 
58  if (type == "FixedPowerFlowCurve")
59  {
60  auto const& flow_rate_curve = *BaseLib::getOrError(
61  curves,
63  config.getConfigParameter<std::string>("flow_rate_curve"),
64  "Required flow rate curve not found.");
65 
67  auto const power = config.getConfigParameter<double>("power");
68 
69  return FixedPowerFlowCurve{flow_rate_curve, power,
70  refrigerant.specific_heat_capacity,
71  refrigerant.density};
72  }
73 
74  if (type == "PowerCurveConstantFlow")
75  {
76  auto const& power_curve = *BaseLib::getOrError(
77  curves,
79  config.getConfigParameter<std::string>("power_curve"),
80  "Required power curve not found.");
81 
83  auto const flow_rate = config.getConfigParameter<double>("flow_rate");
84 
85  return PowerCurveConstantFlow{power_curve, flow_rate,
86  refrigerant.specific_heat_capacity,
87  refrigerant.density};
88  }
89  OGS_FATAL("FlowAndTemperatureControl type '%s' is not implemented.",
90  type.c_str());
91 }
Map::mapped_type & getOrError(Map &map, Key const &key, std::string const &error_message)
Definition: Algorithm.h:148
#define OGS_FATAL(fmt,...)
Definition: Error.h:64

◆ createGroutParameters()

GroutParameters ProcessLib::HeatTransportBHE::BHE::createGroutParameters ( BaseLib::ConfigTree const &  config)
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout__density
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout__porosity
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout__heat_capacity
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout__thermal_conductivity

Definition at line 20 of file GroutParameters.cpp.

References BaseLib::ConfigTree::getConfigParameter().

Referenced by parseBHECoaxialConfig(), and parseBHEUTypeConfig().

21 {
22  const auto grout_density =
24  config.getConfigParameter<double>("density");
25  const auto grout_porosity =
27  config.getConfigParameter<double>("porosity");
28  const auto grout_heat_capacity =
30  config.getConfigParameter<double>("heat_capacity");
31  const auto grout_thermal_conductivity =
33  config.getConfigParameter<double>("thermal_conductivity");
34  return {grout_density, grout_porosity, grout_heat_capacity,
35  grout_thermal_conductivity};
36 }

◆ createPipe()

Pipe ProcessLib::HeatTransportBHE::BHE::createPipe ( BaseLib::ConfigTree const &  config)
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__inlet__diameter
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__inlet__wall_thickness
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__inlet__wall_thermal_conductivity

Definition at line 20 of file Pipe.cpp.

References BaseLib::ConfigTree::getConfigParameter().

Referenced by coaxialPipesAnnulusDiameter(), parseBHECoaxialConfig(), and parseBHEUTypeConfig().

21 {
23  const auto diameter = config.getConfigParameter<double>("diameter");
24  const auto wall_thickness =
26  config.getConfigParameter<double>("wall_thickness");
27  const auto wall_thermal_conductivity =
29  config.getConfigParameter<double>("wall_thermal_conductivity");
30  return {diameter, wall_thickness, wall_thermal_conductivity};
31 }

◆ createRefrigerantProperties()

RefrigerantProperties ProcessLib::HeatTransportBHE::BHE::createRefrigerantProperties ( BaseLib::ConfigTree const &  config)
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant__density
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant__viscosity
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant__specific_heat_capacity
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant__thermal_conductivity
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant__reference_temperature

Definition at line 20 of file RefrigerantProperties.cpp.

References BaseLib::ConfigTree::getConfigParameter().

Referenced by parseBHECoaxialConfig(), and parseBHEUTypeConfig().

22 {
23  auto const refrigerant_density =
25  config.getConfigParameter<double>("density");
26  auto const refrigerant_viscosity =
28  config.getConfigParameter<double>("viscosity");
29  auto const refrigerant_heat_capacity =
31  config.getConfigParameter<double>("specific_heat_capacity");
32  auto const refrigerant_thermal_conductivity =
34  config.getConfigParameter<double>("thermal_conductivity");
35  auto const refrigerant_reference_temperature =
37  config.getConfigParameter<double>("reference_temperature");
38  return {refrigerant_viscosity, refrigerant_density,
39  refrigerant_thermal_conductivity, refrigerant_heat_capacity,
40  refrigerant_reference_temperature};
41 }

◆ nusseltNumber()

double ProcessLib::HeatTransportBHE::BHE::nusseltNumber ( double const  reynolds_number,
double const  prandtl_number,
double const  pipe_diameter,
double const  pipe_length 
)
inline

Definition at line 34 of file Physics.h.

Referenced by calculateThermoMechanicalFlowPropertiesPipe().

38 {
39  if (reynolds_number < 2300.0)
40  {
41  return 4.364;
42  }
43  if (reynolds_number < 10000.0)
44  {
45  double const gamma = (reynolds_number - 2300) / (10000 - 2300);
46 
47  return (1.0 - gamma) * 4.364 +
48  gamma *
49  ((0.0308 / 8.0 * 1.0e4 * prandtl_number) /
50  (1.0 + 12.7 * std::sqrt(0.0308 / 8.0) *
51  (std::pow(prandtl_number, 2.0 / 3.0) - 1.0)) *
52  (1.0 + std::pow(pipe_diameter / pipe_length, 2.0 / 3.0)));
53  }
54 
55  double const xi = std::pow(1.8 * std::log10(reynolds_number) - 1.5, -2.0);
56  return (xi / 8.0 * reynolds_number * prandtl_number) /
57  (1.0 + 12.7 * std::sqrt(xi / 8.0) *
58  (std::pow(prandtl_number, 2.0 / 3.0) - 1.0)) *
59  (1.0 + std::pow(pipe_diameter / pipe_length, 2.0 / 3.0));
60 }

◆ nusseltNumberAnnulus()

double ProcessLib::HeatTransportBHE::BHE::nusseltNumberAnnulus ( double const  reynolds_number,
double const  prandtl_number,
double const  diameter_ratio,
double const  pipe_aspect_ratio 
)
inline

Definition at line 63 of file Physics.h.

Referenced by calculateThermoMechanicalFlowPropertiesAnnulus().

67 {
68  if (reynolds_number < 2300.0)
69  {
70  return 3.66 + (4.0 - 0.102 / (diameter_ratio + 0.02)) *
71  std::pow(diameter_ratio, 0.04);
72  }
73  if (reynolds_number < 10000.0)
74  {
75  double const gamma = (reynolds_number - 2300) / (10000 - 2300);
76 
77  return (1.0 - gamma) *
78  (3.66 + (4.0 - 0.102 / (diameter_ratio + 0.02))) *
79  std::pow(diameter_ratio, 0.04) +
80  gamma *
81  ((0.0308 / 8.0 * 1.0e4 * prandtl_number) /
82  (1.0 + 12.7 * std::sqrt(0.0308 / 8.0) *
83  (std::pow(prandtl_number, 2.0 / 3.0) - 1.0)) *
84  (1.0 + std::pow(pipe_aspect_ratio, 2.0 / 3.0)) *
85  ((0.86 * std::pow(diameter_ratio, 0.84) + 1.0 -
86  0.14 * std::pow(diameter_ratio, 0.6)) /
87  (1.0 + diameter_ratio)));
88  }
89  double const xi = std::pow(1.8 * std::log10(reynolds_number) - 1.5, -2.0);
90  return (xi / 8.0 * reynolds_number * prandtl_number) /
91  (1.0 + 12.7 * std::sqrt(xi / 8.0) *
92  (std::pow(prandtl_number, 2.0 / 3.0) - 1.0)) *
93  (1.0 + std::pow(pipe_aspect_ratio, 2.0 / 3.0)) *
94  ((0.86 * std::pow(diameter_ratio, 0.84) + 1.0 -
95  0.14 * std::pow(diameter_ratio, 0.6)) /
96  (1.0 + diameter_ratio));
97 }

◆ parseBHECoaxialConfig()

static std::tuple<BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfigurationCoaxial, bool> ProcessLib::HeatTransportBHE::BHE::parseBHECoaxialConfig ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)
static
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__use_bhe_pipe_network
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__borehole
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__outer
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__inner
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__longitudinal_dispersion_length
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control

Definition at line 29 of file CreateBHECoaxial.cpp.

References createBoreholeGeometry(), createFlowAndTemperatureControl(), createGroutParameters(), createPipe(), createRefrigerantProperties(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::getConfigSubtree().

Referenced by createBHECoaxial().

34 {
35  // if the BHE is using python boundary condition
36  auto const bhe_if_use_python_bc_conf =
38  config.getConfigParameter<bool>("use_bhe_pipe_network", false);
39  DBUG("If using python boundary condition : %s",
40  (bhe_if_use_python_bc_conf) ? "true" : "false");
41 
42  auto const borehole_geometry =
44  createBoreholeGeometry(config.getConfigSubtree("borehole"));
45 
47  auto const& pipes_config = config.getConfigSubtree("pipes");
49  Pipe const outer_pipe = createPipe(pipes_config.getConfigSubtree("outer"));
50  Pipe const inner_pipe =
52  createPipe(pipes_config.getConfigSubtree("inner"));
53  const auto pipe_longitudinal_dispersion_length =
55  pipes_config.getConfigParameter<double>(
56  "longitudinal_dispersion_length");
57  PipeConfigurationCoaxial const pipes{inner_pipe, outer_pipe,
58  pipe_longitudinal_dispersion_length};
59 
61  auto const grout = createGroutParameters(config.getConfigSubtree("grout"));
62 
63  auto const refrigerant =
65  createRefrigerantProperties(config.getConfigSubtree("refrigerant"));
66 
67  auto const flowAndTemperatureControl = createFlowAndTemperatureControl(
69  config.getConfigSubtree("flow_and_temperature_control"),
70  curves,
71  refrigerant);
72 
73  return {borehole_geometry, refrigerant, grout,
74  flowAndTemperatureControl, pipes, bhe_if_use_python_bc_conf};
75 }
RefrigerantProperties createRefrigerantProperties(BaseLib::ConfigTree const &config)
Pipe createPipe(BaseLib::ConfigTree const &config)
Definition: Pipe.cpp:20
BoreholeGeometry createBoreholeGeometry(BaseLib::ConfigTree const &config)
GroutParameters createGroutParameters(BaseLib::ConfigTree const &config)
FlowAndTemperatureControl createFlowAndTemperatureControl(BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves, RefrigerantProperties const &refrigerant)

◆ parseBHEUTypeConfig()

static std::tuple<BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfigurationUType, bool> ProcessLib::HeatTransportBHE::BHE::parseBHEUTypeConfig ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)
static
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__use_bhe_pipe_network
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__borehole
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__inlet
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__outlet
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__distance_between_pipes
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__pipes__longitudinal_dispersion_length
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__refrigerant
Input File Parameter:
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control

Definition at line 29 of file CreateBHEUType.cpp.

References createBoreholeGeometry(), createFlowAndTemperatureControl(), createGroutParameters(), createPipe(), createRefrigerantProperties(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::getConfigSubtree().

Referenced by createBHEUType().

34 {
35  // if the BHE is using python boundary condition
36  auto const bhe_if_use_python_bc_conf =
38  config.getConfigParameter<bool>("use_bhe_pipe_network", false);
39  DBUG("If using python boundary condition : %s",
40  (bhe_if_use_python_bc_conf) ? "true" : "false");
41 
42  auto const borehole_geometry =
44  createBoreholeGeometry(config.getConfigSubtree("borehole"));
45 
47  auto const& pipes_config = config.getConfigSubtree("pipes");
49  Pipe const inlet_pipe = createPipe(pipes_config.getConfigSubtree("inlet"));
50  Pipe const outlet_pipe =
52  createPipe(pipes_config.getConfigSubtree("outlet"));
53  const auto pipe_distance =
55  pipes_config.getConfigParameter<double>("distance_between_pipes");
56  const auto pipe_longitudinal_dispersion_length =
58  pipes_config.getConfigParameter<double>(
59  "longitudinal_dispersion_length");
60  PipeConfigurationUType const pipes{inlet_pipe, outlet_pipe, pipe_distance,
61  pipe_longitudinal_dispersion_length};
62 
64  auto const grout = createGroutParameters(config.getConfigSubtree("grout"));
65 
66  auto const refrigerant =
68  createRefrigerantProperties(config.getConfigSubtree("refrigerant"));
69 
70  auto const flowAndTemperatureControl = createFlowAndTemperatureControl(
72  config.getConfigSubtree("flow_and_temperature_control"),
73  curves,
74  refrigerant);
75 
76  return {borehole_geometry, refrigerant, grout,
77  flowAndTemperatureControl, pipes, bhe_if_use_python_bc_conf};
78 }
RefrigerantProperties createRefrigerantProperties(BaseLib::ConfigTree const &config)
Pipe createPipe(BaseLib::ConfigTree const &config)
Definition: Pipe.cpp:20
BoreholeGeometry createBoreholeGeometry(BaseLib::ConfigTree const &config)
GroutParameters createGroutParameters(BaseLib::ConfigTree const &config)
FlowAndTemperatureControl createFlowAndTemperatureControl(BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves, RefrigerantProperties const &refrigerant)

◆ prandtlNumber()

double ProcessLib::HeatTransportBHE::BHE::prandtlNumber ( double const &  viscosity,
double const &  heat_capacity,
double const &  heat_conductivity 
)
inline

◆ reynoldsNumber()

double ProcessLib::HeatTransportBHE::BHE::reynoldsNumber ( double const  velocity_norm,
double const  pipe_diameter,
double const  viscosity,
double const  density 
)
inline

◆ thermalResistancesGroutSoil()

std::pair<double, double> ProcessLib::HeatTransportBHE::BHE::thermalResistancesGroutSoil ( double  chi,
double const  R_ar,
double const  R_g 
)

Thermal resistances due to grout-soil exchange.

Check if constraints regarding negative thermal resistances are violated apply correction procedure. Section (1.5.5) in FEFLOW White Papers Vol V.

Definition at line 106 of file BHE_1U.cpp.

References compute_R_gg(), and compute_R_gs().

Referenced by ProcessLib::HeatTransportBHE::BHE::BHE_1U::calcThermalResistances().

109 {
110  double R_gs = compute_R_gs(chi, R_g);
111  double R_gg =
112  compute_R_gg(chi, R_gs, R_ar, R_g); // Resulting thermal resistances.
113 
114  auto constraint = [&]() {
115  return 1.0 / ((1.0 / R_gg) + (1.0 / (2.0 * R_gs)));
116  };
117 
118  std::array<double, 3> const multiplier{chi * 0.66, chi * 0.5 * 0.66, 0.0};
119  for (double m_chi : multiplier)
120  {
121  if (constraint() >= 0)
122  {
123  break;
124  }
125  DBUG(
126  "Warning! Correction procedure was applied due to negative thermal "
127  "resistance! Chi = %f.\n",
128  m_chi);
129 
130  R_gs = compute_R_gs(m_chi, R_g);
131  R_gg = compute_R_gg(m_chi, R_gs, R_ar, R_g);
132  }
133 
134  return {R_gg, R_gs};
135 }
double compute_R_gs(double const chi, double const R_g)
Definition: BHE_1U.cpp:81
double compute_R_gg(double const chi, double const R_gs, double const R_ar, double const R_g)
Definition: BHE_1U.cpp:86

◆ thermalResistancesGroutSoil2U()

std::vector<double> ProcessLib::HeatTransportBHE::BHE::thermalResistancesGroutSoil2U ( double  chi,
double const  R_ar_1,
double const  R_ar_2,
double const  R_g 
)

Thermal resistances due to grout-soil exchange.

Check if constraints regarding negative thermal resistances are violated apply correction procedure. Section (1.5.5) in FEFLOW White Papers Vol V.

Definition at line 124 of file BHE_2U.cpp.

References compute_R_gg_2U(), and compute_R_gs_2U().

Referenced by ProcessLib::HeatTransportBHE::BHE::BHE_2U::calcThermalResistances().

128 {
129  double R_gs = compute_R_gs_2U(chi, R_g);
130  double R_gg_1 = compute_R_gg_2U(chi, R_gs, R_ar_1, R_g);
131  double R_gg_2 = compute_R_gg_2U(chi, R_gs, R_ar_2,
132  R_g); // Resulting thermal resistances.
133 
134  auto constraint = [&]() {
135  return 1.0 / ((1.0 / R_gg_1) + (1.0 / (2.0 * R_gs)));
136  };
137 
138  std::array<double, 3> const multiplier{chi * 0.66, chi * 0.5 * 0.66, 0.0};
139  for (double m_chi : multiplier)
140  {
141  if (constraint() >= 0)
142  {
143  break;
144  }
145  DBUG(
146  "Warning! Correction procedure was applied due to negative thermal "
147  "resistance! Chi = %f.\n",
148  m_chi);
149  R_gs = compute_R_gs_2U(m_chi, R_g);
150  R_gg_1 = compute_R_gg_2U(m_chi, R_gs, R_ar_1, R_g);
151  R_gg_2 = compute_R_gg_2U(m_chi, R_gs, R_ar_2, R_g);
152  }
153 
154  return {R_gg_1, R_gg_2, R_gs};
155 }
double compute_R_gs_2U(double const chi, double const R_g)
Definition: BHE_2U.cpp:99
double compute_R_gg_2U(double const chi, double const R_gs, double const R_ar, double const R_g)
Definition: BHE_2U.cpp:104