modelInternalHEXTwoUTube
Extends from Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.BaseClasses.PartialInternalHEX (Partial model to implement the internal heat exchanger of a borehole segment), Buildings.Fluid.Interfaces.EightPortHeatMassExchanger (Model transporting four fluid streams between eight ports with storing mass or energy).
Information
Model for the heat transfer between the fluid and within the borehole filling. This model computes the dynamic response of the fluid in the tubes, the heat transfer between the fluid and the borehole filling, and the heat storage within the fluid and the borehole filling.
This model computes the different thermal resistances present in a single-U-tube borehole using the method of Bauer et al. (2011) and computing explicitely the fluid-to-ground thermal resistance Rb and the grout-to-grout resistance Ra as defined by Claesson and Hellstrom (2011) using the multipole method.
References
J. Claesson and G. Hellstrom. Multipole method to calculate borehole thermal resistances in a borehole heat exchanger. HVAC&R Research, 17(6): 895-911, 2011.
D. Bauer, W. Heidemann, H. Müller-Steinhagen, and H.-J. G. Diersch. Thermal resistance and capacity models for borehole heat exchangers . International Journal Of Energy Research, 35:312-320, 2011.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Fluid.Geothermal.Borefields.Data.Borefield.Template | borFieDat (from PartialInternalHEX) | Borefield parameters | |
| Real | mSenFac (from PartialInternalHEX) | 1 | Factor for scaling the sensible thermal mass of the volume |
| Modelica.Units.SI.Length | hSeg (from PartialInternalHEX) | Length of the internal heat exchanger | |
| Modelica.Units.SI.Volume | VTubSeg (from PartialInternalHEX) | hSeg*Modelica.Constants.pi*(borFieDat.conDat.rTub - borFieDat.conDat.eTub)^2 | Fluid volume in each tube |
| Boolean | homotopyInitialization (from EightPortHeatMassExchanger) | true | = true, use homotopy method |
| Initialization | |||
| Modelica.Units.SI.Temperature | TFlu_start (from PartialInternalHEX) | Start value of fluid temperature | |
| Modelica.Units.SI.Temperature | TGro_start (from PartialInternalHEX) | Start value of grout temperature | |
| Assumptions | |||
| Boolean | allowFlowReversal1 (from EightPort) | true | = true to allow flow reversal in medium 1, false restricts to design direction (port_a -> port_b) |
| Boolean | allowFlowReversal2 (from EightPort) | true | = true to allow flow reversal in medium 2, false restricts to design direction (port_a -> port_b) |
| Boolean | allowFlowReversal3 (from EightPort) | true | = true to allow flow reversal in medium 3, false restricts to design direction (port_a -> port_b) |
| Boolean | allowFlowReversal4 (from EightPort) | true | = true to allow flow reversal in medium 4, false restricts to design direction (port_a -> port_b) |
| Advanced › Initialization | |||
| Modelica.Units.SI.SpecificEnthalpy | h_outflow_a1_start (from EightPort) | Medium1.h_default | Start value for enthalpy flowing out of port a1 |
| Modelica.Units.SI.SpecificEnthalpy | h_outflow_b1_start (from EightPort) | Medium1.h_default | Start value for enthalpy flowing out of port b1 |
| Modelica.Units.SI.SpecificEnthalpy | h_outflow_a2_start (from EightPort) | Medium2.h_default | Start value for enthalpy flowing out of port a2 |
| Modelica.Units.SI.SpecificEnthalpy | h_outflow_b2_start (from EightPort) | Medium2.h_default | Start value for enthalpy flowing out of port b2 |
| Modelica.Units.SI.SpecificEnthalpy | h_outflow_a3_start (from EightPort) | Medium3.h_default | Start value for enthalpy flowing out of port a1 |
| Modelica.Units.SI.SpecificEnthalpy | h_outflow_b3_start (from EightPort) | Medium3.h_default | Start value for enthalpy flowing out of port b1 |
| Modelica.Units.SI.SpecificEnthalpy | h_outflow_a4_start (from EightPort) | Medium4.h_default | Start value for enthalpy flowing out of port a1 |
| Modelica.Units.SI.SpecificEnthalpy | h_outflow_b4_start (from EightPort) | Medium4.h_default | Start value for enthalpy flowing out of port b1 |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m1_flow_nominal (from PartialEightPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.MassFlowRate | m2_flow_nominal (from PartialEightPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.MassFlowRate | m3_flow_nominal (from PartialEightPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.MassFlowRate | m4_flow_nominal (from PartialEightPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.Pressure | dp1_nominal (from EightPortFlowResistanceParameters) | Pressure difference | |
| Modelica.Units.SI.Pressure | dp2_nominal (from EightPortFlowResistanceParameters) | Pressure difference | |
| Modelica.Units.SI.Pressure | dp3_nominal (from EightPortFlowResistanceParameters) | Pressure difference | |
| Modelica.Units.SI.Pressure | dp4_nominal (from EightPortFlowResistanceParameters) | Pressure difference | |
| Advanced | |||
| Medium1.MassFlowRate | m1_flow_small (from PartialEightPortInterface) | 1E-4*abs(m1_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Medium2.MassFlowRate | m2_flow_small (from PartialEightPortInterface) | 1E-4*abs(m2_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Medium3.MassFlowRate | m3_flow_small (from PartialEightPortInterface) | 1E-4*abs(m3_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Medium4.MassFlowRate | m4_flow_small (from PartialEightPortInterface) | 1E-4*abs(m4_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialEightPortInterface) | false | = true, if actual temperature at port is computed |
| Flow resistance › Medium 1 | |||
| Boolean | computeFlowResistance1 (from EightPortFlowResistanceParameters) | true | =true, compute flow resistance. Set to false to assume no friction |
| Boolean | from_dp1 (from EightPortFlowResistanceParameters) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n1 (from EightPortFlowResistanceParameters) | 2 | Flow exponent for side 1, n=1 for laminar, n=2 for turbulent |
| Boolean | linearizeFlowResistance1 (from EightPortFlowResistanceParameters) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM1 (from EightPortFlowResistanceParameters) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Flow resistance › Medium 2 | |||
| Boolean | computeFlowResistance2 (from EightPortFlowResistanceParameters) | true | =true, compute flow resistance. Set to false to assume no friction |
| Boolean | from_dp2 (from EightPortFlowResistanceParameters) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n2 (from EightPortFlowResistanceParameters) | 2 | Flow exponent for side 2, n=1 for laminar, n=2 for turbulent |
| Boolean | linearizeFlowResistance2 (from EightPortFlowResistanceParameters) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM2 (from EightPortFlowResistanceParameters) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Flow resistance › Medium 3 | |||
| Boolean | computeFlowResistance3 (from EightPortFlowResistanceParameters) | true | =true, compute flow resistance. Set to false to assume no friction |
| Boolean | from_dp3 (from EightPortFlowResistanceParameters) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n3 (from EightPortFlowResistanceParameters) | 2 | Flow exponent for side 3, n=1 for laminar, n=2 for turbulent |
| Boolean | linearizeFlowResistance3 (from EightPortFlowResistanceParameters) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM3 (from EightPortFlowResistanceParameters) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Flow resistance › Medium 4 | |||
| Boolean | computeFlowResistance4 (from EightPortFlowResistanceParameters) | true | =true, compute flow resistance. Set to false to assume no friction |
| Boolean | from_dp4 (from EightPortFlowResistanceParameters) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n4 (from EightPortFlowResistanceParameters) | 2 | Flow exponent for side 4, n=1 for laminar, n=2 for turbulent |
| Boolean | linearizeFlowResistance4 (from EightPortFlowResistanceParameters) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM4 (from EightPortFlowResistanceParameters) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Dynamics › Nominal condition | |||
| Modelica.Units.SI.Time | tau1 (from EightPortHeatMassExchanger) | 30 | Time constant at nominal flow |
| Modelica.Units.SI.Time | tau2 (from EightPortHeatMassExchanger) | 30 | Time constant at nominal flow |
| Modelica.Units.SI.Time | tau3 (from EightPortHeatMassExchanger) | 30 | Time constant at nominal flow |
| Modelica.Units.SI.Time | tau4 (from EightPortHeatMassExchanger) | 30 | Time constant at nominal flow |
| Dynamics › Conservation equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from EightPortHeatMassExchanger) | Modelica.Fluid.Types.Dynamics.DynamicFreeInitial | Formulation of energy balance |
| Initialization › Medium 1 | |||
| Medium1.AbsolutePressure | p1_start (from EightPortHeatMassExchanger) | Medium1.p_default | Start value of pressure |
| Medium1.Temperature | T1_start (from EightPortHeatMassExchanger) | Medium1.T_default | Start value of temperature |
| Medium1.MassFraction[Medium1.nX] | X1_start (from EightPortHeatMassExchanger) | Medium1.X_default | Start value of mass fractions m_i/m |
| Medium1.ExtraProperty[Medium1.nC] | C1_start (from EightPortHeatMassExchanger) | fill(0, Medium1.nC) | Start value of trace substances |
| Medium1.ExtraProperty[Medium1.nC] | C1_nominal (from EightPortHeatMassExchanger) | fill(1E-2, Medium1.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
| Initialization › Medium 2 | |||
| Medium2.AbsolutePressure | p2_start (from EightPortHeatMassExchanger) | Medium2.p_default | Start value of pressure |
| Medium2.Temperature | T2_start (from EightPortHeatMassExchanger) | Medium2.T_default | Start value of temperature |
| Medium2.MassFraction[Medium2.nX] | X2_start (from EightPortHeatMassExchanger) | Medium2.X_default | Start value of mass fractions m_i/m |
| Medium2.ExtraProperty[Medium2.nC] | C2_start (from EightPortHeatMassExchanger) | fill(0, Medium2.nC) | Start value of trace substances |
| Medium2.ExtraProperty[Medium2.nC] | C2_nominal (from EightPortHeatMassExchanger) | fill(1E-2, Medium2.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
| Initialization › Medium 3 | |||
| Medium3.AbsolutePressure | p3_start (from EightPortHeatMassExchanger) | Medium3.p_default | Start value of pressure |
| Medium3.Temperature | T3_start (from EightPortHeatMassExchanger) | Medium3.T_default | Start value of temperature |
| Medium3.MassFraction[Medium3.nX] | X3_start (from EightPortHeatMassExchanger) | Medium3.X_default | Start value of mass fractions m_i/m |
| Medium3.ExtraProperty[Medium3.nC] | C3_start (from EightPortHeatMassExchanger) | fill(0, Medium3.nC) | Start value of trace substances |
| Medium3.ExtraProperty[Medium3.nC] | C3_nominal (from EightPortHeatMassExchanger) | fill(1E-2, Medium3.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
| Initialization › Medium 4 | |||
| Medium4.AbsolutePressure | p4_start (from EightPortHeatMassExchanger) | Medium4.p_default | Start value of pressure |
| Medium4.Temperature | T4_start (from EightPortHeatMassExchanger) | Medium4.T_default | Start value of temperature |
| Medium4.MassFraction[Medium4.nX] | X4_start (from EightPortHeatMassExchanger) | Medium4.X_default | Start value of mass fractions m_i/m |
| Medium4.ExtraProperty[Medium4.nC] | C4_start (from EightPortHeatMassExchanger) | fill(0, Medium4.nC) | Start value of trace substances |
| Medium4.ExtraProperty[Medium4.nC] | C4_nominal (from EightPortHeatMassExchanger) | fill(1E-2, Medium4.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | port_wall (from PartialInternalHEX) | Thermal connection for borehole wall | |
| Modelica.Fluid.Interfaces.FluidPort_a | port_a1 (from EightPort) | Fluid connector a1 (positive design flow direction is from port_a1 to port_b1) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b1 (from EightPort) | Fluid connector b1 (positive design flow direction is from port_a1 to port_b1) | |
| Modelica.Fluid.Interfaces.FluidPort_a | port_a2 (from EightPort) | Fluid connector a2 (positive design flow direction is from port_a2 to port_b2) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b2 (from EightPort) | Fluid connector b2 (positive design flow direction is from port_a2 to port_b2) | |
| Modelica.Fluid.Interfaces.FluidPort_a | port_a3 (from EightPort) | Fluid connector a1 (positive design flow direction is from port_a3 to port_b3) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b3 (from EightPort) | Fluid connector b2 (positive design flow direction is from port_a3 to port_b3) | |
| Modelica.Fluid.Interfaces.FluidPort_a | port_a4 (from EightPort) | Fluid connector a1 (positive design flow direction is from port_a4 to port_b4) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b4 (from EightPort) | Fluid connector b2 (positive design flow direction is from port_a4 to port_b4) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Medium1.MassFlowRate | m1_flow (from PartialEightPortInterface) | port_a1.m_flow | Mass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction) |
| Modelica.Units.SI.Pressure | dp1 (from PartialEightPortInterface) | port_a1.p - port_b1.p | Pressure difference between port_a1 and port_b1 |
| Medium2.MassFlowRate | m2_flow (from PartialEightPortInterface) | port_a2.m_flow | Mass flow rate from port_a2 to port_b2 (m2_flow > 0 is design flow direction) |
| Modelica.Units.SI.Pressure | dp2 (from PartialEightPortInterface) | port_a2.p - port_b2.p | Pressure difference between port_a2 and port_b2 |
| Medium3.MassFlowRate | m3_flow (from PartialEightPortInterface) | port_a3.m_flow | Mass flow rate from port_a3 to port_b3 (m3_flow > 0 is design flow direction) |
| Modelica.Units.SI.Pressure | dp3 (from PartialEightPortInterface) | port_a3.p - port_b3.p | Pressure difference between port_a3 and port_b3 |
| Medium4.MassFlowRate | m4_flow (from PartialEightPortInterface) | port_a4.m_flow | Mass flow rate from port_a4 to port_b4 (m4_flow > 0 is design flow direction) |
| Modelica.Units.SI.Pressure | dp4 (from PartialEightPortInterface) | port_a4.p - port_b4.p | Pressure difference between port_a4 and port_b4 |
| Medium1.ThermodynamicState | sta_a1 (from PartialEightPortInterface) | if allowFlowReversal1 then Medium1.setState_phX(port_a1.p, noEvent(actualStream(port_a1.h_outflow)), noEvent(actualStream(port_a1.Xi_outflow))) else Medium1.setState_phX(port_a1.p, inStream(port_a1.h_outflow), inStream(port_a1.Xi_outflow)) | Medium properties in port_a1 |
| Medium1.ThermodynamicState | sta_b1 (from PartialEightPortInterface) | if allowFlowReversal1 then Medium1.setState_phX(port_b1.p, noEvent(actualStream(port_b1.h_outflow)), noEvent(actualStream(port_b1.Xi_outflow))) else Medium1.setState_phX(port_b1.p, port_b1.h_outflow, port_b1.Xi_outflow) | Medium properties in port_b1 |
| Medium2.ThermodynamicState | sta_a2 (from PartialEightPortInterface) | if allowFlowReversal2 then Medium2.setState_phX(port_a2.p, noEvent(actualStream(port_a2.h_outflow)), noEvent(actualStream(port_a2.Xi_outflow))) else Medium2.setState_phX(port_a2.p, inStream(port_a2.h_outflow), inStream(port_a2.Xi_outflow)) | Medium properties in port_a2 |
| Medium2.ThermodynamicState | sta_b2 (from PartialEightPortInterface) | if allowFlowReversal2 then Medium2.setState_phX(port_b2.p, noEvent(actualStream(port_b2.h_outflow)), noEvent(actualStream(port_b2.Xi_outflow))) else Medium2.setState_phX(port_b2.p, port_b2.h_outflow, port_b2.Xi_outflow) | Medium properties in port_b2 |
| Medium3.ThermodynamicState | sta_a3 (from PartialEightPortInterface) | if allowFlowReversal3 then Medium3.setState_phX(port_a3.p, noEvent(actualStream(port_a3.h_outflow)), noEvent(actualStream(port_a3.Xi_outflow))) else Medium3.setState_phX(port_a3.p, inStream(port_a3.h_outflow), inStream(port_a3.Xi_outflow)) | Medium properties in port_a3 |
| Medium3.ThermodynamicState | sta_b3 (from PartialEightPortInterface) | if allowFlowReversal3 then Medium3.setState_phX(port_b3.p, noEvent(actualStream(port_b3.h_outflow)), noEvent(actualStream(port_b3.Xi_outflow))) else Medium3.setState_phX(port_b3.p, port_b3.h_outflow, port_b3.Xi_outflow) | Medium properties in port_b3 |
| Medium4.ThermodynamicState | sta_a4 (from PartialEightPortInterface) | if allowFlowReversal4 then Medium4.setState_phX(port_a4.p, noEvent(actualStream(port_a4.h_outflow)), noEvent(actualStream(port_a4.Xi_outflow))) else Medium4.setState_phX(port_a4.p, inStream(port_a4.h_outflow), inStream(port_a4.Xi_outflow)) | Medium properties in port_a4 |
| Medium4.ThermodynamicState | sta_b4 (from PartialEightPortInterface) | if allowFlowReversal4 then Medium4.setState_phX(port_b4.p, noEvent(actualStream(port_b4.h_outflow)), noEvent(actualStream(port_b4.Xi_outflow))) else Medium4.setState_phX(port_b4.p, port_b4.h_outflow, port_b4.Xi_outflow) | Medium properties in port_b4 |
| Modelica.Units.SI.HeatFlowRate | Q1_flow (from EightPortHeatMassExchanger) | vol1.heatPort.Q_flow | Heat flow rate into medium 1 |
| Modelica.Units.SI.HeatFlowRate | Q2_flow (from EightPortHeatMassExchanger) | vol2.heatPort.Q_flow | Heat flow rate into medium 2 |
| Modelica.Units.SI.HeatFlowRate | Q3_flow (from EightPortHeatMassExchanger) | vol3.heatPort.Q_flow | Heat flow rate into medium 1 |
| Modelica.Units.SI.HeatFlowRate | Q4_flow (from EightPortHeatMassExchanger) | vol4.heatPort.Q_flow | Heat flow rate into medium 2 |
| Buildings.Fluid.MixingVolumes.MixingVolume | vol1 (from EightPortHeatMassExchanger) | Volume for fluid 1 | |
| Buildings.Fluid.MixingVolumes.MixingVolume | vol2 (from EightPortHeatMassExchanger) | Volume for fluid 2 | |
| Buildings.Fluid.MixingVolumes.MixingVolume | vol3 (from EightPortHeatMassExchanger) | Volume for fluid 3 | |
| Buildings.Fluid.MixingVolumes.MixingVolume | vol4 (from EightPortHeatMassExchanger) | Volume for fluid 4 | |
| Buildings.Fluid.FixedResistances.PressureDrop | preDro1 (from EightPortHeatMassExchanger) | Pressure drop model for fluid 1 | |
| Buildings.Fluid.FixedResistances.PressureDrop | preDro2 (from EightPortHeatMassExchanger) | Pressure drop model for fluid 2 | |
| Buildings.Fluid.FixedResistances.PressureDrop | preDro3 (from EightPortHeatMassExchanger) | Pressure drop model for fluid 3 | |
| Buildings.Fluid.FixedResistances.PressureDrop | preDro4 (from EightPortHeatMassExchanger) | Pressure drop model for fluid 4 | |
| Modelica.Blocks.Sources.RealExpression | RVol1 | Convective and thermal resistance at fluid 1 | |
| Modelica.Blocks.Sources.RealExpression | RVol2 | Convective and thermal resistance at fluid 2 | |
| Modelica.Blocks.Sources.RealExpression | RVol3 | Convective and thermal resistance at fluid 1 | |
| Modelica.Blocks.Sources.RealExpression | RVol4 | Convective and thermal resistance at fluid 1 | |
| Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.BaseClasses.InternalResistancesTwoUTube | intRes2UTub | Internal resistances for a double U-tube configuration | |
| Modelica.Thermal.HeatTransfer.Components.ConvectiveResistor | RConv1 | Pipe convective resistance | |
| Modelica.Thermal.HeatTransfer.Components.ConvectiveResistor | RConv2 | Pipe convective resistance | |
| Modelica.Thermal.HeatTransfer.Components.ConvectiveResistor | RConv3 | Pipe convective resistance | |
| Modelica.Thermal.HeatTransfer.Components.ConvectiveResistor | RConv4 | Pipe convective resistance |
Revisions
-
August 3, 2026, by Michael Wetter:
Removed duplicate emptyDiagramannotation. -
May 17, 2024, by Michael Wetter:
Updated model due to removal of parameterdynFil.
This is for IBPSA, #1885. -
November 22, 2023, by Michael Wetter:
Corrected use ofgetInstanceName()which was called inside a function which is not allowed.
This is for IBPSA, #1814. -
March 7, 2022, by Michael Wetter:
RemovedmassDynamics.
This is for #1542. -
February 28, 2022, by Massimo Cimmino:
RemovedprintDebugparameter from call to Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.BaseClasses.Functions.internalResistancesTwoUTube.
This is for IBPSA, #1582. -
July 10, 2018, by Alex Laferrière:
Updated documentation following major changes to the Buildings.Fluid.HeatExchangers.Ground package. Additionally, implemented a partial InternalHex model. -
June 18, 2014, by Michael Wetter:
Added initialization for temperatures and derivatives ofcapFil1andcapFil2to avoid a warning during translation. -
February 14, 2014, by Michael Wetter:
Removed unused parametersB0andB1. -
January 24, 2014, by Michael Wetter:
Revised implementation, added comments, replacedHeatTransfer.Windows.BaseClasses.ThermalConductorwith resistance models from the Modelica Standard Library. -
January 23, 2014, by Damien Picard:
First implementation.