21namespace HeatTransportBHE
30 bool const use_python_bcs)
31 :
BHECommon{borehole, refrigerant, grout, flowAndTemperatureControl,
39 [&](
auto const& control) {
57 rho_r * specific_heat_capacity,
58 (1.0 - porosity_g) * rho_g * heat_cap_g,
78 (1.0 - porosity_g) * lambda_g,
82std::array<Eigen::Vector3d, BHE_1P::number_of_unknowns>
87 Eigen::Vector3d adv_vector = rho_r * Cp_r *
_flow_velocity * elem_direction;
97 return (1 - chi) * R_g;
115 constexpr double pi = std::numbers::pi;
122 double const R_adv_i1 = 1.0 / (Nu * lambda_r * pi);
127 (2.0 * pi * lambda_p);
133 double const chi = std::log(std::sqrt(D * D + pipe_outside_diameter *
134 pipe_outside_diameter) /
135 std::sqrt(2) / pipe_outside_diameter) /
136 std::log(D / pipe_outside_diameter);
138 std::log(D / pipe_outside_diameter) / 2 / (pi * lambda_g);
140 double const R_con_b = chi * R_g;
146 double const R_fg = R_adv_i1 + R_con_a + R_con_b;
148 return {{R_fg, R_gs}};
151std::array<std::pair<std::size_t ,
int >, 2>
153 std::size_t
const top_node_id,
154 std::size_t
const bottom_node_id,
155 int const in_component_id)
157 return {std::make_pair(top_node_id, in_component_id),
158 std::make_pair(bottom_node_id, in_component_id)};
162 std::array<std::pair<std::size_t ,
int >, 2>>
178 double const current_time)
181 visit([&](
auto const& control) {
return control(T_out, current_time); },
184 return values.temperature;
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)
PipeConfiguration1PType const _pipe
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
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
ThermoMechanicalFlowProperties calculateThermoMechanicalFlowPropertiesPipe(Pipe const &pipe, double const length, RefrigerantProperties const &fluid, double const flow_rate)
RefrigerantProperties const refrigerant
GroutParameters const grout
FlowAndTemperatureControl const flowAndTemperatureControl
BoreholeGeometry const borehole_geometry
double const longitudinal_dispersion_length
double outsideArea() const
Area of the pipe's outside including the wall thickness.
double outsideDiameter() const
double const wall_thermal_conductivity
double area() const
Area of the pipe's inside without the wall.
double const thermal_conductivity
double const specific_heat_capacity
double const reference_temperature