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

Detailed Description

Definition at line 19 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 (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_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 22 of file BHE_CXA.h.

28 : BHECommonCoaxial{borehole, refrigerant,
30 pipes, use_python_bcs}
31 {
32 // Initialize thermal resistances.
33 auto values = visit(
34 [&](auto const& control)
35 {
36 return control(refrigerant.reference_temperature,
37 0. /* initial time */);
38 },
40 updateHeatTransferCoefficients(values.flow_rate);
41 }
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_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 46 of file BHE_CXA.h.

52 {
53 switch (idx_bhe_unknowns)
54 {
55 case 0: // PHI_fig
56 R_matrix.block(0, 2 * NPoints, NPoints, NPoints) +=
57 -1.0 * matBHE_loc_R;
58 R_matrix.block(2 * NPoints, 0, NPoints, NPoints) +=
59 -1.0 * matBHE_loc_R;
60
61 R_matrix.block(0, 0, NPoints, NPoints) +=
62 1.0 * matBHE_loc_R; // K_i
63 R_matrix.block(2 * NPoints,
64 2 * NPoints,
65 NPoints,
66 NPoints) += 1.0 * matBHE_loc_R; // K_ig
67 return;
68 case 1: // 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_i1
76 R_matrix.block(NPoints, NPoints, NPoints, NPoints) +=
77 1.0 * matBHE_loc_R; // K_o
78 return;
79 case 2: // PHI_gs
80 R_s_matrix += matBHE_loc_R;
81
82 R_pi_s_matrix.block(2 * NPoints, 0, NPoints, NPoints) +=
83 -1.0 * matBHE_loc_R;
84
85 R_matrix.block(2 * NPoints, 2 * NPoints, NPoints,
86 NPoints) += matBHE_loc_R; // K_ig
87 return;
88 default:
90 "BHE_CXA::assembleRMatrices: unknown index {:d} "
91 "out of range.",
92 idx_bhe_unknowns);
93 }
94 }
#define OGS_FATAL(...)
Definition Error.h:10

References OGS_FATAL.

◆ assignVelocities()

void ProcessLib::HeatTransportBHE::BHE::BHE_CXA::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 108 of file BHE_CXA.h.

109 {
110 // CXA: unknown 0 = annulus (inflow), unknown 1 = inner pipe (outflow).
111 // velocity_inner stores the velocity for unknown 0, so it must
112 // receive the annulus velocity here.
113 velocity_inner = annulus_vel;
114 velocity_annulus = inner_vel;
115 }

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_CXA::crossSectionAreas ( ParameterLib::SpatialPosition const & pos) const
inline

Definition at line 96 of file BHE_CXA.h.

98 {
99 double const D = sampleStrictPositive(borehole_geometry.diameter, 0.0,
100 pos, "borehole_diameter");
101 double const borehole_area = Pipe::circleArea(D);
103 checkedGroutArea(borehole_area, _pipes.outer_pipe.outsideArea(),
104 pos)};
105 }
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_CXA::getThermalResistances ( double const & R_gs,
double const & R_ff,
double const & R_fg ) const
inlineoverrideprivatevirtual

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

Definition at line 117 of file BHE_CXA.h.

120 {
121 return {R_fg, R_ff, R_gs};
122 }

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