Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation
Package with functions for load aggregation
Information
This package contains functions for load aggregation. For further information, consult the documentation of Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.GroundTemperatureResponse.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
aggregationCellTimes | Function which builds the time and cell width vectors for aggregation |
aggregationWeightingFactors | Calculates the kappa vector for load aggregation |
countAggregationCells | Function which returns the number of aggregation cells in the aggregation vector |
shiftAggregationCells | Performs the shifting operation for load aggregation and determines the current cell |
temperatureResponseMatrix | Reads and possibly writes a matrix with a time series of the borefield's temperature response |
temporalSuperposition | Performs temporal superposition for the load aggregation procedure |
Validation | Validation models for LoadAggregation |
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.aggregationCellTimes
Function which builds the time and cell width vectors for aggregation
Information
Simultaneously constructs both the nu
vector, which is the
aggregation time of each cell, and the rCel
vector, which
is the temporal size of each cell normalized with the time resolution of load
aggregation tLoaAgg
.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Integer | i | Size of time vector | |
Real | lvlBas | Base for growth between each level, e.g. 2 | |
Integer | nCel | Number of cells of same size per level | |
Time | tLoaAgg | tLoaAgg( ... | Time resolution of load aggregation [s] |
Time | timFin | Total simulation max length [s] |
Outputs
Type | Name | Description |
---|---|---|
Time | nu[i] | Time vector nu of size i [s] |
Real | rCel[i] | Cell width vector of size i [1] |
Modelica definition
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.aggregationWeightingFactors
Calculates the kappa vector for load aggregation
Information
This function uses spline interpolation to construct the weighting factors
vector kappa
using the aggregation times nu
and the
temperature step reponse (a time-series in the form of a matrix) of the
borefield as an input.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Integer | i | Size of aggregation vector | |
Integer | nTimTot | Size of g-function time table | |
ThermalResistance | TStep[nTimTot, 2] | Time matrix with TStep [K/W] | |
Time | nu[i] | Aggregation time vector nu [s] |
Outputs
Type | Name | Description |
---|---|---|
ThermalResistance | kappa[i] | Weighting factors vector [K/W] |
Modelica definition
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.countAggregationCells
Function which returns the number of aggregation cells in the aggregation vector
Information
Function that counts the required length of the aggregation time vector
nu
and of the weighting factor vectors kappa
based on
the maximum time for calculations related to the ground temperature response.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Real | lvlBas | Base for growth between each level, e.g. 2 | |
Integer | nCel | nCel( min... | Number of cells of same size per level |
Time | timFin | Total simulation max length [s] | |
Time | tLoaAgg | Time resolution of load aggregation [s] |
Outputs
Type | Name | Description |
---|---|---|
Integer | i | Size of aggregation vectors |
Modelica definition
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.shiftAggregationCells
Performs the shifting operation for load aggregation and determines the current cell
Information
Performs the shifting operation which propagates the thermal load history towards the more distant aggregation cells, and then sets the current cell's value at 0. Additionally, this function also outputs the last filled load aggregation cell.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Integer | i | Number of aggregation cells | |
HeatFlowRate | QAgg_flow[i] | Vector of aggregated loads [W] | |
Real | rCel[i] | rCel( eac... | Aggregation cell widths |
Time | nu[i] | Cell aggregation times [s] | |
Time | curTim | Current simulation time [s] |
Outputs
Type | Name | Description |
---|---|---|
Integer | curCel | Current occupied aggregation cell |
HeatFlowRate | QAggShi_flow[i] | Shifted vector of aggregated loads [W] |
Modelica definition
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.temperatureResponseMatrix
Reads and possibly writes a matrix with a time series of the borefield's temperature response
Information
This function uses the parameters required to calculate the borefield's thermal
response to build a SHA1-encrypted string unique to the borefield in question.
Then, if the forceGFunCalc
input is true
or if
there is no .mat
file with the SHA1 hash as its filename in the
tmp/temperatureResponseMatrix
folder,
the thermal response will be calculated and written as a
.mat
file. Otherwise, the
thermal response will simply be read from the
.mat
file. In the .mat
file, the data
is saved in a matrix with the name TStep
, where the first column is
the time (in seconds) and the second column is the temperature step response,
which is the g-function divided by 2 π H ksoi, with
H
being the borehole length and ksoi being the thermal
conductivity of the soil.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Integer | nBor | Number of boreholes | |
Real | cooBor[nBor, 2] | Borehole coordinates | |
Height | hBor | Borehole length [m] | |
Height | dBor | Borehole buried depth [m] | |
Radius | rBor | Borehole radius [m] | |
ThermalDiffusivity | aSoi | Thermal diffusivity of soil [m2/s] | |
ThermalConductivity | kSoi | Thermal conductivity of soil [W/(m.K)] | |
Integer | nSeg | Number of line source segments per borehole | |
Integer | nTimSho | Number of time steps in short time region | |
Integer | nTimLon | Number of time steps in long time region | |
Integer | nTimTot | Number of g-function points | |
Real | ttsMax | Maximum non-dimensional time for g-function calculation | |
String | sha | SHA-1 encryption of the g-function arguments | |
Boolean | forceGFunCalc | Set to true to force the thermal response to be calculated at the start |
Outputs
Type | Name | Description |
---|---|---|
ThermalResistance | TStep[nTimTot, 2] | Temperature step-response time series [K/W] |
Modelica definition
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.temporalSuperposition
Performs temporal superposition for the load aggregation procedure
Information
Performs the temporal superposition operation to obtain the temperature change
at the borehole wall at the current time step, which is the scalar product of
the aggregated load vector and the kappa
step response vector. To
avoid unnecessary calculations, the current aggregation cell in the simulation
is used to truncate the values from the vectors that are not required.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Integer | i | Number of aggregation cells | |
HeatFlowRate | QAgg_flow[i] | Vector of aggregated loads [W] | |
ThermalResistance | kappa[i] | Weighting factors for each aggregation cell [K/W] | |
Integer | curCel | Current occupied aggregation cell |
Outputs
Type | Name | Description |
---|---|---|
TemperatureDifference | deltaTb | Delta T at wall [K] |