19namespace HeatTransportBHE
29 bool const use_python_bcs)
30 :
BHECommon{borehole, refrigerant, grout, flowAndTemperatureControl,
43std::array<double, BHECommonCoaxial::number_of_unknowns>
52 return {{ rho_r * specific_heat_capacity,
53 rho_r * specific_heat_capacity,
54 (1.0 - porosity_g) * rho_g * heat_cap_g}};
58 double const current_time)
61 visit([&](
auto const& control) {
return control(T_out, current_time); },
64 return values.temperature;
66std::array<double, BHECommonCoaxial::number_of_unknowns>
82 (lambda_r + rho_r * Cp_r * alpha_L * std::abs(v[0])),
84 (lambda_r + rho_r * Cp_r * alpha_L * std::abs(v[1])),
86 (1.0 - porosity_g) * lambda_g}};
89std::array<Eigen::Vector3d, BHECommonCoaxial::number_of_unknowns>
91 Eigen::Vector3d
const& elem_direction)
const
98 rho_r * Cp_r * std::abs(v[0]) * elem_direction,
100 -rho_r * Cp_r * std::abs(v[1]) * elem_direction,
105std::array<double, BHECommonCoaxial::number_of_unknowns>
107 double const Nu_annulus_pipe)
const
123 double const R_gs = R.grout_soil;
126 double const R_ff = R_advective.inner_pipe_coaxial + R_advective.a_annulus +
127 R_conductive.inner_pipe_coaxial;
129 R_advective.b_annulus + R_conductive.annulus + R.conductive_b;
134std::array<std::pair<std::size_t ,
int >, 2>
136 std::size_t
const top_node_id,
138 int const in_component_id)
140 return {std::make_pair(top_node_id, in_component_id),
141 std::make_pair(top_node_id, in_component_id + 1)};
145 std::array<std::pair<std::size_t ,
int >, 2>>
147 std::size_t
const bottom_node_id,
int const in_component_id,
148 int const out_component_id)
150 return {{std::make_pair(bottom_node_id, in_component_id),
151 std::make_pair(bottom_node_id, out_component_id)}};
156 auto const tm_flow_properties_annulus =
172 tm_flow_properties_annulus.nusselt_number);
virtual std::array< double, number_of_unknowns > getThermalResistances(double const &R_gs, double const &R_ff, double const &R_fg) const =0
virtual std::array< double, 2 > velocities() const =0
double updateFlowRateAndTemperature(double T_out, double current_time)
BHECommonCoaxial(BoreholeGeometry const &borehole, RefrigerantProperties const &refrigerant, GroutParameters const &grout, FlowAndTemperatureControl const &flowAndTemperatureControl, PipeConfigurationCoaxial const &pipes, bool const use_python_bcs)
void updateHeatTransferCoefficients(double const flow_rate)
std::array< double, number_of_unknowns > pipeHeatConductions() const
std::array< double, number_of_unknowns > pipeHeatCapacities() const
std::array< double, number_of_unknowns > calcThermalResistances(double const Nu_inner_pipe, double const Nu_annulus_pipe) const
double cross_section_area_annulus
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)
double _flow_velocity_inner
Flow velocity inside the pipes and annulus. Depends on the flow_rate.
double cross_section_area_inner_pipe
std::array< Eigen::Vector3d, number_of_unknowns > pipeAdvectionVectors(Eigen::Vector3d const &) const
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)
std::array< double, number_of_unknowns > _thermal_resistances
double _flow_velocity_annulus
PipeConfigurationCoaxial const _pipes
double cross_section_area_grout
PipeWallThermalResistanceCoaxial calculatePipeWallThermalResistance(Pipe const &inner_pipe, Pipe const &outer_pipe)
ThermoMechanicalFlowProperties calculateThermoMechanicalFlowPropertiesAnnulus(Pipe const &inner_pipe, Pipe const &outer_pipe, double const length, RefrigerantProperties const &fluid, double const flow_rate)
AdvectiveThermalResistanceCoaxial calculateAdvectiveThermalResistance(Pipe const &inner_pipe, Pipe const &outer_pipe, RefrigerantProperties const &fluid, double const Nu_inner_pipe, double const Nu_annulus)
std::variant< TemperatureCurveConstantFlow, TemperatureCurveFlowCurve, FixedPowerConstantFlow, FixedPowerFlowCurve, PowerCurveConstantFlow, PowerCurveFlowCurve, BuildingPowerCurveConstantFlow > FlowAndTemperatureControl
GroutAndGroutSoilExchangeThermalResistanceCoaxial calculateGroutAndGroutSoilExchangeThermalResistance(Pipe const &outer_pipe, GroutParameters const &grout_parameters, double const borehole_diameter)
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 area() const
Area of the pipe's inside without the wall.
double const thermal_conductivity
double const specific_heat_capacity