OGS
ProcessLib::HeatTransportBHE::BHE::BHE_2U Class Referencefinal

Detailed Description

The BHE_2U class is the realization of 2U type of Borehole Heat Exchanger. In this class, the pipe heat capacity, pipe heat conduction, pipe advection vectors are initialized according to the geometry of 2U type of BHE. For 2U type of BHE, 8 primary unknowns are assigned on the 1D BHE elements. They are the temperature in inflow pipe T_i1 and T_i2, temperature in outflow pipe T_o1 and T_o2, temperature of the four grout zones surrounding the inflow and outflow pipe T_g1, T_g2, T_g3 and T_g4. These primary variables are solved according to heat convection and conduction equations on the pipes and also in the grout zones. The interaction of the 2U type of BHE and the surrounding soil is regulated through the thermal resistance values, which are calculated specifically during the initialization of the class.

Definition at line 34 of file BHE_2U.h.

#include <BHE_2U.h>

Inheritance diagram for ProcessLib::HeatTransportBHE::BHE::BHE_2U:
[legend]
Collaboration diagram for ProcessLib::HeatTransportBHE::BHE::BHE_2U:
[legend]

Public Member Functions

 BHE_2U (BoreholeGeometry const &borehole, RefrigerantProperties const &refrigerant, GroutParameters const &grout, FlowAndTemperatureControl const &flowAndTemperatureControl, PipeConfigurationUType const &pipes, bool const use_python_bcs)
BHE_2U withGeometry (BoreholeGeometry const &g) const
std::array< double, number_of_unknownspipeHeatCapacities () const
std::array< double, number_of_unknownspipeHeatConductions (int const section_index=0) const
std::array< Eigen::Vector3d, number_of_unknownspipeAdvectionVectors (Eigen::Vector3d const &, int const section_index=0) const
double updateFlowRateAndTemperature (double T_out, double current_time)
 Return the inflow temperature for the boundary condition.
std::array< double, number_of_unknownscrossSectionAreas (int const section_index=0) const
void updateHeatTransferCoefficients (double const flow_rate)
Public Member Functions inherited from ProcessLib::HeatTransportBHE::BHE::BHECommonUType
 BHECommonUType (BoreholeGeometry const &borehole, RefrigerantProperties const &refrigerant, GroutParameters const &grout, FlowAndTemperatureControl const &flowAndTemperatureControl, PipeConfigurationUType const &pipes, bool const use_python_bcs)
Public Member Functions inherited from ProcessLib::HeatTransportBHE::BHE::BHECommon
 BHECommon (BoreholeGeometry const &borehole_geometry_, RefrigerantProperties const &refrigerant_, GroutParameters const &grout_, FlowAndTemperatureControl const &flowAndTemperatureControl_, bool const use_python_bcs_)
constexpr bool isPowerBC () const
int getNumberOfSections () const
 Get number of sections in the borehole geometry.
std::vector< double > const & getSectionBoundaries () const
 Get section boundaries (cumulative distance from wellhead).
double thermalResistanceAtSection (int const unknown_index, int const section_index) const
 Get thermal resistance for a specific section and unknown.

Static Public Member Functions

template<int NPoints, typename SingleUnknownMatrixType, typename RMatrixType, typename RPiSMatrixType, typename RSMatrixType>
static void assembleRMatrices (int const idx_bhe_unknowns, Eigen::MatrixBase< SingleUnknownMatrixType > const &matBHE_loc_R, Eigen::MatrixBase< RMatrixType > &R_matrix, Eigen::MatrixBase< RPiSMatrixType > &R_pi_s_matrix, Eigen::MatrixBase< RSMatrixType > &R_s_matrix)
static std::array< std::pair< std::size_t, int >, 2 > getBHEInflowDirichletBCNodesAndComponents (std::size_t const top_node_id, std::size_t const, int const in_component_id)
static std::optional< std::array< std::pair< std::size_t, int >, 2 > > getBHEBottomDirichletBCNodesAndComponents (std::size_t const bottom_node_id, int const in_component_id, int const out_component_id)

Static Public Attributes

static constexpr int number_of_unknowns = 8
static constexpr int number_of_grout_zones = 4
static constexpr std::pair< int, int > inflow_outflow_bc_component_ids []

