OGS
ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial Class Referenceabstract

Detailed Description

Definition at line 19 of file BHECommonCoaxial.h.

#include <BHECommonCoaxial.h>

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

Public Member Functions

 BHECommonCoaxial (BoreholeGeometry const &borehole, RefrigerantProperties const &refrigerant, GroutParameters const &grout, FlowAndTemperatureControl const &flowAndTemperatureControl, PipeConfigurationCoaxial const &pipes, bool const use_python_bcs)
double thermalResistance (int const unknown_index) const
double updateFlowRateAndTemperature (double T_out, double current_time)
std::array< double, number_of_unknownscalcThermalResistances (double const Nu_inner_pipe, double const Nu_annulus_pipe) const
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
void updateHeatTransferCoefficients (double const flow_rate)
Public Member Functions inherited from ProcessLib::HeatTransportBHE::BHE::BHECommon
constexpr bool isPowerBC () const

Static Public Member Functions

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)

Public Attributes

double cross_section_area_inner_pipe
double cross_section_area_annulus
double cross_section_area_grout
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

Static Public Attributes

static constexpr int number_of_unknowns = 3
static constexpr int number_of_grout_zones = 1
static constexpr std::pair< int, int > inflow_outflow_bc_component_ids []

Protected Member Functions

virtual std::array< double, 2 > velocities () const =0
virtual std::array< double, number_of_unknownsgetThermalResistances (double const &R_gs, double const &R_ff, double const &R_fg) const =0

Protected Attributes

PipeConfigurationCoaxial const _pipes
std::array< double, number_of_unknowns_thermal_resistances
double _flow_velocity_inner = std::numeric_limits<double>::quiet_NaN()
 Flow velocity inside the pipes and annulus. Depends on the flow_rate.
double _flow_velocity_annulus = std::numeric_limits<double>::quiet_NaN()

Constructor & Destructor Documentation

◆ BHECommonCoaxial()

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

Definition at line 16 of file BHECommonCoaxial.cpp.

23 : BHECommon{borehole, refrigerant, grout, flowAndTemperatureControl,
25 _pipes(pipes)
26{
27 cross_section_area_inner_pipe = _pipes.inner_pipe.area();
29 _pipes.outer_pipe.area() - _pipes.inner_pipe.outsideArea();
31 borehole_geometry.area() - _pipes.outer_pipe.outsideArea();
32
33 _thermal_resistances.fill(std::numeric_limits<double>::quiet_NaN());
34}
std::array< double, number_of_unknowns > _thermal_resistances
RefrigerantProperties const refrigerant
Definition BHECommon.h:36
FlowAndTemperatureControl const flowAndTemperatureControl
Definition BHECommon.h:38

References _pipes, _thermal_resistances, ProcessLib::HeatTransportBHE::BHE::BHECommon::borehole_geometry, cross_section_area_annulus, cross_section_area_grout, cross_section_area_inner_pipe, ProcessLib::HeatTransportBHE::BHE::BHECommon::flowAndTemperatureControl, ProcessLib::HeatTransportBHE::BHE::BHECommon::grout, ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant, and ProcessLib::HeatTransportBHE::BHE::BHECommon::use_python_bcs.

Referenced by ProcessLib::HeatTransportBHE::BHE::BHE_CXA::BHE_CXA(), and ProcessLib::HeatTransportBHE::BHE::BHE_CXC::BHE_CXC().

Member Function Documentation

◆ calcThermalResistances()

std::array< double, BHECommonCoaxial::number_of_unknowns > ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::calcThermalResistances ( double const Nu_inner_pipe,
double const Nu_annulus_pipe ) const

Definition at line 99 of file BHECommonCoaxial.cpp.

101{
102 // thermal resistances due to advective flow of refrigerant in the pipes
103 auto const R_advective = calculateAdvectiveThermalResistance(
104 _pipes.inner_pipe, _pipes.outer_pipe, refrigerant, Nu_inner_pipe,
105 Nu_annulus_pipe);
106
107 // thermal resistance due to thermal conductivity of the pipe wall material
108 auto const R_conductive = calculatePipeWallThermalResistance(
109 _pipes.inner_pipe, _pipes.outer_pipe);
110
111 // thermal resistance due to the grout transition and grout-soil exchange.
113 _pipes.outer_pipe, grout, borehole_geometry.diameter);
114
115 // thermal resistance due to grout-soil exchange
116 double const R_gs = R.grout_soil;
117
118 // Eq. 56 and 57
119 double const R_ff = R_advective.inner_pipe_coaxial + R_advective.a_annulus +
120 R_conductive.inner_pipe_coaxial;
121 double const R_fg =
122 R_advective.b_annulus + R_conductive.annulus + R.conductive_b;
123
124 return getThermalResistances(R_gs, R_ff, R_fg);
125}
virtual std::array< double, number_of_unknowns > getThermalResistances(double const &R_gs, double const &R_ff, double const &R_fg) const =0
PipeWallThermalResistanceCoaxial calculatePipeWallThermalResistance(Pipe const &inner_pipe, Pipe const &outer_pipe)
AdvectiveThermalResistanceCoaxial calculateAdvectiveThermalResistance(Pipe const &inner_pipe, Pipe const &outer_pipe, RefrigerantProperties const &fluid, double const Nu_inner_pipe, double const Nu_annulus)
GroutAndGroutSoilExchangeThermalResistanceCoaxial calculateGroutAndGroutSoilExchangeThermalResistance(Pipe const &outer_pipe, GroutParameters const &grout_parameters, double const borehole_diameter)

References _pipes, ProcessLib::HeatTransportBHE::BHE::BHECommon::borehole_geometry, ProcessLib::HeatTransportBHE::BHE::calculateAdvectiveThermalResistance(), ProcessLib::HeatTransportBHE::BHE::calculateGroutAndGroutSoilExchangeThermalResistance(), ProcessLib::HeatTransportBHE::BHE::calculatePipeWallThermalResistance(), getThermalResistances(), ProcessLib::HeatTransportBHE::BHE::BHECommon::grout, and ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant.

Referenced by updateHeatTransferCoefficients().

◆ getBHEBottomDirichletBCNodesAndComponents()

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

Definition at line 139 of file BHECommonCoaxial.cpp.

142{
143 return {{std::make_pair(bottom_node_id, in_component_id),
144 std::make_pair(bottom_node_id, out_component_id)}};
145}

◆ getBHEInflowDirichletBCNodesAndComponents()

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

Definition at line 128 of file BHECommonCoaxial.cpp.

132{
133 return {std::make_pair(top_node_id, in_component_id),
134 std::make_pair(top_node_id, in_component_id + 1)};
135}

◆ getThermalResistances()

virtual std::array< double, number_of_unknowns > ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::getThermalResistances ( double const & R_gs,
double const & R_ff,
double const & R_fg ) const
protectedpure virtual

◆ pipeAdvectionVectors()

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

Definition at line 83 of file BHECommonCoaxial.cpp.

85{
86 double const rho_r = refrigerant.density;
87 double const Cp_r = refrigerant.specific_heat_capacity;
88 auto const v = velocities();
89
90 return {// pipe i, Eq. 26 and Eq. 23
91 rho_r * Cp_r * std::abs(v[0]) * elem_direction,
92 // pipe o, Eq. 27 and Eq. 24
93 -rho_r * Cp_r * std::abs(v[1]) * elem_direction,
94 // grout g, Eq. 28 and Eq. 25
95 {0, 0, 0}};
96}
virtual std::array< double, 2 > velocities() const =0

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

◆ pipeHeatCapacities()

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

Definition at line 37 of file BHECommonCoaxial.cpp.

38{
39 double const rho_r = refrigerant.density;
40 double const specific_heat_capacity = refrigerant.specific_heat_capacity;
41 double const rho_g = grout.rho_g;
42 double const porosity_g = grout.porosity_g;
43 double const heat_cap_g = grout.heat_cap_g;
44
45 return {{/*i*/ rho_r * specific_heat_capacity,
46 /*o*/ rho_r * specific_heat_capacity,
47 /*g*/ (1.0 - porosity_g) * rho_g * heat_cap_g}};
48}

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

◆ pipeHeatConductions()

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

Definition at line 60 of file BHECommonCoaxial.cpp.

61{
62 double const lambda_r = refrigerant.thermal_conductivity;
63 double const rho_r = refrigerant.density;
64 double const Cp_r = refrigerant.specific_heat_capacity;
65 double const alpha_L = _pipes.longitudinal_dispersion_length;
66 double const porosity_g = grout.porosity_g;
67 double const lambda_g = grout.lambda_g;
68
69 auto v = velocities();
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. 26-28, 23-25
74 return {{// pipe i, Eq. 26 and Eq. 23
75 (lambda_r + rho_r * Cp_r * alpha_L * std::abs(v[0])),
76 // pipe o, Eq. 27 and Eq. 24
77 (lambda_r + rho_r * Cp_r * alpha_L * std::abs(v[1])),
78 // pipe g, Eq. 28 and Eq. 25
79 (1.0 - porosity_g) * lambda_g}};
80}

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

◆ thermalResistance()

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

Definition at line 32 of file BHECommonCoaxial.h.

33 {
34 return _thermal_resistances[unknown_index];
35 }

References _thermal_resistances.

◆ updateFlowRateAndTemperature()

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

Definition at line 50 of file BHECommonCoaxial.cpp.

52{
53 auto values =
54 visit([&](auto const& control) { return control(T_out, current_time); },
56 updateHeatTransferCoefficients(values.flow_rate);
57 return values.temperature;
58}

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

◆ updateHeatTransferCoefficients()

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

Definition at line 147 of file BHECommonCoaxial.cpp.

148{
149 auto const tm_flow_properties_annulus =
151 _pipes.outer_pipe,
152 borehole_geometry.length,
154 flow_rate);
155
156 _flow_velocity_annulus = tm_flow_properties_annulus.velocity;
157
158 auto const tm_flow_properties = calculateThermoMechanicalFlowPropertiesPipe(
159 _pipes.inner_pipe, borehole_geometry.length, refrigerant, flow_rate);
160
161 _flow_velocity_inner = tm_flow_properties.velocity;
162
164 calcThermalResistances(tm_flow_properties.nusselt_number,
165 tm_flow_properties_annulus.nusselt_number);
166}
std::array< double, number_of_unknowns > calcThermalResistances(double const Nu_inner_pipe, double const Nu_annulus_pipe) const
double _flow_velocity_inner
Flow velocity inside the pipes and annulus. Depends on the flow_rate.
ThermoMechanicalFlowProperties calculateThermoMechanicalFlowPropertiesAnnulus(Pipe const &inner_pipe, Pipe const &outer_pipe, double const length, RefrigerantProperties const &fluid, double const flow_rate)
ThermoMechanicalFlowProperties calculateThermoMechanicalFlowPropertiesPipe(Pipe const &pipe, double const length, RefrigerantProperties const &fluid, double const flow_rate)

References _flow_velocity_annulus, _flow_velocity_inner, _pipes, _thermal_resistances, ProcessLib::HeatTransportBHE::BHE::BHECommon::borehole_geometry, calcThermalResistances(), ProcessLib::HeatTransportBHE::BHE::calculateThermoMechanicalFlowPropertiesAnnulus(), ProcessLib::HeatTransportBHE::BHE::calculateThermoMechanicalFlowPropertiesPipe(), and ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant.

Referenced by ProcessLib::HeatTransportBHE::BHE::BHE_CXA::BHE_CXA(), ProcessLib::HeatTransportBHE::BHE::BHE_CXC::BHE_CXC(), and updateFlowRateAndTemperature().

◆ velocities()

virtual std::array< double, 2 > ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::velocities ( ) const
protectedpure virtual

Member Data Documentation

◆ _flow_velocity_annulus

double ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::_flow_velocity_annulus = std::numeric_limits<double>::quiet_NaN()
protected

◆ _flow_velocity_inner

double ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::_flow_velocity_inner = std::numeric_limits<double>::quiet_NaN()
protected

Flow velocity inside the pipes and annulus. Depends on the flow_rate.

Definition at line 85 of file BHECommonCoaxial.h.

Referenced by updateHeatTransferCoefficients(), ProcessLib::HeatTransportBHE::BHE::BHE_CXA::velocities(), and ProcessLib::HeatTransportBHE::BHE::BHE_CXC::velocities().

◆ _pipes

PipeConfigurationCoaxial const ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::_pipes
protected

◆ _thermal_resistances

std::array<double, number_of_unknowns> ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::_thermal_resistances
protected

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 82 of file BHECommonCoaxial.h.

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

◆ cross_section_area_annulus

double ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::cross_section_area_annulus

◆ cross_section_area_grout

double ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::cross_section_area_grout

◆ cross_section_area_inner_pipe

double ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::cross_section_area_inner_pipe

◆ inflow_outflow_bc_component_ids

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

Definition at line 44 of file BHECommonCoaxial.h.

44 {
45 {0, 1}};

◆ number_of_grout_zones

int ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::number_of_grout_zones = 1
staticconstexpr

Definition at line 30 of file BHECommonCoaxial.h.

◆ number_of_unknowns

int ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::number_of_unknowns = 3
staticconstexpr

Definition at line 29 of file BHECommonCoaxial.h.


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