OGS
ProcessLib::HeatTransportBHE::BHE::BHE_CXA Class Referencefinal

Detailed Description

The BHE_CXA class is the realization of Coaxial pipe with Annular type of the Borehole Heate Exchanger. In this class, the pipe heat capacity, pipe heat conduction, pipe advection vectors are initialized according to the geometry of CXA type of BHE. For CXA type of BHE, 3 primary unknowns are assigned on the 1D BHE elements. They are the temperature in inflow pipe T_in, temperature in outflow pipe T_out, temperature of the grout zone surrounding the inflow pipe T_g. These primary variables are solved according to heat convection and conduction equations on the pipes and also in the grout zone. The interaction of the CXA 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 37 of file BHE_CXA.h.

#include <BHE_CXA.h>

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

Public Member Functions

 BHE_CXA (BoreholeGeometry const &borehole, RefrigerantProperties const &refrigerant, GroutParameters const &grout, FlowAndTemperatureControl const &flowAndTemperatureControl, PipeConfigurationCoaxial const &pipes, bool const use_python_bcs)
 
std::array< double, number_of_unknownscrossSectionAreas () const
 
- Public Member Functions inherited from 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)
 
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

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 Public Member Functions inherited from ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial
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)
 

Private Member Functions

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

Additional Inherited Members

- Public Attributes inherited from ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial
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 inherited from ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial
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 inherited from ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial
- Protected Attributes inherited from ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial
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

◆ BHE_CXA()

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

Definition at line 40 of file BHE_CXA.h.

46 : BHECommonCoaxial{borehole, refrigerant,
48 pipes, use_python_bcs}
49 {
50 // Initialize thermal resistances.
51 auto values = visit(
52 [&](auto const& control) {
54 0. /* initial time */);
55 },
57 updateHeatTransferCoefficients(values.flow_rate);
58 }
BHECommonCoaxial(BoreholeGeometry const &borehole, RefrigerantProperties const &refrigerant, GroutParameters const &grout, FlowAndTemperatureControl const &flowAndTemperatureControl, PipeConfigurationCoaxial const &pipes, bool const use_python_bcs)
RefrigerantProperties const refrigerant
Definition BHECommon.h:42
FlowAndTemperatureControl const flowAndTemperatureControl
Definition BHECommon.h:44

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

Member Function Documentation

◆ assembleRMatrices()

template<int NPoints, typename SingleUnknownMatrixType , typename RMatrixType , typename RPiSMatrixType , typename RSMatrixType >
static void ProcessLib::HeatTransportBHE::BHE::BHE_CXA::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 63 of file BHE_CXA.h.

69 {
70 switch (idx_bhe_unknowns)
71 {
72 case 0: // PHI_fig
73 R_matrix.block(0, 2 * NPoints, NPoints, NPoints) +=
74 -1.0 * matBHE_loc_R;
75 R_matrix.block(2 * NPoints, 0, NPoints, NPoints) +=
76 -1.0 * matBHE_loc_R;
77
78 R_matrix.block(0, 0, NPoints, NPoints) +=
79 1.0 * matBHE_loc_R; // K_i
80 R_matrix.block(2 * NPoints,
81 2 * NPoints,
82 NPoints,
83 NPoints) += 1.0 * matBHE_loc_R; // K_ig
84 return;
85 case 1: // PHI_ff
86 R_matrix.block(0, NPoints, NPoints, NPoints) +=
87 -1.0 * matBHE_loc_R;
88 R_matrix.block(NPoints, 0, NPoints, NPoints) +=
89 -1.0 * matBHE_loc_R;
90
91 R_matrix.block(0, 0, NPoints,
92 NPoints) += 1.0 * matBHE_loc_R; // K_i1
93 R_matrix.block(NPoints, NPoints, NPoints, NPoints) +=
94 1.0 * matBHE_loc_R; // K_o
95 return;
96 case 2: // PHI_gs
97 R_s_matrix += matBHE_loc_R;
98
99 R_pi_s_matrix.block(2 * NPoints, 0, NPoints, NPoints) +=
100 -1.0 * matBHE_loc_R;
101
102 R_matrix.block(2 * NPoints, 2 * NPoints, NPoints,
103 NPoints) += matBHE_loc_R; // K_ig
104 return;
105 default:
106 OGS_FATAL(
107 "Error!!! In the function BHE_CXA::assembleRMatrices, "
108 "the index of bhe unknowns is out of range! ");
109 }
110 }
#define OGS_FATAL(...)
Definition Error.h:26

References OGS_FATAL.

◆ crossSectionAreas()

◆ getThermalResistances()

std::array< double, number_of_unknowns > ProcessLib::HeatTransportBHE::BHE::BHE_CXA::getThermalResistances ( double const & R_gs,
double const & R_ff,
double const & R_fg ) const
inlineoverrideprivatevirtual

Implements ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial.

Definition at line 124 of file BHE_CXA.h.

127 {
128 return {R_fg, R_ff, R_gs};
129 }

◆ velocities()

std::array< double, 2 > ProcessLib::HeatTransportBHE::BHE::BHE_CXA::velocities ( ) const
inlineoverrideprivatevirtual

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