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
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nHp | 2 | Number of HP (excluding polyvalent HP) |
| Integer | nPhp | 2 | Number of polyvalent HP |
| Integer | nSta | nHp + nPhp | Number of cooling or heating stages (excluding stage 0) |
| Real | capHeaHp_nominal | 1E5 | Design heating capacity - Each heat pump (excluding polyvalent HP) |
| Real | capCooHp_nominal | (1 - 1/Buildings.Templates.Data.Defaults.COPHpAwHea)*capHeaHp_nominal | Design cooling capacity - Each heat pump (excluding polyvalent HP) |
| Real | capHeaPhp_nominal | 1.3E5 | Design heating capacity - Each polyvalent heat pump |
| Real | capCooPhp_nominal | (1 - 1/Buildings.Templates.Data.Defaults.COPHpAwHea)*capHeaPhp_nominal | Design cooling capacity - Each polyvalent heat pump |
| Real | capHeaShcPhp_nominal | Buildings.Templates.Data.Defaults.COPHpWwHea/Buildings.Templates.Data.Defaults.COPHpAwHea*capHeaPhp_nominal | Design heating capacity in SHC mode - Each polyvalent heat pump |
| Real | capCooShcPhp_nominal | (1 - 1/Buildings.Templates.Data.Defaults.COPHpWwHea)*capHeaShcPhp_nominal | Design cooling capacity in SHC mode - Each polyvalent heat pump |
| Real[nSta + 1,nSta + 1] | capCooSta_nominal | staPhp.nHpCoo*capCooHp_nominal .+ staPhp.nPhpCoo*capCooPhp_nominal .+ staPhp.nPhpShc*capCooShcPhp_nominal | Cooling capacity at each stage |
| Real[nSta + 1,nSta + 1] | capHeaSta_nominal | staPhp.nHpHea*capHeaHp_nominal .+ staPhp.nPhpHea*capHeaPhp_nominal .+ staPhp.nPhpShc*capHeaShcPhp_nominal | Heating 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
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.StagingParameters | staPhp | Staging parameters | |
| Buildings.Controls.OBC.CDL.Integers.Sources.TimeTable | iHea | ||
| Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.ExtractStagingMatrix | extSta | Extract cooling staging matrix at given heating stage | |
| Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.ExtractStagingMatrix | extStaTra | Extract transpose of cooling staging matrix at given heating stage |
Revisions
-
July 3, 2026, by Antoine Gautier:
Added documentation.