Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation

Validation models for LoadAggregation

Information

This package contains validation models for the classes in Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.AggregationCellTimes AggregationCellTimes This validation case shows the construction of the aggregation time and size vectors
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.AggregationWeightingFactors AggregationWeightingFactors This validation case verifies the calculation of the weighting factors kappa
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.CountAggregationCells CountAggregationCells This validation case verifies the counting of the required length of aggregation vectors
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.ShiftAggregationCells ShiftAggregationCells This validation case test the cell shifting procedure
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.TemperatureResponseMatrix TemperatureResponseMatrix This validation case test the calculation, writing and reading of the temperature step response
Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.TemporalSuperposition TemporalSuperposition This validation case applies temporal superposition with truncated vectors

Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.AggregationCellTimes Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.AggregationCellTimes

This validation case shows the construction of the aggregation time and size vectors

Information

This validation case builds the aggregation vectors (rCel and nu) for a fictional case with 6 cells, built in 3 layers of 2 cells which double in size each level. The timFin input to the function called is lower than the aggregation time of the 6th cell, and the 6th cell must therefore be truncated from a size of 4 to a size of 2.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
Integeri6Number of aggregation cells
TimetLoaAgg10Time resolution of load aggregation [s]

Modelica definition

model AggregationCellTimes "This validation case shows the construction of the aggregation time and size vectors" extends Modelica.Icons.Example; parameter Integer i = 6 "Number of aggregation cells"; parameter Modelica.Units.SI.Time tLoaAgg=10 "Time resolution of load aggregation"; final parameter Modelica.Units.SI.Time[i] nu(each fixed=false) "Time vector for load aggregation"; final parameter Modelica.Units.SI.Time[i] rCel(each fixed=false) "Cell widths"; Modelica.Units.SI.Time nu_error; Modelica.Units.SI.Time rCel_error "Error on chosen values"; initial equation (nu,rCel) = Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.aggregationCellTimes( i=i, lvlBas=2, nCel=2, tLoaAgg=tLoaAgg, timFin=12*tLoaAgg); equation nu_error = 100.0-nu[i-1]; rCel_error = 2.0-rCel[i]; end AggregationCellTimes;

Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.AggregationWeightingFactors Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.AggregationWeightingFactors

This validation case verifies the calculation of the weighting factors kappa

Information

This validation case uses the first few values of a borehole temperature reponse time series to construct the weighting factors kappa. The aggregation cells are chosen such that there is a change in levels (and therefore a doubling in the size of the cells) from cell 5 to 6. Therefore, kappa[5] is lower than kappa[4] and kappa[7] is lower than kappa[6], but kappa[6] is higher than kappa[5].

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
RealtimSer[6, 2][0, 0; 0.999999999999999, 7....Complete time matrix with TStep

Modelica definition

model AggregationWeightingFactors "This validation case verifies the calculation of the weighting factors kappa" extends Modelica.Icons.Example; parameter Real[6,2] timSer= [0, 0; 0.999999999999999, 7.96581783184631e-06; 2.30986142530843, 1.36683711896241e-05; 4.02559837881946, 1.89652463558340e-05; 6.27297603019976, 2.43435015306157e-05; 9.21672932384307, 3.00295537091117e-05] "Complete time matrix with TStep"; Modelica.Units.SI.ThermalResistance[10] kappa "Weight factor for each aggregation cell"; equation kappa = Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.aggregationWeightingFactors( i=10, nTimTot=6, TStep=timSer, nu=cat(1,linspace(0.4,2,5),linspace(2.8,6,5))); end AggregationWeightingFactors;

Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.CountAggregationCells Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.CountAggregationCells

This validation case verifies the counting of the required length of aggregation vectors

Information

This validation case counts the required length of the aggregation vectors for the same fictional case as in Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.AggregationCellTimes.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model CountAggregationCells "This validation case verifies the counting of the required length of aggregation vectors" extends Modelica.Icons.Example; Integer i "Number of aggregation cells"; equation i = Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.countAggregationCells( lvlBas=2, nCel=2, timFin=120, tLoaAgg=10); end CountAggregationCells;

Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.ShiftAggregationCells Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.ShiftAggregationCells

This validation case test the cell shifting procedure

Information

This validation case replicates the load-shifting procedure illustred in the figure below by Cimmino (2014).

image

References

Cimmino, M. 2014. Développement et validation expérimentale de facteurs de réponse thermique pour champs de puits géothermiques, Ph.D. Thesis, École Polytechnique de Montréal.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model ShiftAggregationCells "This validation case test the cell shifting procedure" extends Modelica.Icons.Example; discrete Integer curCel "Current occupied cell"; discrete Modelica.Units.SI.HeatFlowRate[5] QAggShi_flow "Shifted vector of aggregated loads"; initial equation curCel=3; QAggShi_flow={1,3,2,0,0}; equation when (sample(4, 1)) then (curCel,QAggShi_flow) = Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.shiftAggregationCells( i=5, QAgg_flow=pre(QAggShi_flow), rCel={1,1,1,2,2}, nu={1,2,3,5,7}, curTim=time); end when; end ShiftAggregationCells;

Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.TemperatureResponseMatrix Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.TemperatureResponseMatrix

This validation case test the calculation, writing and reading of the temperature step response

Information

This validation case calculates the g-function for a defined single borehole, turns it into a temperature step response, saves it as "TemperatureResponseMatrix_validationTStep.mat", reads this .mat file and shows the evolution of the temperature step reponse over the course of the first year.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TimetimSer[26 + 50, 2]Buildings.Fluid.Geothermal.B...Resulting temperature response matrix [s]

Modelica definition

model TemperatureResponseMatrix "This validation case test the calculation, writing and reading of the temperature step response" extends Modelica.Icons.Example; parameter Modelica.Units.SI.Time timSer[26 + 50,2]= Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.temperatureResponseMatrix( nBor=1, cooBor={{0,0}}, hBor=150, dBor=4, rBor=0.075, aSoi=1e-6, kSoi=3, nSeg=12, nTimSho=26, nTimLon=50, nTimTot=26 + 50, ttsMax=exp(5), sha="TemperatureResponseMatrix_validation", forceGFunCalc=true) "Resulting temperature response matrix"; Modelica.Units.SI.ThermalResistance TStep "Temperature step response"; equation TStep = Modelica.Math.Vectors.interpolate(timSer[:,1],timSer[:,2],time); end TemperatureResponseMatrix;

Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.TemporalSuperposition Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.Validation.TemporalSuperposition

This validation case applies temporal superposition with truncated vectors

Information

This validation case uses a fictional load profile and weighting factors to ensure that the temporal superposition is correctly done. The curCel input to the function called truncates the vectors involved in the scalar product such that the large load in the QAgg_flow vector mustn't affect the final result.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureDifferencesupPosBuildings.Fluid.Geothermal.B...Temporal superposition [K]

Modelica definition

model TemporalSuperposition "This validation case applies temporal superposition with truncated vectors" extends Modelica.Icons.Example; parameter Modelica.Units.SI.TemperatureDifference supPos= Buildings.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.temporalSuperposition( i=6, QAgg_flow={2,1e6,3,1e6,1e6}, kappa={0.4,0,0.2,1,0}, curCel=3) "Temporal superposition"; Modelica.Units.SI.TemperatureDifference supPosErr; equation supPosErr = abs((2*0.4+3*0.2)-supPos); end TemporalSuperposition;