OGS 6.2.0-244-g47b8a9a9d
ProcessLib::HeatTransportBHE::BHE Namespace Reference

Classes

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

Typedefs

using BHETypes = boost::variant< BHE_1U, BHE_CXA, BHE_CXC >
 
using FlowAndTemperatureControl = boost::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)
 
BoreholeGeometry createBoreholeGeometry (BaseLib::ConfigTree const &config)
 
BHE::BHE_1U createBHE1U (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
static std::tuple< BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfigurationCoaxialparseBHECoaxialConfig (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)
 
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 43 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().

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

◆ calculateGroutAndGroutSoilExchangeThermalResistance()

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

Definition at line 70 of file ThermalResistancesCoaxial.h.

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

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

73 {
74  constexpr double pi = boost::math::constants::pi<double>();
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  (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 }

◆ calculatePipeWallThermalResistance()

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

Definition at line 62 of file ThermalResistancesCoaxial.h.

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

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

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

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

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

◆ calculateThermoMechanicalFlowPropertiesPipe()

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

Definition at line 31 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(), and ProcessLib::HeatTransportBHE::BHE::BHE_1U::updateHeatTransferCoefficients().

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

◆ coaxialPipesAnnulusDiameter()

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

Definition at line 58 of file Pipe.h.

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

Referenced by calculateAdvectiveThermalResistance().

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

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

References OGS_FATAL.

Referenced by thermalResistancesGroutSoil().

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

◆ compute_R_gs()

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

Definition at line 100 of file BHE_1U.cpp.

Referenced by thermalResistancesGroutSoil().

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

◆ createBHE1U()

BHE::BHE_1U ProcessLib::HeatTransportBHE::BHE::createBHE1U ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)
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 21 of file CreateBHE1U.cpp.

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

Referenced by ProcessLib::HeatTransportBHE::createHeatTransportBHEProcess().

26 {
27  auto const borehole_geometry =
29  createBoreholeGeometry(config.getConfigSubtree("borehole"));
30 
32  auto const& pipes_config = config.getConfigSubtree("pipes");
34  Pipe const inlet_pipe = createPipe(pipes_config.getConfigSubtree("inlet"));
35  Pipe const outlet_pipe =
37  createPipe(pipes_config.getConfigSubtree("outlet"));
38  const auto pipe_distance =
40  pipes_config.getConfigParameter<double>("distance_between_pipes");
41  const auto pipe_longitudinal_dispersion_length =
43  pipes_config.getConfigParameter<double>(
44  "longitudinal_dispersion_length");
45  PipeConfiguration1U const pipes{inlet_pipe, outlet_pipe, pipe_distance,
46  pipe_longitudinal_dispersion_length};
47 
49  auto const grout = createGroutParameters(config.getConfigSubtree("grout"));
50 
51  auto const refrigerant =
53  createRefrigerantProperties(config.getConfigSubtree("refrigerant"));
54 
55  auto const flowAndTemperatureControl = createFlowAndTemperatureControl(
57  config.getConfigSubtree("flow_and_temperature_control"),
58  curves,
59  refrigerant);
60 
61  return {borehole_geometry, refrigerant, grout, flowAndTemperatureControl,
62  pipes};
63 }
RefrigerantProperties createRefrigerantProperties(BaseLib::ConfigTree const &config)
Pipe createPipe(BaseLib::ConfigTree const &config)
Definition: Pipe.cpp:21
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)

◆ 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 71 of file CreateBHECoaxial.cpp.

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

76 {
77  auto coaxial = parseBHECoaxialConfig(config, curves);
78  return {std::get<0>(coaxial), std::get<1>(coaxial), std::get<2>(coaxial),
79  std::get<3>(coaxial), std::get<4>(coaxial)};
80 }
static std::tuple< BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfigurationCoaxial > 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().

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

References BaseLib::ConfigTree::getConfigParameter().

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

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 }

◆ 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 25 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 createBHE1U(), and parseBHECoaxialConfig().

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 == "FixedPowerConstantFlow")
48  {
50  auto const power = config.getConfigParameter<double>("power");
51 
53  auto const flow_rate = config.getConfigParameter<double>("flow_rate");
54  return FixedPowerConstantFlow{flow_rate, power,
55  refrigerant.specific_heat_capacity,
56  refrigerant.density};
57  }
58 
59  if (type == "FixedPowerFlowCurve")
60  {
61  auto const& flow_rate_curve = *BaseLib::getOrError(
62  curves,
64  config.getConfigParameter<std::string>("flow_rate_curve"),
65  "Required flow rate curve not found.");
66 
68  auto const power = config.getConfigParameter<double>("power");
69 
70  return FixedPowerFlowCurve{flow_rate_curve, power,
71  refrigerant.specific_heat_capacity,
72  refrigerant.density};
73  }
74 
75  if (type == "PowerCurveConstantFlow")
76  {
77  auto const& power_curve = *BaseLib::getOrError(
78  curves,
80  config.getConfigParameter<std::string>("power_curve"),
81  "Required power curve not found.");
82 
84  auto const flow_rate = config.getConfigParameter<double>("flow_rate");
85 
86  return PowerCurveConstantFlow{power_curve, flow_rate,
87  refrigerant.specific_heat_capacity,
88  refrigerant.density};
89  }
90  OGS_FATAL("FlowAndTemperatureControl type '%s' is not implemented.",
91  type.c_str());
92 }
Map::mapped_type & getOrError(Map &map, Key const &key, std::string const &error_message)
Definition: Algorithm.h:147
#define OGS_FATAL(fmt,...)
Definition: Error.h:63

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