Private Member Functions

std::vector< double > calcThermalResistances (double const Nu, int const section_index=0) const

Additional Inherited Members

Public Attributes inherited from ProcessLib::HeatTransportBHE::BHE::BHECommon
BoreholeGeometry const borehole_geometry
RefrigerantProperties const refrigerant
GroutParameters const grout
FlowAndTemperatureControl const flowAndTemperatureControl
bool const use_python_bcs
Protected Member Functions inherited from ProcessLib::HeatTransportBHE::BHE::BHECommon
template<typename Fn>
void recomputeSectionalResistances (Fn &&calcForSection)
 Recompute _sectional_thermal_resistances for all sections.
double getClampedFlowVelocity (int const section_index) const
 Get velocity for a section, clamping to last section if index exceeds the number of velocity entries. Returns 0 when empty.
std::vector< double > const & getThermalResistancesAtSection (int const section_index) const
 Get the thermal resistance vector for a given section.
Protected Attributes inherited from ProcessLib::HeatTransportBHE::BHE::BHECommonUType
PipeConfigurationUType const _pipes
Protected Attributes inherited from ProcessLib::HeatTransportBHE::BHE::BHECommon
std::vector< double > _flow_velocities
std::vector< std::vector< double > > _sectional_thermal_resistances

Constructor & Destructor Documentation

◆ BHE_2U()

ProcessLib::HeatTransportBHE::BHE::BHE_2U::BHE_2U ( BoreholeGeometry const & borehole,
RefrigerantProperties const & refrigerant,
GroutParameters const & grout,
FlowAndTemperatureControl const & flowAndTemperatureControl,
PipeConfigurationUType const & pipes,
bool const use_python_bcs )

Definition at line 18 of file BHE_2U.cpp.

25 pipes, use_python_bcs}
26{
27 // Initialize thermal resistances.
28 auto values = visit(
29 [&](auto const& control)
30 {
31 return control(refrigerant.reference_temperature,
32 0. /* initial time */);
33 },
35 updateHeatTransferCoefficients(values.flow_rate);
36}
BHECommonUType(BoreholeGeometry const &borehole, RefrigerantProperties const &refrigerant, GroutParameters const &grout, FlowAndTemperatureControl const &flowAndTemperatureControl, PipeConfigurationUType const &pipes, bool const use_python_bcs)
RefrigerantProperties const refrigerant
Definition BHECommon.h:72
FlowAndTemperatureControl const flowAndTemperatureControl
Definition BHECommon.h:74
void updateHeatTransferCoefficients(double const flow_rate)
Definition BHE_2U.cpp:147

References ProcessLib::HeatTransportBHE::BHE::BHECommonUType::BHECommonUType(), ProcessLib::HeatTransportBHE::BHE::BHECommon::flowAndTemperatureControl, ProcessLib::HeatTransportBHE::BHE::BHECommon::grout, ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant, updateHeatTransferCoefficients(), and ProcessLib::HeatTransportBHE::BHE::BHECommon::use_python_bcs.

Referenced by withGeometry().

Member Function Documentation

◆ assembleRMatrices()

template<int NPoints, typename SingleUnknownMatrixType, typename RMatrixType, typename RPiSMatrixType, typename RSMatrixType>
void ProcessLib::HeatTransportBHE::BHE::BHE_2U::assembleRMatrices ( int const idx_bhe_unknowns,
Eigen::MatrixBase< SingleUnknownMatrixType > const & matBHE_loc_R,
Eigen::MatrixBase< RMatrixType > & R_matrix,
Eigen::MatrixBase< RPiSMatrixType > & R_pi_s_matrix,
Eigen::MatrixBase< RSMatrixType > & R_s_matrix )
inlinestatic

Definition at line 69 of file BHE_2U.h.

75 {
76 switch (idx_bhe_unknowns)
77 {
78 case 0: // PHI_fig
79 R_matrix.block(0, 4 * NPoints, NPoints, NPoints) +=
80 -1.0 * matBHE_loc_R;
81 R_matrix.block(4 * NPoints, 0, NPoints, NPoints) +=
82 -1.0 * matBHE_loc_R; // R_i1
83
84 R_matrix.block(2, 5 * NPoints, NPoints, NPoints) +=
85 -1.0 * matBHE_loc_R;
86 R_matrix.block(5 * NPoints, 2, NPoints, NPoints) +=
87 -1.0 * matBHE_loc_R; // R_i2
88
89 R_matrix.block(0, 0, NPoints, NPoints) +=
90 1.0 * matBHE_loc_R; // K_i1
91 R_matrix.block(NPoints, NPoints, NPoints, NPoints) +=
92 1.0 * matBHE_loc_R; // K_i2
93 R_matrix.block(4 * NPoints, 4 * NPoints, NPoints, NPoints) +=
94 1.0 * matBHE_loc_R;
95 R_matrix.block(5 * NPoints, 5 * NPoints, NPoints, NPoints) +=
96 1.0 * matBHE_loc_R; // K_ig
97 return;
98 case 1: // PHI_fog
99 R_matrix.block(2 * NPoints, 6 * NPoints, NPoints, NPoints) +=
100 -1.0 * matBHE_loc_R;
101 R_matrix.block(6 * NPoints, 2 * NPoints, NPoints, NPoints) +=
102 -1.0 * matBHE_loc_R; // R_o1
103 R_matrix.block(3 * NPoints, 7 * NPoints, NPoints, NPoints) +=
104 -1.0 * matBHE_loc_R;
105 R_matrix.block(7 * NPoints, 3 * NPoints, NPoints, NPoints) +=
106 -1.0 * matBHE_loc_R; // R_o2
107
108 R_matrix.block(2 * NPoints, 2 * NPoints, NPoints, NPoints) +=
109 1.0 * matBHE_loc_R; // K_o1
110 R_matrix.block(3 * NPoints, 3 * NPoints, NPoints, NPoints) +=
111 1.0 * matBHE_loc_R; // K_o2
112 R_matrix.block(6 * NPoints, 6 * NPoints, NPoints, NPoints) +=
113 1.0 * matBHE_loc_R;
114 R_matrix.block(7 * NPoints, 7 * NPoints, NPoints, NPoints) +=
115 1.0 * matBHE_loc_R; // K_og
116 return;
117 case 2: // PHI_gg_1
118 R_matrix.block(4 * NPoints, 6 * NPoints, NPoints, NPoints) +=
119 -1.0 * matBHE_loc_R;
120 R_matrix.block(6 * NPoints, 4 * NPoints, NPoints, NPoints) +=
121 -1.0 * matBHE_loc_R;
122 R_matrix.block(4 * NPoints, 7 * NPoints, NPoints, NPoints) +=
123 -1.0 * matBHE_loc_R;
124 R_matrix.block(7 * NPoints, 4 * NPoints, NPoints, NPoints) +=
125 -1.0 * matBHE_loc_R;
126 R_matrix.block(5 * NPoints, 6 * NPoints, NPoints, NPoints) +=
127 -1.0 * matBHE_loc_R;
128 R_matrix.block(6 * NPoints, 5 * NPoints, NPoints, NPoints) +=
129 -1.0 * matBHE_loc_R;
130 R_matrix.block(5 * NPoints, 7 * NPoints, NPoints, NPoints) +=
131 -1.0 * matBHE_loc_R;
132 R_matrix.block(7 * NPoints, 5 * NPoints, NPoints, NPoints) +=
133 -1.0 * matBHE_loc_R; // R_g1
134
135 R_matrix.block(4 * NPoints, 4 * NPoints, NPoints, NPoints) +=
136 2.0 * matBHE_loc_R;
137 R_matrix.block(5 * NPoints, 5 * NPoints, NPoints, NPoints) +=
138 2.0 * matBHE_loc_R; // K_ig // notice we have two
139 // PHI_gg_1 term here.
140 R_matrix.block(6 * NPoints, 6 * NPoints, NPoints, NPoints) +=
141 2.0 * matBHE_loc_R;
142 R_matrix.block(7 * NPoints, 7 * NPoints, NPoints, NPoints) +=
143 2.0 * matBHE_loc_R; // K_og // see Diersch 2013 FEFLOW
144 // book page 954 Table M.2
145 return;
146 case 3: // PHI_gg_2
147 R_matrix.block(4 * NPoints, 5 * NPoints, NPoints, NPoints) +=
148 -1.0 * matBHE_loc_R;
149 R_matrix.block(5 * NPoints, 4 * NPoints, NPoints, NPoints) +=
150 -1.0 * matBHE_loc_R;
151 R_matrix.block(6 * NPoints, 7 * NPoints, NPoints, NPoints) +=
152 -1.0 * matBHE_loc_R;
153 R_matrix.block(7 * NPoints, 6 * NPoints, NPoints, NPoints) +=
154 -1.0 * matBHE_loc_R; // R_g2
155
156 R_matrix.block(4 * NPoints, 4 * NPoints, NPoints, NPoints) +=
157 1.0 * matBHE_loc_R;
158 R_matrix.block(5 * NPoints, 5 * NPoints, NPoints, NPoints) +=
159 1.0 * matBHE_loc_R; // K_ig // notice we only have
160 // 1 PHI_gg term here.
161 R_matrix.block(6 * NPoints, 6 * NPoints, NPoints, NPoints) +=
162 1.0 * matBHE_loc_R;
163 R_matrix.block(7 * NPoints, 7 * NPoints, NPoints, NPoints) +=
164 1.0 * matBHE_loc_R; // K_og // see Diersch 2013 FEFLOW
165 // book page 954 Table M.2
166 return;
167 case 4: // PHI_gs
168 R_s_matrix.template block<NPoints, NPoints>(0, 0).noalias() +=
169 1.0 * matBHE_loc_R;
170
171 R_pi_s_matrix.block(4 * NPoints, 0, NPoints, NPoints) +=
172 -1.0 * matBHE_loc_R;
173 R_pi_s_matrix.block(5 * NPoints, 0, NPoints, NPoints) +=
174 -1.0 * matBHE_loc_R;
175 R_pi_s_matrix.block(6 * NPoints, 0, NPoints, NPoints) +=
176 -1.0 * matBHE_loc_R;
177 R_pi_s_matrix.block(7 * NPoints, 0, NPoints, NPoints) +=
178 -1.0 * matBHE_loc_R;
179 R_matrix.block(4 * NPoints, 4 * NPoints, NPoints, NPoints) +=
180 1.0 * matBHE_loc_R;
181 R_matrix.block(5 * NPoints, 5 * NPoints, NPoints, NPoints) +=
182 1.0 * matBHE_loc_R; // K_ig
183 R_matrix.block(6 * NPoints, 6 * NPoints, NPoints, NPoints) +=
184 1.0 * matBHE_loc_R;
185 R_matrix.block(7 * NPoints, 7 * NPoints, NPoints, NPoints) +=
186 1.0 * matBHE_loc_R; // K_og
187 return;
188 default:
189 OGS_FATAL(
190 "BHE_2U::assembleRMatrices: unknown index {:d} "
191 "out of range.",
192 idx_bhe_unknowns);
193 }
194 }
#define OGS_FATAL(...)
Definition Error.h:19

References OGS_FATAL.

◆ calcThermalResistances()

std::vector< double > ProcessLib::HeatTransportBHE::BHE::BHE_2U::calcThermalResistances ( double const Nu,
int const section_index = 0 ) const
private

Nu is the Nusselt number. section_index is the borehole section index for depth-varying borehole diameter (default: 0).

Definition at line 162 of file BHE_2U.cpp.

164{
165 constexpr double pi = std::numbers::pi;
166
167 double const lambda_r = refrigerant.thermal_conductivity;
168 double const lambda_g = grout.lambda_g;
169 double const lambda_p = _pipes.inlet.wall_thermal_conductivity;
170
171 // thermal resistances due to advective flow of refrigerant in the _pipes
172 // Eq. 36 in Diersch_2011_CG
173 double const R_adv_i = 1.0 / (Nu * lambda_r * pi);
174 double const R_adv_o = 1.0 / (Nu * lambda_r * pi);
175
176 // thermal resistance due to thermal conductivity of the pipe wall material
177 // Eq. 49
178 double const inlet_diameter = _pipes.inlet.diameter;
179 double const inlet_outside_diameter = _pipes.inlet.outsideDiameter();
180 double const R_con_a = std::log(inlet_outside_diameter / inlet_diameter) /
181 (2.0 * pi * lambda_p);
182
183 // the average outer diameter of the _pipes
184 double const d0 = _pipes.outlet.outsideDiameter();
185 double const D =
186 borehole_geometry.sections.diameterAtSection(section_index);
187 // Eq. 38
188 double const chi =
189 std::log(std::sqrt(D * D + 4 * d0 * d0) / 2 / std::sqrt(2) / d0) /
190 std::log(D / 2 / d0);
191 // Eq. 39
192 // thermal resistances of the grout
193 double const R_g =
194 std::acosh((D * D + d0 * d0 - 2 * _pipes.distance * _pipes.distance) /
195 (2 * D * d0)) /
196 (2 * pi * lambda_g) *
197 (3.098 - 4.432 * std::sqrt(2) * _pipes.distance / D +
198 2.364 * 2 * _pipes.distance * _pipes.distance / D / D);
199
200 // thermal resistance due to inter-grout exchange
201 double const R_ar_1 =
202 std::acosh((2.0 * _pipes.distance * _pipes.distance - d0 * d0) / d0 /
203 d0) /
204 (2.0 * pi * lambda_g);
205
206 double const R_ar_2 =
207 std::acosh((2.0 * 2.0 * _pipes.distance * _pipes.distance - d0 * d0) /
208 d0 / d0) /
209 (2.0 * pi * lambda_g);
210
211 auto const [chi_new, R_gg_1, R_gg_2, R_gs] =
212 thermalResistancesGroutSoil2U(chi, R_ar_1, R_ar_2, R_g);
213
214 // thermal resistance due to the grout transition.
215 double const R_con_b = chi_new * R_g;
216
217 // Eq. 29 and 30
218 double const R_fig = R_adv_i + R_con_a + R_con_b;
219 double const R_fog = R_adv_o + R_con_a + R_con_b;
220
221 return {R_fig, R_fog, R_gg_1, R_gg_2, R_gs};
222}
std::array< double, 4 > thermalResistancesGroutSoil2U(double const chi, double const R_ar_1, double const R_ar_2, double const R_g)
Definition BHE_2U.cpp:113

References ProcessLib::HeatTransportBHE::BHE::BHECommonUType::_pipes, ProcessLib::HeatTransportBHE::BHE::BHECommon::borehole_geometry, ProcessLib::HeatTransportBHE::BHE::BHECommon::grout, ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant, and ProcessLib::HeatTransportBHE::BHE::thermalResistancesGroutSoil2U().

Referenced by updateHeatTransferCoefficients().

◆ crossSectionAreas()

std::array< double, BHE_2U::number_of_unknowns > ProcessLib::HeatTransportBHE::BHE::BHE_2U::crossSectionAreas ( int const section_index = 0) const

Definition at line 245 of file BHE_2U.cpp.

247{
248 // The borehole cross-section is divided equally among number_of_grout_zones
249 // quadrants; each grout zone occupies one quadrant minus the pipe wall.
250 double const quarter_borehole_area =
251 borehole_geometry.sections.areaAtSection(section_index) /
253 double const grout_area_inlet = checkedGroutArea(
254 quarter_borehole_area, _pipes.inlet.outsideArea(), section_index);
255 double const grout_area_outlet = checkedGroutArea(
256 quarter_borehole_area, _pipes.outlet.outsideArea(), section_index);
257
258 return {{
259 _pipes.inlet.area(), // i1
260 _pipes.inlet.area(), // i2
261 _pipes.outlet.area(), // o1
262 _pipes.outlet.area(), // o2
263 grout_area_inlet, // g1
264 grout_area_inlet, // g2
265 grout_area_outlet, // g3
266 grout_area_outlet, // g4
267 }};
268}
static constexpr int number_of_grout_zones
Definition BHE_2U.h:53
double checkedGroutArea(double const borehole_area_fraction, double const pipe_outside_area, int const section_index)
Definition BHECommon.h:40

References ProcessLib::HeatTransportBHE::BHE::BHECommonUType::_pipes, ProcessLib::HeatTransportBHE::BHE::BHECommon::borehole_geometry, ProcessLib::HeatTransportBHE::BHE::checkedGroutArea(), and number_of_grout_zones.

◆ getBHEBottomDirichletBCNodesAndComponents()

std::optional< std::array< std::pair< std::size_t, int >, 2 > > ProcessLib::HeatTransportBHE::BHE::BHE_2U::getBHEBottomDirichletBCNodesAndComponents ( std::size_t const bottom_node_id,
int const in_component_id,
int const out_component_id )
static

Definition at line 236 of file BHE_2U.cpp.

240{
241 return {{std::make_pair(bottom_node_id, in_component_id),
242 std::make_pair(bottom_node_id, out_component_id)}};
243}

◆ getBHEInflowDirichletBCNodesAndComponents()

std::array< std::pair< std::size_t, int >, 2 > ProcessLib::HeatTransportBHE::BHE::BHE_2U::getBHEInflowDirichletBCNodesAndComponents ( std::size_t const top_node_id,
std::size_t const ,
int const in_component_id )
static

Definition at line 225 of file BHE_2U.cpp.

229{
230 return {std::make_pair(top_node_id, in_component_id),
231 std::make_pair(top_node_id, in_component_id + 2)};
232}

◆ pipeAdvectionVectors()

std::array< Eigen::Vector3d, BHE_2U::number_of_unknowns > ProcessLib::HeatTransportBHE::BHE::BHE_2U::pipeAdvectionVectors ( Eigen::Vector3d const & ,
int const section_index = 0 ) const

Definition at line 88 of file BHE_2U.cpp.

90{
91 double const rho_r = refrigerant.density;
92 double const Cp_r = refrigerant.specific_heat_capacity;
93
94 double const velocity = getClampedFlowVelocity(section_index);
95
96 Eigen::Vector3d const advection_downflow{0, 0, -rho_r * Cp_r * velocity};
97 Eigen::Vector3d const advection_upflow{0, 0, rho_r * Cp_r * velocity};
98 return {{advection_downflow, // i1
99 advection_downflow, // i2
100 advection_upflow, // o1
101 advection_upflow, // o2
102 {0, 0, 0}, // g1
103 {0, 0, 0}, // g2
104 {0, 0, 0}, // g3
105 {0, 0, 0}}}; // g4
106}
double getClampedFlowVelocity(int const section_index) const
Get velocity for a section, clamping to last section if index exceeds the number of velocity entries....
Definition BHECommon.h:133

References ProcessLib::HeatTransportBHE::BHE::BHECommon::getClampedFlowVelocity(), and ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant.

◆ pipeHeatCapacities()

std::array< double, BHE_2U::number_of_unknowns > ProcessLib::HeatTransportBHE::BHE::BHE_2U::pipeHeatCapacities ( ) const

Definition at line 38 of file BHE_2U.cpp.

40{
41 double const rho_r = refrigerant.density;
42 double const specific_heat_capacity = refrigerant.specific_heat_capacity;
43 double const rho_g = grout.rho_g;
44 double const porosity_g = grout.porosity_g;
45 double const heat_cap_g = grout.heat_cap_g;
46
47 return {{/*i1*/ rho_r * specific_heat_capacity,
48 /*i2*/ rho_r * specific_heat_capacity,
49 /*o1*/ rho_r * specific_heat_capacity,
50 /*o2*/ rho_r * specific_heat_capacity,
51 /*g1*/ (1.0 - porosity_g) * rho_g * heat_cap_g,
52 /*g2*/ (1.0 - porosity_g) * rho_g * heat_cap_g,
53 /*g3*/ (1.0 - porosity_g) * rho_g * heat_cap_g,
54 /*g4*/ (1.0 - porosity_g) * rho_g * heat_cap_g}};
55}

References ProcessLib::HeatTransportBHE::BHE::BHECommon::grout, and ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant.

◆ pipeHeatConductions()

std::array< double, BHE_2U::number_of_unknowns > ProcessLib::HeatTransportBHE::BHE::BHE_2U::pipeHeatConductions ( int const section_index = 0) const

Definition at line 57 of file BHE_2U.cpp.

59{
60 double const lambda_r = refrigerant.thermal_conductivity;
61 double const rho_r = refrigerant.density;
62 double const Cp_r = refrigerant.specific_heat_capacity;
63 double const alpha_L = _pipes.longitudinal_dispersion_length;
64 double const porosity_g = grout.porosity_g;
65 double const lambda_g = grout.lambda_g;
66
67 double const velocity_norm =
68 std::abs(getClampedFlowVelocity(section_index));
69
70 // Here we calculate the laplace coefficients in the governing
71 // equations of BHE. These governing equations can be found in
72 // 1) Diersch (2013) FEFLOW book on page 952, M.120-122, or
73 // 2) Diersch (2011) Comp & Geosci 37:1122-1135, Eq. 19-22.
74 auto const pipe_conduction =
75 lambda_r + rho_r * Cp_r * alpha_L * velocity_norm;
76 auto const grout_conduction = (1.0 - porosity_g) * lambda_g;
77 return {{pipe_conduction, // i1
78 pipe_conduction, // i2
79 pipe_conduction, // o1
80 pipe_conduction, // o2
81 grout_conduction, // g1
82 grout_conduction, // g2
83 grout_conduction, // g3
84 grout_conduction}}; // g4
85}

References ProcessLib::HeatTransportBHE::BHE::BHECommonUType::_pipes, ProcessLib::HeatTransportBHE::BHE::BHECommon::getClampedFlowVelocity(), ProcessLib::HeatTransportBHE::BHE::BHECommon::grout, and ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant.

◆ updateFlowRateAndTemperature()

double ProcessLib::HeatTransportBHE::BHE::BHE_2U::updateFlowRateAndTemperature ( double T_out,
double current_time )

Return the inflow temperature for the boundary condition.

Definition at line 270 of file BHE_2U.cpp.

272{
273 auto values =
274 visit([&](auto const& control) { return control(T_out, current_time); },
276 updateHeatTransferCoefficients(values.flow_rate);
277 return values.temperature;
278}

References ProcessLib::HeatTransportBHE::BHE::BHECommon::flowAndTemperatureControl, and updateHeatTransferCoefficients().

◆ updateHeatTransferCoefficients()

void ProcessLib::HeatTransportBHE::BHE::BHE_2U::updateHeatTransferCoefficients ( double const flow_rate)

Definition at line 147 of file BHE_2U.cpp.

148{
150 _pipes.inlet, borehole_geometry.length, refrigerant, flow_rate);
151
152 _flow_velocities = {tm_flow.velocity};
153
155 [&](int i)
156 { return calcThermalResistances(tm_flow.nusselt_number, i); });
157}
void recomputeSectionalResistances(Fn &&calcForSection)
Recompute _sectional_thermal_resistances for all sections.
Definition BHECommon.h:117
std::vector< double > calcThermalResistances(double const Nu, int const section_index=0) const
Definition BHE_2U.cpp:162
ThermoMechanicalFlowProperties calculateThermoMechanicalFlowPropertiesPipe(Pipe const &pipe, double const length, RefrigerantProperties const &fluid, double const flow_rate)

