Commit d4af3a29 authored by Dmitry Yu. Naumov's avatar Dmitry Yu. Naumov

Merge branch 'BHE_flow_and_temperature_control' into 'master'

[BHE] Add a new flow and temperature curve control condition and a comment for flow rate in 2U BHE benchmark

See merge request !3125
parents 2a717c29 9f342eb6
Pipeline #1482 passed with stages
in 68 minutes and 55 seconds
It means the flow rate in the pipes varying with time. The flow rate curve should be presented and set as input data. The Flow rate in the curve needs to be offered by using m3/s as its unit.
......@@ -44,6 +44,22 @@ FlowAndTemperatureControl createFlowAndTemperatureControl(
return TemperatureCurveConstantFlow{flow_rate, temperature_curve};
}
if (type == "TemperatureCurveFlowCurve")
{
auto const& flow_rate_curve = *BaseLib::getOrError(
curves,
//! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__TemperatureCurveFlowCurve__flow_rate_curve}
config.getConfigParameter<std::string>("flow_rate_curve"),
"Required flow curve not found.");
auto const& temperature_curve = *BaseLib::getOrError(
curves,
//! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__TemperatureCurveFlowCurve__temperature_curve}
config.getConfigParameter<std::string>("temperature_curve"),
"Required temperature curve not found.");
return TemperatureCurveFlowCurve{flow_rate_curve, temperature_curve};
}
if (type == "FixedPowerConstantFlow")
{
//! \ogs_file_param{prj__processes__process__HEAT_TRANSPORT_BHE__borehole_heat_exchangers__borehole_heat_exchanger__flow_and_temperature_control__FixedPowerConstantFlow__power}
......
......@@ -37,6 +37,18 @@ struct TemperatureCurveConstantFlow
MathLib::PiecewiseLinearInterpolation const& temperature_curve;
};
struct TemperatureCurveFlowCurve
{
FlowAndTemperature operator()(double const /*T_out*/,
double const time) const
{
return {flow_rate_curve.getValue(time),
temperature_curve.getValue(time)};
}
MathLib::PiecewiseLinearInterpolation const& flow_rate_curve;
MathLib::PiecewiseLinearInterpolation const& temperature_curve;
};
struct FixedPowerConstantFlow
{
FlowAndTemperature operator()(double const T_out,
......@@ -106,6 +118,7 @@ struct BuildingPowerCurveConstantFlow
};
using FlowAndTemperatureControl = std::variant<TemperatureCurveConstantFlow,
TemperatureCurveFlowCurve,
FixedPowerConstantFlow,
FixedPowerFlowCurve,
PowerCurveConstantFlow,
......
......@@ -15,8 +15,8 @@
<borehole_heat_exchanger>
<type>2U</type>
<flow_and_temperature_control>
<type>TemperatureCurveConstantFlow</type>
<flow_rate>2.0e-4</flow_rate>
<type>TemperatureCurveFlowCurve</type>
<flow_rate_curve>flow_rate</flow_rate_curve><!-- flow rate within each U-pipe -->
<temperature_curve>inflow_temperature</temperature_curve>
</flow_and_temperature_control>
<borehole>
......@@ -236,6 +236,11 @@
</linear_solver>
</linear_solvers>
<curves>
<curve>
<name>flow_rate</name>
<coords>0 3600</coords>
<values>2.0e-4 2.0e-4</values>
</curve>
<curve>
<name>inflow_temperature</name>
<coords>0 60 120 180 240 300 360 420 480 540 600 1200 1800 2400 3000 3600</coords>
......
......@@ -32,7 +32,7 @@ The numerical model was established based on dual continuum method developed by
## OGS Input Files
The detailed input parameters can be seen from the 3D_2U_BHE.prj file. The inflow temperature of the BHE, which was imposed as boundary condition of the BHE is shown in Figure 1. All the initial temperatures are set as 22 $^{\circ}$C.
The detailed input parameters can be seen from the 3D_2U_BHE.prj file. The inflow temperature of the BHE, which was imposed as boundary condition of the BHE is shown in Figure 1. All the initial temperatures are set as 22 $^{\circ}$C. The flow rate within each U-pipe is set to $2.0\times10^{-4}$ $\mathrm{m^{3} s^{-1}}$ during the whole simulation time.
{{< img src="../3D_2U_BHE_figures/In_out_temperature_comparison.png" width="200">}}
......
......@@ -121,6 +121,8 @@ Four type of flow and temperature control patterns are provided in OGS.
The key word < flow_rate > applies here, along with the curve defined in the < curves >.
* TemperatureCurveConstantFlow:\
It means BHE has a constant < flow_rate > while the inflow temperature following the values defined in the < curves >.
* TemperatureCurveFlowCurve:\
It means both the BHE inflow rate and temperature values are following the corresponding curves.
The unit of < power > is in $\mathrm{W}$ and < flow_rate > is in $\mathrm{m^{3}/s}$. For heating applications, thermal energy is extracted from the subsurface, then a negative power value should be given. It is vice versa for cooling applications.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment