modelExtractStagingMatrix

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

Information

This model validates Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.StagingParameters and Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.ExtractStagingMatrix in a configuration with two reversible heat pumps and two polyvalent heat pumps.

The parameters staHea and staCoo independently reconstruct, from the equipment count matrices computed by StagingParameters, the per-mode staging matrices. At initialization, these matrices are compared against the ones internally computed by StagingParameters for every feasible combination of heating and cooling stage, and against each other, which validates the internal consistency of StagingParameters.

The heating stage index is cycled through every stage over the course of the simulation, and is used to extract the cooling staging matrix and its transpose at the current heating stage. At initialization, i.e., at heating stage 0, the extracted matrices are compared against the independently reconstructed reference staCoo, which validates ExtractStagingMatrix for both the direct and the transposed extraction.

Parameters

TypeNameDefaultDescription
IntegernHp2Number of HP (excluding polyvalent HP)
IntegernPhp2Number of polyvalent HP
IntegernStanHp + nPhpNumber of cooling or heating stages (excluding stage 0)
RealcapHeaHp_nominal1E5Design heating capacity - Each heat pump (excluding polyvalent HP)
RealcapCooHp_nominal(1 - 1/Buildings.Templates.Data.Defaults.COPHpAwHea)*capHeaHp_nominalDesign cooling capacity - Each heat pump (excluding polyvalent HP)
RealcapHeaPhp_nominal1.3E5Design heating capacity - Each polyvalent heat pump
RealcapCooPhp_nominal(1 - 1/Buildings.Templates.Data.Defaults.COPHpAwHea)*capHeaPhp_nominalDesign cooling capacity - Each polyvalent heat pump
RealcapHeaShcPhp_nominalBuildings.Templates.Data.Defaults.COPHpWwHea/Buildings.Templates.Data.Defaults.COPHpAwHea*capHeaPhp_nominalDesign heating capacity in SHC mode - Each polyvalent heat pump
RealcapCooShcPhp_nominal(1 - 1/Buildings.Templates.Data.Defaults.COPHpWwHea)*capHeaShcPhp_nominalDesign cooling capacity in SHC mode - Each polyvalent heat pump
Real[nSta + 1,nSta + 1]capCooSta_nominalstaPhp.nHpCoo*capCooHp_nominal .+ staPhp.nPhpCoo*capCooPhp_nominal .+ staPhp.nPhpShc*capCooShcPhp_nominalCooling capacity at each stage
Real[nSta + 1,nSta + 1]capHeaSta_nominalstaPhp.nHpHea*capHeaHp_nominal .+ staPhp.nPhpHea*capHeaPhp_nominal .+ staPhp.nPhpShc*capHeaShcPhp_nominalHeating capacity at each stage
Real[nSta + 1,nSta,nHp + 2*nPhp]staCoo{cat(1, fill(staPhp.nHpCoo[iHea, iCoo + 1]/max(nHp, 1), nHp), fill(staPhp.nPhpCoo[iHea, iCoo + 1]/max(nPhp, 1), nPhp), fill(staPhp.nPhpShc[iHea, iCoo + 1]/max(nPhp, 1), nPhp)) for iCoo in 1:nSta, iHea in 1:nSta + 1}Cooling staging matrix – Varies with heating stage
Real[nSta + 1,nSta,nHp + 2*nPhp]staHea{cat(1, fill(staPhp.nHpHea[iHea + 1, iCoo]/max(nHp, 1), nHp), fill(staPhp.nPhpHea[iHea + 1, iCoo]/max(nPhp, 1), nPhp), fill(staPhp.nPhpShc[iHea + 1, iCoo]/max(nPhp, 1), nPhp)) for iHea in 1:nSta, iCoo in 1:nSta + 1}Heating staging matrix – Varies with cooling stage

Components

TypeNameDefaultDescription
Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.StagingParametersstaPhpStaging parameters
Buildings.Controls.OBC.CDL.Integers.Sources.TimeTableiHea
Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.ExtractStagingMatrixextStaExtract cooling staging matrix at given heating stage
Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.ExtractStagingMatrixextStaTraExtract transpose of cooling staging matrix at given heating stage

Revisions

  • July 3, 2026, by Antoine Gautier:
    Added documentation.