References ProcessLib::HeatTransportBHE::BHE::BHECommon::_flow_velocities, ProcessLib::HeatTransportBHE::BHE::BHECommonUType::_pipes, ProcessLib::HeatTransportBHE::BHE::BHECommon::borehole_geometry, calcThermalResistances(), ProcessLib::HeatTransportBHE::BHE::calculateThermoMechanicalFlowPropertiesPipe(), ProcessLib::HeatTransportBHE::BHE::BHECommon::recomputeSectionalResistances(), and ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant.

Referenced by BHE_2U(), and updateFlowRateAndTemperature().

◆ withGeometry()

Member Data Documentation

◆ inflow_outflow_bc_component_ids

std::pair<int, int> ProcessLib::HeatTransportBHE::BHE::BHE_2U::inflow_outflow_bc_component_ids[]
staticconstexpr
Initial value:
= {
{0, 2}, {1, 3}}

Definition at line 199 of file BHE_2U.h.

199 {
200 {0, 2}, {1, 3}};

◆ number_of_grout_zones

int ProcessLib::HeatTransportBHE::BHE::BHE_2U::number_of_grout_zones = 4
staticconstexpr

Definition at line 53 of file BHE_2U.h.

Referenced by crossSectionAreas().

◆ number_of_unknowns

int ProcessLib::HeatTransportBHE::BHE::BHE_2U::number_of_unknowns = 8
staticconstexpr

Definition at line 52 of file BHE_2U.h.


The documentation for this class was generated from the following files: