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 32 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)
std::array< double, number_of_unknownscrossSectionAreas (ParameterLib::SpatialPosition const &pos) 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)
std::array< double, number_of_flow_legsflowLegs () const
double updateFlowRateAndTemperature (double T_out, double current_time)
std::vector< double > calcThermalResistances (double const Nu_inner_pipe, double const Nu_annulus_pipe, ParameterLib::SpatialPosition const &pos) const
std::vector< double > thermalResistances (ParameterLib::SpatialPosition const &pos) 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 &elem_direction) 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

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 int number_of_flow_legs = 2
static constexpr std::pair< int, int > inflow_outflow_bc_component_ids []
Protected Attributes inherited from ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial
PipeConfigurationCoaxial const _pipes
double cross_section_area_inner_pipe
double cross_section_area_annulus
double velocity_inner = 0.0
double velocity_annulus = 0.0
double cached_nu_inner = 0.0
double cached_nu_annulus = 0.0

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 35 of file BHE_CXC.h.

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

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.

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 59 of file BHE_CXC.h.

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

References OGS_FATAL.

◆ assignVelocities()

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

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

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

Definition at line 121 of file BHE_CXC.h.

122 {
123 // CXC: unknown 0 = inner pipe (inflow), unknown 1 = annulus (outflow)
124 velocity_inner = inner_vel;
125 velocity_annulus = annulus_vel;
126 }

References ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::velocity_annulus, and ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::velocity_inner.

◆ crossSectionAreas()

std::array< double, number_of_unknowns > ProcessLib::HeatTransportBHE::BHE::BHE_CXC::crossSectionAreas ( ParameterLib::SpatialPosition const & pos) const
inline

Definition at line 109 of file BHE_CXC.h.

111 {
112 double const D = sampleStrictPositive(borehole_geometry.diameter, 0.0,
113 pos, "borehole_diameter");
114 double const borehole_area = Pipe::circleArea(D);
116 checkedGroutArea(borehole_area, _pipes.outer_pipe.outsideArea(),
117 pos)};
118 }
double sampleStrictPositive(ParameterLib::Parameter< double > const &param, double const t, ParameterLib::SpatialPosition const &pos, std::string_view const param_role)
double checkedGroutArea(double const borehole_area_fraction, double const pipe_outside_area, ParameterLib::SpatialPosition const &pos)
static double circleArea(double const d)
Definition Pipe.h:46

References ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::_pipes, ProcessLib::HeatTransportBHE::BHE::BHECommon::borehole_geometry, ProcessLib::HeatTransportBHE::BHE::checkedGroutArea(), ProcessLib::HeatTransportBHE::BHE::Pipe::circleArea(), ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::cross_section_area_annulus, ProcessLib::HeatTransportBHE::BHE::BHECommonCoaxial::cross_section_area_inner_pipe, and ProcessLib::HeatTransportBHE::BHE::sampleStrictPositive().

◆ 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 128 of file BHE_CXC.h.

131 {
132 return {R_ff, R_fg, R_gs};
133 }

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