OGS
ProcessLib::HeatTransportBHE::BHE::BHE_CXC Class Referencefinal

Detailed Description

The BHE_CXC class is the realization of Coaxial pipe with Centred type of the Borehole Heat Exchanger. In this class, the pipe heat capacity, pipe heat conduction, pipe advection vectors are initialized according to the geometry of CXC type of BHE. For CXC 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 outflow 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 CXC 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 29 of file BHE_CXC.h.

#include <BHE_CXC.h>

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

Public Member Functions

 BHE_CXC (BoreholeGeometry const &borehole, RefrigerantProperties const &refrigerant, GroutParameters const &grout, FlowAndTemperatureControl const &flowAndTemperatureControl, PipeConfigurationCoaxial const &pipes, bool const use_python_bcs)
BHE_CXC withGeometry (BoreholeGeometry const &g) const
std::array< double, number_of_unknownscrossSectionAreas (int const section_index=0) 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 updateFlowRateAndTemperature (double T_out, double current_time)
std::vector< double > calcThermalResistances (double const Nu_inner_pipe, double const Nu_annulus_pipe, int const section_index=0) 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
void updateHeatTransferCoefficients (double const flow_rate)
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 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

void assignVelocities (double inner_vel, double annulus_vel) override
std::vector< double > getThermalResistances (double const &R_gs, double const &R_ff, double const &R_fg) const override

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
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
std::array< double, 2 > velocities () const
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::BHECommonCoaxial
PipeConfigurationCoaxial const _pipes
double cross_section_area_inner_pipe
double cross_section_area_annulus
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_CXC()

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

Definition at line 32 of file BHE_CXC.h.

38 : BHECommonCoaxial{borehole, refrigerant,
40 pipes, use_python_bcs}
41 {
42 // Initialize thermal resistances.
43 auto values = visit(
44 [&](auto const& control)
45 {
46 return control(refrigerant.reference_temperature,
47 0. /* initial time */);
48 },
50 updateHeatTransferCoefficients(values.flow_rate);
51 }
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:72
FlowAndTemperatureControl const flowAndTemperatureControl
Definition BHECommon.h:74

References ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::BHECommonCoaxial(), ProcessLib::HeatTransportBHE::BHE::BHECommon::flowAndTemperatureControl, ProcessLib::HeatTransportBHE::BHE::BHECommon::grout, ProcessLib::HeatTransportBHE::BHE::BHECommon::refrigerant, ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::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_CXC::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 64 of file BHE_CXC.h.

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

References OGS_FATAL.

◆ assignVelocities()

void ProcessLib::HeatTransportBHE::BHE::BHE_CXC::assignVelocities ( double inner_vel,
double annulus_vel )
inlineoverrideprivatevirtual

Assigns _flow_velocities from the physical channel velocities. Subclasses encode which channel maps to which unknown.

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

Definition at line 124 of file BHE_CXC.h.

125 {
126 // CXC: unknown 0 = inner pipe (inflow), unknown 1 = annulus (outflow)
127 _flow_velocities = {inner_vel, annulus_vel};
128 }

References ProcessLib::HeatTransportBHE::BHE::BHECommon::_flow_velocities.

◆ crossSectionAreas()

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

◆ getThermalResistances()

std::vector< double > ProcessLib::HeatTransportBHE::BHE::BHE_CXC::getThermalResistances ( double const & R_gs,
double const & R_ff,
double const & R_fg ) const
inlineoverrideprivatevirtual

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

Definition at line 130 of file BHE_CXC.h.

133 {
134 return {R_ff, R_fg, R_gs};
135 }

◆ withGeometry()


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