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

Detailed Description

The BHE_2U class is the realization of 2U type of Borehole Heate Exchanger. In this class, the pipe heat capacity, pipe heat conductiion, 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 41 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)
 
std::array< double, number_of_unknownspipeHeatCapacities () const
 
std::array< double, number_of_unknownspipeHeatConductions () const
 
std::array< Eigen::Vector3d, number_of_unknownspipeAdvectionVectors (Eigen::Vector3d const &) const
 
double updateFlowRateAndTemperature (double T_out, double current_time)
 Return the inflow temperature for the boundary condition.
 
double thermalResistance (int const unknown_index) const
 
std::array< double, number_of_unknownscrossSectionAreas () 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)
 

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::array< double, number_of_unknownscalcThermalResistances (double const Nu)
 Nu is the Nusselt number.
 

Private Attributes

std::array< double, number_of_unknowns_thermal_resistances
 

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 Attributes inherited from ProcessLib::HeatTransportBHE::BHE::BHECommonUType
PipeConfigurationUType const _pipes
 
double _flow_velocity = std::numeric_limits<double>::quiet_NaN()
 Flow velocity inside the pipes. Depends on the flow_rate.
 

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

32 pipes, use_python_bcs}
33{
34 _thermal_resistances.fill(std::numeric_limits<double>::quiet_NaN());
35
36 // Initialize thermal resistances.
37 auto values = visit(
38 [&](auto const& control) {
40 0. /* initial time */);
41 },
43 updateHeatTransferCoefficients(values.flow_rate);
44}
BHECommonUType(BoreholeGeometry const &borehole, RefrigerantProperties const &refrigerant, GroutParameters const &grout, FlowAndTemperatureControl const &flowAndTemperatureControl, PipeConfigurationUType const &pipes, bool const use_python_bcs)
void updateHeatTransferCoefficients(double const flow_rate)
Definition BHE_2U.cpp:181
std::array< double, number_of_unknowns > _thermal_resistances
Definition BHE_2U.h:231
RefrigerantProperties const refrigerant
Definition BHECommon.h:42
FlowAndTemperatureControl const flowAndTemperatureControl
Definition BHECommon.h:44

References _thermal_resistances, ProcessLib::HeatTransportBHE::BHE::BHECommon::flowAndTemperatureControl, ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::reference_temperature, ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant, and updateHeatTransferCoefficients().

Member Function Documentation

◆ assembleRMatrices()

template<int NPoints, typename SingleUnknownMatrixType , typename RMatrixType , typename RPiSMatrixType , typename RSMatrixType >
static 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 66 of file BHE_2U.h.

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

References OGS_FATAL.

◆ calcThermalResistances()

std::array< double, BHE_2U::number_of_unknowns > ProcessLib::HeatTransportBHE::BHE::BHE_2U::calcThermalResistances ( double const Nu)
private

Nu is the Nusselt number.

Definition at line 193 of file BHE_2U.cpp.

195{
196 constexpr double pi = boost::math::constants::pi<double>();
197
198 double const lambda_r = refrigerant.thermal_conductivity;
199 double const lambda_g = grout.lambda_g;
200 double const lambda_p = _pipes.inlet.wall_thermal_conductivity;
201
202 // thermal resistances due to advective flow of refrigerant in the _pipes
203 // Eq. 36 in Diersch_2011_CG
204 double const R_adv_i = 1.0 / (Nu * lambda_r * pi);
205 double const R_adv_o = 1.0 / (Nu * lambda_r * pi);
206
207 // thermal resistance due to thermal conductivity of the pipe wall material
208 // Eq. 49
209 double const R_con_a =
211 (2.0 * pi * lambda_p);
212
213 // the average outer diameter of the _pipes
214 double const d0 = _pipes.outlet.outsideDiameter();
215 double const D = borehole_geometry.diameter;
216 // Eq. 38
217 double const chi =
218 std::log(std::sqrt(D * D + 4 * d0 * d0) / 2 / std::sqrt(2) / d0) /
219 std::log(D / 2 / d0);
220 // Eq. 39
221 // thermal resistances of the grout
222 double const R_g =
223 std::acosh((D * D + d0 * d0 - 2 * _pipes.distance * _pipes.distance) /
224 (2 * D * d0)) /
225 (2 * pi * lambda_g) *
226 (3.098 - 4.432 * std::sqrt(2) * _pipes.distance / D +
227 2.364 * 2 * _pipes.distance * _pipes.distance / D / D);
228
229 // thermal resistance due to inter-grout exchange
230 double const R_ar_1 =
231 std::acosh((2.0 * _pipes.distance * _pipes.distance - d0 * d0) / d0 /
232 d0) /
233 (2.0 * pi * lambda_g);
234
235 double const R_ar_2 =
236 std::acosh((2.0 * 2.0 * _pipes.distance * _pipes.distance - d0 * d0) /
237 d0 / d0) /
238 (2.0 * pi * lambda_g);
239
240 auto const [chi_new, R_gg_1, R_gg_2, R_gs] =
241 thermalResistancesGroutSoil2U(chi, R_ar_1, R_ar_2, R_g);
242
243 // thermal resistance due to the grout transition.
244 double const R_con_b = chi_new * R_g;
245
246 // Eq. 29 and 30
247 double const R_fig = R_adv_i + R_con_a + R_con_b;
248 double const R_fog = R_adv_o + R_con_a + R_con_b;
249
250 return {{R_fig, R_fog, R_gg_1, R_gg_2, R_gs}};
251
252 // keep the following lines------------------------------------------------
253 // when debugging the code, printing the R and phi values are needed--------
254 // std::cout << "Rfig =" << R_fig << " Rfog =" << R_fog << " Rgg =" <<
255 // R_gg << " Rgs =" << R_gs << "\n"; double phi_fig = 1.0 / (R_fig *
256 // S_i); double phi_fog = 1.0 / (R_fog * S_o); double phi_gg = 1.0 / (R_gg
257 // * S_g1); double phi_gs = 1.0 / (R_gs * S_gs); std::cout << "phi_fig ="
258 // << phi_fig << " phi_fog =" << phi_fog << " phi_gg =" << phi_gg << "
259 // phi_gs =" << phi_gs << "\n";
260 // -------------------------------------------------------------------------
261}
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:146

References ProcessLib::HeatTransportBHE::BHE::BHECommonUType::_pipes, ProcessLib::HeatTransportBHE::BHE::BHECommon::borehole_geometry, ProcessLib::HeatTransportBHE::BHE::BoreholeGeometry::diameter, ProcessLib::HeatTransportBHE::BHE::Pipe::diameter, ProcessLib::HeatTransportBHE::BHE::PipeConfigurationUType::distance, ProcessLib::HeatTransportBHE::BHE::BHECommon::grout, ProcessLib::HeatTransportBHE::BHE::PipeConfigurationUType::inlet, ProcessLib::HeatTransportBHE::BHE::GroutParameters::lambda_g, ProcessLib::HeatTransportBHE::BHE::PipeConfigurationUType::outlet, ProcessLib::HeatTransportBHE::BHE::Pipe::outsideDiameter(), ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant, ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::thermal_conductivity, ProcessLib::HeatTransportBHE::BHE::thermalResistancesGroutSoil2U(), and ProcessLib::HeatTransportBHE::BHE::Pipe::wall_thermal_conductivity.

Referenced by updateHeatTransferCoefficients().

◆ crossSectionAreas()

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

279{
280 return {{std::make_pair(bottom_node_id, in_component_id),
281 std::make_pair(bottom_node_id, out_component_id)}};
282}

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

268{
269 return {std::make_pair(top_node_id, in_component_id),
270 std::make_pair(top_node_id, in_component_id + 2)};
271}

◆ pipeAdvectionVectors()

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

Definition at line 98 of file BHE_2U.cpp.

99{
100 double const rho_r = refrigerant.density;
101 double const Cp_r = refrigerant.specific_heat_capacity;
102
103 return {{// pipe i1
104 {0, 0, -rho_r * Cp_r * _flow_velocity},
105 // pipe i2
106 {0, 0, -rho_r * Cp_r * _flow_velocity},
107 // pipe o1
108 {0, 0, rho_r * Cp_r * _flow_velocity},
109 // pipe o2
110 {0, 0, rho_r * Cp_r * _flow_velocity},
111 // grout g1
112 {0, 0, 0},
113 // grout g2
114 {0, 0, 0},
115 // grout g3
116 {0, 0, 0},
117 // grout g4
118 {0, 0, 0}}};
119}
double _flow_velocity
Flow velocity inside the pipes. Depends on the flow_rate.

References ProcessLib::HeatTransportBHE::BHE::BHECommonUType::_flow_velocity, ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::density, ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant, and ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::specific_heat_capacity.

◆ pipeHeatCapacities()

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

Definition at line 46 of file BHE_2U.cpp.

48{
49 double const rho_r = refrigerant.density;
51 double const rho_g = grout.rho_g;
52 double const porosity_g = grout.porosity_g;
53 double const heat_cap_g = grout.heat_cap_g;
54
55 return {{/*i1*/ rho_r * specific_heat_capacity,
56 /*i2*/ rho_r * specific_heat_capacity,
57 /*o1*/ rho_r * specific_heat_capacity,
58 /*o2*/ rho_r * specific_heat_capacity,
59 /*g1*/ (1.0 - porosity_g) * rho_g * heat_cap_g,
60 /*g2*/ (1.0 - porosity_g) * rho_g * heat_cap_g,
61 /*g3*/ (1.0 - porosity_g) * rho_g * heat_cap_g,
62 /*g4*/ (1.0 - porosity_g) * rho_g * heat_cap_g}};
63}

References ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::density, ProcessLib::HeatTransportBHE::BHE::BHECommon::grout, ProcessLib::HeatTransportBHE::BHE::GroutParameters::heat_cap_g, ProcessLib::HeatTransportBHE::BHE::GroutParameters::porosity_g, ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant, ProcessLib::HeatTransportBHE::BHE::GroutParameters::rho_g, and ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::specific_heat_capacity.

◆ pipeHeatConductions()

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

Definition at line 65 of file BHE_2U.cpp.

67{
68 double const lambda_r = refrigerant.thermal_conductivity;
69 double const rho_r = refrigerant.density;
70 double const Cp_r = refrigerant.specific_heat_capacity;
71 double const alpha_L = _pipes.longitudinal_dispersion_length;
72 double const porosity_g = grout.porosity_g;
73 double const lambda_g = grout.lambda_g;
74
75 // Here we calculate the laplace coefficients in the governing
76 // equations of BHE. These governing equations can be found in
77 // 1) Diersch (2013) FEFLOW book on page 952, M.120-122, or
78 // 2) Diersch (2011) Comp & Geosci 37:1122-1135, Eq. 19-22.
79 return {{// pipe i1
80 (lambda_r + rho_r * Cp_r * alpha_L * _flow_velocity),
81 // pipe i2
82 (lambda_r + rho_r * Cp_r * alpha_L * _flow_velocity),
83 // pipe o1
84 (lambda_r + rho_r * Cp_r * alpha_L * _flow_velocity),
85 // pipe o2
86 (lambda_r + rho_r * Cp_r * alpha_L * _flow_velocity),
87 // pipe g1
88 (1.0 - porosity_g) * lambda_g,
89 // pipe g2
90 (1.0 - porosity_g) * lambda_g,
91 // pipe g3
92 (1.0 - porosity_g) * lambda_g,
93 // pipe g4
94 (1.0 - porosity_g) * lambda_g}};
95}

References ProcessLib::HeatTransportBHE::BHE::BHECommonUType::_flow_velocity, ProcessLib::HeatTransportBHE::BHE::BHECommonUType::_pipes, ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::density, ProcessLib::HeatTransportBHE::BHE::BHECommon::grout, ProcessLib::HeatTransportBHE::BHE::GroutParameters::lambda_g, ProcessLib::HeatTransportBHE::BHE::PipeConfigurationUType::longitudinal_dispersion_length, ProcessLib::HeatTransportBHE::BHE::GroutParameters::porosity_g, ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant, ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::specific_heat_capacity, and ProcessLib::HeatTransportBHE::BHE::RefrigerantProperties::thermal_conductivity.

◆ thermalResistance()

double ProcessLib::HeatTransportBHE::BHE::BHE_2U::thermalResistance ( int const unknown_index) const
inline

Definition at line 195 of file BHE_2U.h.

196 {
197 return _thermal_resistances[unknown_index];
198 }

References _thermal_resistances.

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

300{
301 auto values =
302 visit([&](auto const& control) { return control(T_out, current_time); },
304 updateHeatTransferCoefficients(values.flow_rate);
305 return values.temperature;
306}

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

◆ updateHeatTransferCoefficients()

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

Definition at line 181 of file BHE_2U.cpp.

183{
184 auto const tm_flow_properties = calculateThermoMechanicalFlowPropertiesPipe(
186
187 _flow_velocity = tm_flow_properties.velocity;
189 calcThermalResistances(tm_flow_properties.nusselt_number);
190}
std::array< double, number_of_unknowns > calcThermalResistances(double const Nu)
Nu is the Nusselt number.
Definition BHE_2U.cpp:193
ThermoMechanicalFlowProperties calculateThermoMechanicalFlowPropertiesPipe(Pipe const &pipe, double const length, RefrigerantProperties const &fluid, double const flow_rate)

References ProcessLib::HeatTransportBHE::BHE::BHECommonUType::_flow_velocity, ProcessLib::HeatTransportBHE::BHE::BHECommonUType::_pipes, _thermal_resistances, ProcessLib::HeatTransportBHE::BHE::BHECommon::borehole_geometry, calcThermalResistances(), ProcessLib::HeatTransportBHE::BHE::calculateThermoMechanicalFlowPropertiesPipe(), ProcessLib::HeatTransportBHE::BHE::PipeConfigurationUType::inlet, ProcessLib::HeatTransportBHE::BHE::BoreholeGeometry::length, and ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant.

Referenced by BHE_2U(), and updateFlowRateAndTemperature().

Member Data Documentation

◆ _thermal_resistances

std::array<double, number_of_unknowns> ProcessLib::HeatTransportBHE::BHE::BHE_2U::_thermal_resistances
private

PHI_fig, PHI_fog, PHI_gg, PHI_gs; Here we store the thermal resistances needed for computation of the heat exchange coefficients in the governing equations of BHE. These governing equations can be found in 1) Diersch (2013) FEFLOW book on page 958, M.3, or 2) Diersch (2011) Comp & Geosci 37:1122-1135, Eq. 90-97.

Definition at line 231 of file BHE_2U.h.

Referenced by BHE_2U(), thermalResistance(), and updateHeatTransferCoefficients().

◆ inflow_outflow_bc_component_ids

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

Definition at line 200 of file BHE_2U.h.

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

◆ number_of_grout_zones

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

Definition at line 52 of file BHE_2U.h.

◆ number_of_unknowns

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

Definition at line 51 of file BHE_2U.h.


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