OGS
ProcessLib::HeatTransportBHE::BHE Namespace Reference

Classes

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

Typedefs

using BHETypes = std::variant<BHE_1U, BHE_CXA, BHE_CXC, BHE_2U, BHE_1P>
 
using FlowAndTemperatureControl
 

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::array< double, 3 > thermalResistancesGroutSoil (double const 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::array< double, 4 > thermalResistancesGroutSoil2U (double const 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, PipeConfiguration1PType, bool > parseBHE1PTypeConfig (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
 
template<typename T_BHE >
T_BHE createBHE1PType (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
 
template BHE_1P createBHE1PType< BHE_1P > (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
 
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 26 of file BHETypes.h.

◆ FlowAndTemperatureControl

Initial value:
std::variant<TemperatureCurveConstantFlow,
TemperatureCurveFlowCurve,
FixedPowerConstantFlow,
FixedPowerFlowCurve,
PowerCurveConstantFlow,
PowerCurveFlowCurve,
BuildingPowerCurveConstantFlow>

Definition at line 146 of file FlowAndTemperatureControl.h.

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 44 of file ThermalResistancesCoaxial.h.

48{
49 double const hydraulic_diameter =
50 coaxialPipesAnnulusDiameter(inner_pipe, outer_pipe);
51
52 auto advective_thermal_resistance = [&](double Nu, double diameter_ratio)
53 {
54 return 1.0 / (Nu * fluid.thermal_conductivity * std::numbers::pi) *
55 diameter_ratio;
56 };
57 return {advective_thermal_resistance(Nu_inner_pipe, 1.),
58 advective_thermal_resistance(
59 Nu_annulus, hydraulic_diameter / inner_pipe.outsideDiameter()),
60 advective_thermal_resistance(
61 Nu_annulus, hydraulic_diameter / outer_pipe.diameter)};
62}
double coaxialPipesAnnulusDiameter(Pipe const &inner_pipe, Pipe const &outer_pipe)
Definition Pipe.h:55

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().

◆ calculateGroutAndGroutSoilExchangeThermalResistance()

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

Definition at line 72 of file ThermalResistancesCoaxial.h.

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

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

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

◆ calculatePipeWallThermalResistance()

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

Definition at line 64 of file ThermalResistancesCoaxial.h.

66{
67 return {inner_pipe.wallThermalResistance(),
68 outer_pipe.wallThermalResistance()};
69}

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

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

◆ 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.

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 reynoldsNumber(double const velocity_norm, double const pipe_diameter, double const viscosity, double const density)
Definition Physics.h:26
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

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

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

◆ 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.

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 nusseltNumber(double const reynolds_number, double const prandtl_number, double const pipe_diameter, double const pipe_length)
Definition Physics.h:34

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

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

◆ coaxialPipesAnnulusDiameter()

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

Definition at line 55 of file Pipe.h.

57{
58 return outer_pipe.diameter - inner_pipe.diameter -
59 2 * inner_pipe.wall_thickness;
60}

References ProcessLib::HeatTransportBHE::BHE::Pipe::diameter, and ProcessLib::HeatTransportBHE::BHE::Pipe::wall_thickness.

Referenced by calculateAdvectiveThermalResistance().

◆ 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 108 of file BHE_1U.cpp.

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

References OGS_FATAL.

Referenced by thermalResistancesGroutSoil().

◆ 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 126 of file BHE_2U.cpp.

128{
129 double const R_gg = 2.0 * R_gs * (R_ar - 2.0 * chi * R_g) /
130 (2.0 * R_gs - R_ar + 2.0 * chi * R_g);
131 if (!std::isfinite(R_gg))
132 {
133 OGS_FATAL(
134 "Error!!! Grout Thermal Resistance is an infinite number! The "
135 "simulation will be stopped!");
136 }
137
138 return R_gg;
139}

References OGS_FATAL.

Referenced by thermalResistancesGroutSoil2U().

◆ compute_R_gs()

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

Definition at line 103 of file BHE_1U.cpp.

104{
105 return (1 - chi) * R_g;
106}

Referenced by thermalResistancesGroutSoil().

◆ compute_R_gs_2U()

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

Definition at line 121 of file BHE_2U.cpp.

122{
123 return (1 - chi) * R_g;
124}

Referenced by thermalResistancesGroutSoil2U().

◆ createBHE1PType()

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

Definition at line 78 of file CreateBHE1PType.cpp.

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

References parseBHE1PTypeConfig().

◆ createBHE1PType< BHE_1P >()

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

◆ 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.

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)

References parseBHECoaxialConfig().

◆ 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 )

◆ 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 )

◆ 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 82 of file CreateBHEUType.cpp.

87{
88 auto UType = parseBHEUTypeConfig(config, curves);
89 return {std::get<0>(UType), std::get<1>(UType), std::get<2>(UType),
90 std::get<3>(UType), std::get<4>(UType), std::get<5>(UType)};
91}
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)

References parseBHEUTypeConfig().

◆ 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 )

◆ 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 )

◆ 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 21 of file BoreholeGeometry.cpp.

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

References BaseLib::ConfigTree::getConfigParameter().

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

◆ 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__TemperatureCurveFlowCurve__flow_rate_curve
Input File Parameter
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__TemperatureCurveFlowCurve__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
Input File Parameter
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__PowerCurveFlowCurve__power_curve
Input File Parameter
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__PowerCurveFlowCurve__flow_rate_curve
Input File Parameter
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__BuildingPowerCurveConstantFlow__power_curve
Input File Parameter
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__BuildingPowerCurveConstantFlow__cop_heating_curve
Input File Parameter
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__BuildingPowerCurveConstantFlow__flow_rate

Definition at line 25 of file CreateFlowAndTemperatureControl.cpp.

31{
33 auto const type = config.getConfigParameter<std::string>("type");
34 if (type == "TemperatureCurveConstantFlow")
35 {
37 auto const flow_rate = config.getConfigParameter<double>("flow_rate");
38
39 auto const& temperature_curve = *BaseLib::getOrError(
40 curves,
42 config.getConfigParameter<std::string>("temperature_curve"),
43 "Required temperature curve not found.");
44
45 return TemperatureCurveConstantFlow{flow_rate, temperature_curve};
46 }
47 if (type == "TemperatureCurveFlowCurve")
48 {
49 auto const& flow_rate_curve = *BaseLib::getOrError(
50 curves,
52 config.getConfigParameter<std::string>("flow_rate_curve"),
53 "Required flow curve not found.");
54
55 auto const& temperature_curve = *BaseLib::getOrError(
56 curves,
58 config.getConfigParameter<std::string>("temperature_curve"),
59 "Required temperature curve not found.");
60
61 return TemperatureCurveFlowCurve{flow_rate_curve, temperature_curve};
62 }
63 if (type == "FixedPowerConstantFlow")
64 {
66 auto const power = config.getConfigParameter<double>("power");
67
69 auto const flow_rate = config.getConfigParameter<double>("flow_rate");
70
71 return FixedPowerConstantFlow{flow_rate, power,
72 refrigerant.specific_heat_capacity,
73 refrigerant.density};
74 }
75
76 if (type == "FixedPowerFlowCurve")
77 {
78 auto const& flow_rate_curve = *BaseLib::getOrError(
79 curves,
81 config.getConfigParameter<std::string>("flow_rate_curve"),
82 "Required flow rate curve not found.");
83
85 auto const power = config.getConfigParameter<double>("power");
86
87 return FixedPowerFlowCurve{flow_rate_curve, power,
88 refrigerant.specific_heat_capacity,
89 refrigerant.density};
90 }
91
92 if (type == "PowerCurveConstantFlow")
93 {
94 auto const& power_curve = *BaseLib::getOrError(
95 curves,
97 config.getConfigParameter<std::string>("power_curve"),
98 "Required power curve not found.");
99
101 auto const flow_rate = config.getConfigParameter<double>("flow_rate");
102
103 return PowerCurveConstantFlow{power_curve, flow_rate,
104 refrigerant.specific_heat_capacity,
105 refrigerant.density};
106 }
107
108 if (type == "PowerCurveFlowCurve")
109 {
110 auto const& power_curve = *BaseLib::getOrError(
111 curves,
113 config.getConfigParameter<std::string>("power_curve"),
114 "Required power curve not found.");
115
116 auto const& flow_rate_curve = *BaseLib::getOrError(
117 curves,
119 config.getConfigParameter<std::string>("flow_rate_curve"),
120 "Required flow rate curve not found.");
121
122 return PowerCurveFlowCurve{power_curve, flow_rate_curve,
123 refrigerant.specific_heat_capacity,
124 refrigerant.density};
125 }
126
127 if (type == "BuildingPowerCurveConstantFlow")
128 {
129 auto const& power_curve = *BaseLib::getOrError(
130 curves,
132 config.getConfigParameter<std::string>("power_curve"),
133 "Required power curve not found.");
134
135 auto const& cop_heating_curve = *BaseLib::getOrError(
136 curves,
138 config.getConfigParameter<std::string>("cop_heating_curve"),
139 "Required power curve not found.");
140
141 BuildingPowerCurves const building_power_curves{power_curve,
142 cop_heating_curve};
143
145 auto const flow_rate = config.getConfigParameter<double>("flow_rate");
146
147 return BuildingPowerCurveConstantFlow{
148 building_power_curves, flow_rate,
149 refrigerant.specific_heat_capacity, refrigerant.density};
150 }
151 OGS_FATAL("FlowAndTemperatureControl type '{:s}' is not implemented.",
152 type);
153}
OGS_NO_DANGLING Map::mapped_type & getOrError(Map &map, Key const &key, std::string const &error_message)
Definition Algorithm.h:118

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

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

◆ 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__specific_heat_capacity
Input File Parameter
prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__grout__thermal_conductivity

Definition at line 21 of file GroutParameters.cpp.

22{
23 const auto grout_density =
25 config.getConfigParameter<double>("density");
26 const auto grout_porosity =
28 config.getConfigParameter<double>("porosity");
29 const auto grout_heat_capacity =
31 config.getConfigParameter<double>("specific_heat_capacity");
32 const auto grout_thermal_conductivity =
34 config.getConfigParameter<double>("thermal_conductivity");
35 return {grout_density, grout_porosity, grout_heat_capacity,
36 grout_thermal_conductivity};
37}

References BaseLib::ConfigTree::getConfigParameter().

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

◆ 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 21 of file Pipe.cpp.

22{
24 const auto diameter = config.getConfigParameter<double>("diameter");
25 const auto wall_thickness =
27 config.getConfigParameter<double>("wall_thickness");
28 const auto wall_thermal_conductivity =
30 config.getConfigParameter<double>("wall_thermal_conductivity");
31 return {diameter, wall_thickness, wall_thermal_conductivity};
32}

References BaseLib::ConfigTree::getConfigParameter().

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

◆ 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 21 of file RefrigerantProperties.cpp.

23{
24 auto const refrigerant_density =
26 config.getConfigParameter<double>("density");
27 auto const refrigerant_viscosity =
29 config.getConfigParameter<double>("viscosity");
30 auto const refrigerant_heat_capacity =
32 config.getConfigParameter<double>("specific_heat_capacity");
33 auto const refrigerant_thermal_conductivity =
35 config.getConfigParameter<double>("thermal_conductivity");
36 auto const refrigerant_reference_temperature =
38 config.getConfigParameter<double>("reference_temperature");
39 return {refrigerant_viscosity, refrigerant_density,
40 refrigerant_thermal_conductivity, refrigerant_heat_capacity,
41 refrigerant_reference_temperature};
42}

References BaseLib::ConfigTree::getConfigParameter().

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

◆ 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.

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}

Referenced by calculateThermoMechanicalFlowPropertiesPipe().

◆ 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.

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}

Referenced by calculateThermoMechanicalFlowPropertiesAnnulus().

◆ parseBHE1PTypeConfig()

