23namespace HeatTransportBHE
57 Eigen::Vector3d
const& elem_direction)
const;
59 template <
int NPoints,
60 typename SingleUnknownMatrixType,
62 typename RPiSMatrixType,
63 typename RSMatrixType>
65 int const idx_bhe_unknowns,
66 Eigen::MatrixBase<SingleUnknownMatrixType>
const& matBHE_loc_R,
67 Eigen::MatrixBase<RMatrixType>& R_matrix,
68 Eigen::MatrixBase<RPiSMatrixType>& R_pi_s_matrix,
69 Eigen::MatrixBase<RSMatrixType>& R_s_matrix)
74 switch (idx_bhe_unknowns)
77 R_matrix.block(0, NPoints, NPoints, NPoints) +=
79 R_matrix.block(NPoints, 0, NPoints, NPoints) +=
82 R_matrix.block(0, 0, NPoints, NPoints) +=
84 R_matrix.block(NPoints, NPoints, NPoints, NPoints) +=
88 R_s_matrix += matBHE_loc_R;
90 R_pi_s_matrix.block(NPoints, 0, NPoints, NPoints) +=
93 R_matrix.block(NPoints, NPoints, NPoints, NPoints) +=
98 "Error!!! In the function BHE_1P::assembleRMatrices, "
99 "the index of bhe resistance term is out of range! ");
114 static std::array<std::pair<std::size_t ,
int >, 2>
116 std::size_t
const bottom_node_id,
117 int const in_component_id);
119 static std::optional<
120 std::array<std::pair<std::size_t ,
int >, 2>>
141 static double compute_R_gs(
double const chi,
double const R_g);
void updateHeatTransferCoefficients(double const flow_rate)
double _flow_velocity
Flow velocity inside the pipes. Depends on the flow_rate.
std::array< double, number_of_unknowns > _thermal_resistances
static double compute_R_gs(double const chi, double const R_g)
std::array< double, number_of_unknowns > calcThermalResistances(double const Nu)
std::array< double, number_of_unknowns > pipeHeatConductions() const
static std::optional< std::array< std::pair< std::size_t, int >, 2 > > getBHEBottomDirichletBCNodesAndComponents(std::size_t const, int const, int const)
double thermalResistance(int const unknown_index) const
PipeConfiguration1PType const _pipe
static constexpr std::pair< int, int > inflow_outflow_bc_component_ids[]
static constexpr int number_of_unknowns
static constexpr int number_of_grout_zones
std::array< double, number_of_unknowns > pipeHeatCapacities() const
BHE_1P(BoreholeGeometry const &borehole, RefrigerantProperties const &refrigerant, GroutParameters const &grout, FlowAndTemperatureControl const &flowAndTemperatureControl, PipeConfiguration1PType const &pipes, bool const use_python_bcs)
std::array< double, number_of_unknowns > crossSectionAreas() const
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)
double updateFlowRateAndTemperature(double T_out, double current_time)
Return the inflow temperature for the boundary condition.
std::array< Eigen::Vector3d, number_of_unknowns > pipeAdvectionVectors(Eigen::Vector3d const &elem_direction) const
static std::array< std::pair< std::size_t, int >, 2 > getBHEInflowDirichletBCNodesAndComponents(std::size_t const top_node_id, std::size_t const bottom_node_id, int const in_component_id)
std::variant< TemperatureCurveConstantFlow, TemperatureCurveFlowCurve, FixedPowerConstantFlow, FixedPowerFlowCurve, PowerCurveConstantFlow, PowerCurveFlowCurve, BuildingPowerCurveConstantFlow > FlowAndTemperatureControl
bool const use_python_bcs
RefrigerantProperties const refrigerant
GroutParameters const grout
FlowAndTemperatureControl const flowAndTemperatureControl