References BaseLib::ConfigTree::getConfigParameter().

Referenced by createBHE1U(), and parseBHECoaxialConfig().

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>("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 }

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

References BaseLib::ConfigTree::getConfigParameter().

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

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 }

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

References BaseLib::ConfigTree::getConfigParameter().

Referenced by createBHE1U(), and parseBHECoaxialConfig().

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 }

◆ 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 35 of file Physics.h.

Referenced by calculateThermoMechanicalFlowPropertiesPipe().

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

◆ 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 64 of file Physics.h.

Referenced by calculateThermoMechanicalFlowPropertiesAnnulus().

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

◆ parseBHECoaxialConfig()

static std::tuple<BoreholeGeometry, RefrigerantProperties, GroutParameters, FlowAndTemperatureControl, PipeConfigurationCoaxial> 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__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(), and BaseLib::ConfigTree::getConfigSubtree().

Referenced by createBHECoaxial().

34 {
35  auto const borehole_geometry =
37  createBoreholeGeometry(config.getConfigSubtree("borehole"));
38 
40  auto const& pipes_config = config.getConfigSubtree("pipes");
42  Pipe const outer_pipe = createPipe(pipes_config.getConfigSubtree("outer"));
43  Pipe const inner_pipe =
45  createPipe(pipes_config.getConfigSubtree("inner"));
46  const auto pipe_longitudinal_dispersion_length =
48  pipes_config.getConfigParameter<double>(
49  "longitudinal_dispersion_length");
50  PipeConfigurationCoaxial const pipes{inner_pipe, outer_pipe,
51  pipe_longitudinal_dispersion_length};
52 
54  auto const grout = createGroutParameters(config.getConfigSubtree("grout"));
55 
56  auto const refrigerant =
58  createRefrigerantProperties(config.getConfigSubtree("refrigerant"));
59 
60  auto const flowAndTemperatureControl = createFlowAndTemperatureControl(
62  config.getConfigSubtree("flow_and_temperature_control"),
63  curves,
64  refrigerant);
65 
66  return {borehole_geometry, refrigerant, grout, flowAndTemperatureControl,
67  pipes};
68 }
RefrigerantProperties createRefrigerantProperties(BaseLib::ConfigTree const &config)
Pipe createPipe(BaseLib::ConfigTree const &config)
Definition: Pipe.cpp:21
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 125 of file BHE_1U.cpp.

References compute_R_gg(), compute_R_gs(), and ProcessLib::HeatTransportBHE::BHE::BHE_1U::inflow_outflow_bc_component_ids.

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

128 {
129  double R_gs = compute_R_gs(chi, R_g);
130  double R_gg =
131  compute_R_gg(chi, R_gs, R_ar, R_g); // Resulting thermal resistances.
132 
133  auto constraint = [&]() {
134  return 1.0 / ((1.0 / R_gg) + (1.0 / (2.0 * R_gs)));
135  };
136 
137  int count = 0;
138  while (constraint() < 0.0)
139  {
140  if (count == 0)
141  {
142  chi *= 0.66;
143  R_gs = compute_R_gs(chi, R_g);
144  R_gg = compute_R_gg(chi, R_gs, R_ar, R_g);
145  }
146  if (count == 1)
147  {
148  chi *= 0.5;
149  R_gs = compute_R_gs(chi, R_g);
150  R_gg = compute_R_gg(chi, R_gs, R_ar, R_g);
151  }
152  if (count == 2)
153  {
154  chi = 0.0;
155  R_gs = compute_R_gs(chi, R_g);
156  R_gg = compute_R_gg(chi, R_gs, R_ar, R_g);
157  break;
158  }
159  DBUG(
160  "Warning! Correction procedure was applied due to negative thermal "
161  "resistance! Correction step #%d.\n",
162  count);
163  count++;
164  }
165  return {R_gg, R_gs};
166 }
double compute_R_gs(double const chi, double const R_g)
Definition: BHE_1U.cpp:100
double compute_R_gg(double const chi, double const R_gs, double const R_ar, double const R_g)
Definition: BHE_1U.cpp:105