static std::tuple< BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfiguration1PType, bool > ProcessLib::HeatTransportBHE::BHE::parseBHE1PTypeConfig ( 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__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 28 of file CreateBHE1PType.cpp.

33{
34 // if the BHE is using python boundary condition
35 auto const bhe_if_use_python_bc_conf =
37 config.getConfigParameter<bool>("use_bhe_pipe_network", false);
38
39 if (bhe_if_use_python_bc_conf)
40 {
41 DBUG("BHE 1P using python boundary conditions.");
42 }
43
44 auto const borehole_geometry =
46 createBoreholeGeometry(config.getConfigSubtree("borehole"));
47
49 auto const& pipes_config = config.getConfigSubtree("pipes");
51 Pipe const inlet_pipe = createPipe(pipes_config.getConfigSubtree("inlet"));
52
53 const auto pipe_longitudinal_dispersion_length =
55 pipes_config.getConfigParameter<double>(
56 "longitudinal_dispersion_length");
57 PipeConfiguration1PType const pipes{inlet_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}
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30

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

Referenced by createBHE1PType().

◆ 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.

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}
Pipe createPipe(BaseLib::ConfigTree const &config)
Definition Pipe.cpp:21
BoreholeGeometry createBoreholeGeometry(BaseLib::ConfigTree const &config)

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

Referenced by createBHECoaxial().

◆ 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 30 of file CreateBHEUType.cpp.

35{
36 // if the BHE is using python boundary condition
37 auto const bhe_if_use_python_bc_conf =
39 config.getConfigParameter<bool>("use_bhe_pipe_network", false);
40 DBUG("If using python boundary condition : {:s}",
41 (bhe_if_use_python_bc_conf) ? "true" : "false");
42
43 auto const borehole_geometry =
45 createBoreholeGeometry(config.getConfigSubtree("borehole"));
46
48 auto const& pipes_config = config.getConfigSubtree("pipes");
50 Pipe const inlet_pipe = createPipe(pipes_config.getConfigSubtree("inlet"));
51 Pipe const outlet_pipe =
53 createPipe(pipes_config.getConfigSubtree("outlet"));
54 const auto pipe_distance =
56 pipes_config.getConfigParameter<double>("distance_between_pipes");
57 const auto pipe_longitudinal_dispersion_length =
59 pipes_config.getConfigParameter<double>(
60 "longitudinal_dispersion_length");
61 PipeConfigurationUType const pipes{inlet_pipe, outlet_pipe, pipe_distance,
62 pipe_longitudinal_dispersion_length};
63
65 auto const grout = createGroutParameters(config.getConfigSubtree("grout"));
66
67 auto const refrigerant =
69 createRefrigerantProperties(config.getConfigSubtree("refrigerant"));
70
71 auto const flowAndTemperatureControl = createFlowAndTemperatureControl(
73 config.getConfigSubtree("flow_and_temperature_control"),
74 curves,
75 refrigerant);
76
77 return {borehole_geometry, refrigerant, grout,
78 flowAndTemperatureControl, pipes, bhe_if_use_python_bc_conf};
79}

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

Referenced by createBHEUType().

◆ prandtlNumber()

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

Definition at line 19 of file Physics.h.

22{
23 return viscosity * heat_capacity / heat_conductivity;
24}

Referenced by calculateThermoMechanicalFlowPropertiesAnnulus(), and calculateThermoMechanicalFlowPropertiesPipe().

◆ reynoldsNumber()

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

Definition at line 26 of file Physics.h.

30{
31 return velocity_norm * pipe_diameter / (viscosity / density);
32}

Referenced by calculateThermoMechanicalFlowPropertiesAnnulus(), and calculateThermoMechanicalFlowPropertiesPipe().

◆ thermalResistancesGroutSoil()

std::array< double, 3 > ProcessLib::HeatTransportBHE::BHE::thermalResistancesGroutSoil ( double const 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 128 of file BHE_1U.cpp.

131{
132 double R_gs = compute_R_gs(chi, R_g);
133 double R_gg =
134 compute_R_gg(chi, R_gs, R_ar, R_g); // Resulting thermal resistances.
135 double new_chi = chi;
136
137 auto constraint = [&]()
138 { return 1.0 / ((1.0 / R_gg) + (1.0 / (2.0 * R_gs))); };
139
140 std::array<double, 3> const multiplier{chi * 2.0 / 3.0, chi * 1.0 / 3.0,
141 0.0};
142 for (double m_chi : multiplier)
143 {
144 if (constraint() >= 0)
145 {
146 break;
147 }
148 DBUG(
149 "Warning! Correction procedure was applied due to negative thermal "
150 "resistance! Chi = {:f}.\n",
151 m_chi);
152
153 R_gs = compute_R_gs(m_chi, R_g);
154 R_gg = compute_R_gg(m_chi, R_gs, R_ar, R_g);
155 new_chi = m_chi;
156 }
157
158 return {new_chi, R_gg, R_gs};
159}
double compute_R_gg(double const chi, double const R_gs, double const R_ar, double const R_g)
Definition BHE_1U.cpp:108
double compute_R_gs(double const chi, double const R_g)
Definition BHE_1U.cpp:103

References compute_R_gg(), compute_R_gs(), and DBUG().

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

◆ thermalResistancesGroutSoil2U()

std::array< double, 4 > ProcessLib::HeatTransportBHE::BHE::thermalResistancesGroutSoil2U ( double const 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 146 of file BHE_2U.cpp.

150{
151 double R_gs = compute_R_gs_2U(chi, R_g);
152 double R_gg_1 = compute_R_gg_2U(chi, R_gs, R_ar_1, R_g);
153 double R_gg_2 = compute_R_gg_2U(chi, R_gs, R_ar_2,
154 R_g); // Resulting thermal resistances.
155 double chi_new = chi;
156
157 auto constraint = [&]()
158 { return 1.0 / ((1.0 / R_gg_1) + (1.0 / (2.0 * R_gs))); };
159
160 std::array<double, 3> const multiplier{chi * 2.0 / 3.0, chi * 1.0 / 3.0,
161 0.0};
162 for (double m_chi : multiplier)
163 {
164 if (constraint() >= 0)
165 {
166 break;
167 }
168 DBUG(
169 "Warning! Correction procedure was applied due to negative thermal "
170 "resistance! Chi = {:f}.\n",
171 m_chi);
172 R_gs = compute_R_gs_2U(m_chi, R_g);
173 R_gg_1 = compute_R_gg_2U(m_chi, R_gs, R_ar_1, R_g);
174 R_gg_2 = compute_R_gg_2U(m_chi, R_gs, R_ar_2, R_g);
175 chi_new = m_chi;
176 }
177
178 return {chi_new, R_gg_1, R_gg_2, R_gs};
179}
double compute_R_gg_2U(double const chi, double const R_gs, double const R_ar, double const R_g)
Definition BHE_2U.cpp:126
double compute_R_gs_2U(double const chi, double const R_g)
Definition BHE_2U.cpp:121

References compute_R_gg_2U(), compute_R_gs_2U(), and DBUG().

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