OGS
BHECommonCoaxial.h
Go to the documentation of this file.
1
10#pragma once
11
12#include <Eigen/Core>
13#include <optional>
14
15#include "BHECommon.h"
18
19namespace ProcessLib
20{
21namespace HeatTransportBHE
22{
23namespace BHE
24{
26{
27public:
28 BHECommonCoaxial(BoreholeGeometry const& borehole,
32 PipeConfigurationCoaxial const& pipes,
33 bool const use_python_bcs);
34
35 static constexpr int number_of_unknowns = 3;
36 static constexpr int number_of_grout_zones = 1;
37
38 double thermalResistance(int const unknown_index) const
39 {
40 return _thermal_resistances[unknown_index];
41 }
42
43 double updateFlowRateAndTemperature(double T_out, double current_time);
44
45 std::array<double, number_of_unknowns> calcThermalResistances(
46 double const Nu_inner_pipe, double const Nu_annulus_pipe) const;
47
48 std::array<double, number_of_unknowns> pipeHeatCapacities() const;
49
50 static constexpr std::pair<int, int> inflow_outflow_bc_component_ids[] = {
51 {0, 1}};
52
53 static std::array<std::pair<std::size_t /*node_id*/, int /*component*/>, 2>
55 std::size_t const top_node_id,
56 std::size_t const /*bottom_node_id*/,
57 int const in_component_id);
58
59 static std::optional<
60 std::array<std::pair<std::size_t /*node_id*/, int /*component*/>, 2>>
61 getBHEBottomDirichletBCNodesAndComponents(std::size_t const bottom_node_id,
62 int const in_component_id,
63 int const out_component_id);
64
65 std::array<double, number_of_unknowns> pipeHeatConductions() const;
66
67 std::array<Eigen::Vector3d, number_of_unknowns> pipeAdvectionVectors(
68 Eigen::Vector3d const& /*elem_direction*/) const;
69
72
73 void updateHeatTransferCoefficients(double const flow_rate);
74
75protected:
77
78 virtual std::array<double, 2> velocities() const = 0;
79
80 virtual std::array<double, number_of_unknowns> getThermalResistances(
81 double const& R_gs, double const& R_ff, double const& R_fg) const = 0;
82
88 std::array<double, number_of_unknowns> _thermal_resistances;
89
91 double _flow_velocity_inner = std::numeric_limits<double>::quiet_NaN(),
92 _flow_velocity_annulus = std::numeric_limits<double>::quiet_NaN();
93};
94} // namespace BHE
95} // namespace HeatTransportBHE
96} // end of namespace ProcessLib
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)
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
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.
static constexpr std::pair< int, int > inflow_outflow_bc_component_ids[]
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)
double thermalResistance(int const unknown_index) const
std::array< double, number_of_unknowns > _thermal_resistances
std::variant< TemperatureCurveConstantFlow, TemperatureCurveFlowCurve, FixedPowerConstantFlow, FixedPowerFlowCurve, PowerCurveConstantFlow, PowerCurveFlowCurve, BuildingPowerCurveConstantFlow > FlowAndTemperatureControl
RefrigerantProperties const refrigerant
Definition BHECommon.h:42
FlowAndTemperatureControl const flowAndTemperatureControl
Definition BHECommon.h:44