Skip to content

Commit

Permalink
31 add hydraulic modules based on bdh and bagarella (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
FWuellhorst authored Apr 17, 2024
2 parents 4444ce0 + d88b31e commit adaffe7
Show file tree
Hide file tree
Showing 331 changed files with 7,882 additions and 3,939 deletions.
4 changes: 2 additions & 2 deletions BESMod/Examples/BAUSimStudy/Buildings/package.order
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Case_1_standard
Case_1_retrofit
Case_2_standard
Case_1_standard
Case_2_retrofit
Case_2_standard
75 changes: 35 additions & 40 deletions BESMod/Examples/BAUSimStudy/PartialCase.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,91 +2,86 @@ within BESMod.Examples.BAUSimStudy;
partial model PartialCase
extends Systems.BaseClasses.PartialBuildingEnergySystem(
redeclare BESMod.Systems.Electrical.DirectGridConnectionSystem electrical,
redeclare Systems.Demand.Building.TEASERThermalZone building(redeclare
BESMod.Systems.Demand.Building.RecordsCollection.RefAachen oneZoneParam(
heaLoadFacGrd=0, heaLoadFacOut=0),
hBui=sum(building.zoneParam.VAir)^(1/3),
ABui=sum(building.zoneParam.VAir)^(2/3)),
redeclare Systems.Demand.Building.TEASERThermalZone building(
redeclare BESMod.Systems.Demand.Building.RecordsCollection.RefAachen
oneZoneParam(heaLoadFacGrd=0, heaLoadFacOut=0),
hBui=sum(building.zoneParam.VAir)^(1/3),
ABui=sum(building.zoneParam.VAir)^(2/3)),
redeclare BESMod.Systems.Control.NoControl control,
redeclare BESMod.Systems.Hydraulical.HydraulicSystem hydraulic(
redeclare Systems.Hydraulical.Generation.HeatPumpAndHeatingRod generation(
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover pumpData,
redeclare Systems.Hydraulical.Generation.HeatPumpAndElectricHeater generation(
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover parPum,
redeclare package Medium_eva = AixLib.Media.Air,
redeclare
BESMod.Systems.Hydraulical.Generation.RecordsCollection.DefaultHP
heatPumpParameters(
parHeaPum(
genDesTyp=BESMod.Systems.Hydraulical.Generation.Types.GenerationDesign.BivalentPartParallel,
TBiv=TBiv,
scalingFactor=hydraulic.generation.heatPumpParameters.QPri_flow_nominal
/5000,
scalingFactor=hydraulic.generation.parHeaPum.QPri_flow_nominal/5000,
dpCon_nominal=0,
dpEva_nominal=0,
use_refIne=false,
refIneFre_constant=0),
redeclare
BESMod.Systems.Hydraulical.Generation.RecordsCollection.DefaultHR
heatingRodParameters,
BESMod.Systems.Hydraulical.Generation.RecordsCollection.DefaultElectricHeater
parEleHea,
redeclare model PerDataMainHP =
AixLib.DataBase.HeatPump.PerformanceData.VCLibMap (
QCon_flow_nominal=hydraulic.generation.heatPumpParameters.QPri_flow_nominal,
QCon_flow_nominal=hydraulic.generation.parHeaPum.QPri_flow_nominal,
refrigerant="Propane",
flowsheet="VIPhaseSeparatorFlowsheet"),
redeclare
BESMod.Systems.RecordsCollection.TemperatureSensors.DefaultSensor
temperatureSensorData),
redeclare Systems.Hydraulical.Control.ConstHys_PI_ConOut_HPSController
control(
parTemSen),
redeclare Systems.Hydraulical.Control.MonoenergeticHeatPumpSystem control(
redeclare
BESMod.Systems.Hydraulical.Control.Components.ThermostaticValveController.ThermostaticValvePIControlled
thermostaticValveController,
valCtrl,
dTHysBui=10,
dTHysDHW=10,
redeclare model DHWHysteresis =
BESMod.Systems.Hydraulical.Control.Components.BivalentOnOffControllers.TimeBasedElectricHeater,
redeclare model BuildingHysteresis =
BESMod.Systems.Hydraulical.Control.Components.BivalentOnOffControllers.TimeBasedElectricHeater,
redeclare
BESMod.Systems.Hydraulical.Control.RecordsCollection.ThermostaticValveDataDefinition
thermostaticValveParameters,
redeclare
BESMod.Systems.Hydraulical.Control.RecordsCollection.DefaultBivHPControl
bivalentControlData(TBiv=TBiv),
redeclare
Systems.Hydraulical.Control.Components.DHWSetControl.ConstTSet_DHW
TSet_DHW,
BESMod.Systems.Hydraulical.Control.RecordsCollection.BasicHeatPumpPI
parPIDHeaPum,
redeclare
BESMod.Systems.Hydraulical.Control.RecordsCollection.DefaultSafetyControl
safetyControl),
redeclare
BESMod.Systems.Hydraulical.Distribution.TwoStoDetailedDirectLoading
distribution(
QHRAftBuf_flow_nominal=0,
use_heatingRodAfterBuffer=false,
QHeaAftBuf_flow_nominal=0,
redeclare
BESMod.Systems.RecordsCollection.TemperatureSensors.DefaultSensor
temperatureSensorData,
parTemSen,
redeclare BESMod.Systems.RecordsCollection.Valves.DefaultThreeWayValve
threeWayValveParameters,
parThrWayVal,
redeclare
BESMod.Systems.Hydraulical.Distribution.RecordsCollection.BufferStorage.DefaultDetailedStorage
bufParameters(
use_QLos=true,
T_m=338.15),
parStoBuf(use_QLos=true, T_m=338.15),
redeclare
BESMod.Systems.Hydraulical.Distribution.RecordsCollection.BufferStorage.DefaultDetailedStorage
dhwParameters(
parStoDHW(
dTLoadingHC1=10,
use_QLos=true,
T_m=65 + 273.15),
redeclare
BESMod.Systems.Hydraulical.Generation.RecordsCollection.DefaultHR
heatingRodAftBufParameters),
BESMod.Systems.Hydraulical.Generation.RecordsCollection.DefaultElectricHeater
parEleHeaAftBuf),
redeclare BESMod.Systems.Hydraulical.Transfer.RadiatorPressureBased
transfer(
redeclare
BESMod.Systems.Hydraulical.Transfer.RecordsCollection.RadiatorTransferData
radParameters,
parRad,
redeclare
BESMod.Systems.Hydraulical.Transfer.RecordsCollection.SteelRadiatorStandardPressureLossData
transferDataBaseDefinition,
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover pumpData)),
redeclare Systems.Demand.DHW.DHW DHW(
parTra,
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover parPum)),
redeclare Systems.Demand.DHW.StandardProfiles DHW(
redeclare BESMod.Systems.Demand.DHW.RecordsCollection.ProfileM DHWProfile,
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover pumpData,
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover parPum,
redeclare BESMod.Systems.Demand.DHW.TappingProfiles.calcmFlowEquStatic
calcmFlow),
redeclare Systems.UserProfiles.TEASERProfiles userProfiles,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
within BESMod.Examples.UseCaseDesignOptimization;
within BESMod.Examples.DesignOptimization;
record AachenSystem
extends Systems.RecordsCollection.SystemParametersBaseDataDefinition(
use_elecHeating=false,
Expand Down
117 changes: 117 additions & 0 deletions BESMod/Examples/DesignOptimization/BES.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
within BESMod.Examples.DesignOptimization;
model BES
extends Systems.BaseClasses.PartialBuildingEnergySystem(
redeclare BESMod.Systems.Electrical.DirectGridConnectionSystem electrical,
redeclare Systems.Demand.Building.TEASERThermalZone building(
ABui=sum(building.zoneParam.VAir)^(2/3),
hBui=sum(building.zoneParam.VAir)^(1/3),
ARoo=sum(building.zoneParam.ARoof),
redeclare BESMod.Systems.Demand.Building.RecordsCollection.RefAachen
oneZoneParam(heaLoadFacGrd=0, heaLoadFacOut=0)),
redeclare BESMod.Systems.Control.NoControl control,
redeclare BESMod.Systems.Hydraulical.HydraulicSystem hydraulic(
redeclare Systems.Hydraulical.Generation.HeatPumpAndElectricHeater generation(
redeclare model PerDataRevHP =
AixLib.DataBase.Chiller.PerformanceData.PolynomalApproach (redeclare
function PolyData =
AixLib.DataBase.HeatPump.Functions.Characteristics.ConstantCoP
( powerCompressor=2000, CoP=2)),
redeclare
BESMod.Systems.Hydraulical.Components.Frosting.ZhuIceFacCalculation
frost(density=200, redeclare function frostMapFunc =
BESMod.Systems.Hydraulical.Components.Frosting.Functions.ZhuFrostingMapCico),
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover parPum,
redeclare package Medium_eva = AixLib.Media.Air,
redeclare
BESMod.Systems.Hydraulical.Generation.RecordsCollection.DefaultHP
parHeaPum(
genDesTyp=BESMod.Systems.Hydraulical.Generation.Types.GenerationDesign.BivalentPartParallel,
TBiv=parameterStudy.TBiv,
scalingFactor=hydraulic.generation.parHeaPum.QPri_flow_nominal/
parameterStudy.QHP_flow_biv,
dpCon_nominal=0,
dpEva_nominal=0,
use_refIne=false,
refIneFre_constant=0),
redeclare
BESMod.Systems.Hydraulical.Generation.RecordsCollection.DefaultElectricHeater
parEleHea,
redeclare model PerDataMainHP =
AixLib.DataBase.HeatPump.PerformanceData.VCLibMap (
QCon_flow_nominal=hydraulic.generation.parHeaPum.QPri_flow_nominal,
refrigerant="Propane",
flowsheet="VIPhaseSeparatorFlowsheet"),
redeclare
BESMod.Systems.RecordsCollection.TemperatureSensors.DefaultSensor
parTemSen),
redeclare Systems.Hydraulical.Control.MonoenergeticHeatPumpSystem control(
redeclare
BESMod.Systems.Hydraulical.Control.Components.ThermostaticValveController.ThermostaticValvePIControlled
valCtrl,
redeclare model DHWHysteresis =
BESMod.Systems.Hydraulical.Control.Components.BivalentOnOffControllers.PartParallelBivalent
(
TCutOff=parameterStudy.TCutOff,
TBiv=parameterStudy.TBiv,
TOda_nominal=systemParameters.TOda_nominal,
TRoom=systemParameters.TSetZone_nominal[1],
QDem_flow_nominal=systemParameters.QBui_flow_nominal[1],
QHP_flow_cutOff=parameterStudy.QHP_flow_cutOff),
redeclare model BuildingHysteresis =
BESMod.Systems.Hydraulical.Control.Components.BivalentOnOffControllers.PartParallelBivalent
(
TCutOff=parameterStudy.TCutOff,
TBiv=parameterStudy.TBiv,
TOda_nominal=systemParameters.TOda_nominal,
TRoom=systemParameters.TSetZone_nominal[1],
QDem_flow_nominal=systemParameters.QBui_flow_nominal[1],
QHP_flow_cutOff=parameterStudy.QHP_flow_cutOff),
useSGReady=true,
useExtSGSig=false,
redeclare
BESMod.Systems.Hydraulical.Control.RecordsCollection.BasicHeatPumpPI
parPIDHeaPum,
redeclare
BESMod.Systems.Hydraulical.Control.RecordsCollection.DefaultSafetyControl
safetyControl),
redeclare Systems.Hydraulical.Distribution.DistributionTwoStorageParallel
distribution(
redeclare
BESMod.Systems.Hydraulical.Distribution.RecordsCollection.SimpleStorage.DefaultStorage
parStoBuf(
VPerQ_flow=parameterStudy.VPerQFlow,
dTLoadingHC1=0,
energyLabel=BESMod.Systems.Hydraulical.Distribution.Types.EnergyLabel.B),
redeclare
BESMod.Systems.Hydraulical.Distribution.RecordsCollection.SimpleStorage.DefaultStorage
parStoDHW(dTLoadingHC1=10, energyLabel=BESMod.Systems.Hydraulical.Distribution.Types.EnergyLabel.A),
redeclare BESMod.Systems.RecordsCollection.Valves.DefaultThreeWayValve
parThrWayVal),
redeclare Systems.Hydraulical.Transfer.IdealValveRadiator transfer(
redeclare
BESMod.Systems.Hydraulical.Transfer.RecordsCollection.RadiatorTransferData
parRad,
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover parPum,
redeclare
BESMod.Systems.Hydraulical.Transfer.RecordsCollection.SteelRadiatorStandardPressureLossData
parTra)),
redeclare Systems.Demand.DHW.StandardProfiles DHW(
redeclare BESMod.Systems.Demand.DHW.RecordsCollection.ProfileM DHWProfile,
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover parPum,
redeclare BESMod.Systems.Demand.DHW.TappingProfiles.calcmFlowEquStatic
calcmFlow),
redeclare Systems.UserProfiles.TEASERProfiles userProfiles,
redeclare AachenSystem systemParameters,
redeclare ParametersToChange parameterStudy,
redeclare final package MediumDHW = AixLib.Media.Water,
redeclare final package MediumZone = AixLib.Media.Air,
redeclare final package MediumHyd = AixLib.Media.Water,
redeclare BESMod.Systems.Ventilation.NoVentilation ventilation);

extends Modelica.Icons.Example;

annotation (experiment(
StopTime=86400,
Interval=600,
__Dymola_Algorithm="Dassl"));
end BES;
107 changes: 107 additions & 0 deletions BESMod/Examples/DesignOptimization/BESNoDHW.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
within BESMod.Examples.DesignOptimization;
model BESNoDHW "Example to demonstrate usage without DHW"
extends Systems.BaseClasses.PartialBuildingEnergySystem(
redeclare BESMod.Systems.Electrical.DirectGridConnectionSystem electrical,
redeclare Systems.Demand.Building.TEASERThermalZone building(
ABui=sum(building.zoneParam.VAir)^(2/3),
hBui=sum(building.zoneParam.VAir)^(1/3),
ARoo=sum(building.zoneParam.ARoof),
redeclare BESMod.Systems.Demand.Building.RecordsCollection.RefAachen
oneZoneParam(heaLoadFacGrd=0, heaLoadFacOut=0)),
redeclare BESMod.Systems.Control.NoControl control,
redeclare BESMod.Systems.Hydraulical.HydraulicSystem hydraulic(
redeclare Systems.Hydraulical.Generation.HeatPumpAndElectricHeater generation(
redeclare model PerDataRevHP =
AixLib.DataBase.Chiller.PerformanceData.PolynomalApproach (redeclare
function PolyData =
AixLib.DataBase.HeatPump.Functions.Characteristics.ConstantCoP
( powerCompressor=2000, CoP=2)),
redeclare
BESMod.Systems.Hydraulical.Components.Frosting.ZhuIceFacCalculation
frost(density=200, redeclare function frostMapFunc =
BESMod.Systems.Hydraulical.Components.Frosting.Functions.ZhuFrostingMapCico),
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover parPum,
redeclare package Medium_eva = AixLib.Media.Air,
redeclare
BESMod.Systems.Hydraulical.Generation.RecordsCollection.DefaultHP
parHeaPum(
genDesTyp=BESMod.Systems.Hydraulical.Generation.Types.GenerationDesign.BivalentPartParallel,
TBiv=parameterStudy.TBiv,
scalingFactor=hydraulic.generation.parHeaPum.QPri_flow_nominal/
parameterStudy.QHP_flow_biv,
dpCon_nominal=0,
dpEva_nominal=0,
use_refIne=false,
refIneFre_constant=0),
redeclare
BESMod.Systems.Hydraulical.Generation.RecordsCollection.DefaultElectricHeater
parEleHea,
redeclare model PerDataMainHP =
AixLib.DataBase.HeatPump.PerformanceData.VCLibMap (
QCon_flow_nominal=hydraulic.generation.parHeaPum.QPri_flow_nominal,
refrigerant="Propane",
flowsheet="VIPhaseSeparatorFlowsheet"),
redeclare
BESMod.Systems.RecordsCollection.TemperatureSensors.DefaultSensor
parTemSen),
redeclare Systems.Hydraulical.Control.MonoenergeticHeatPumpSystem control(
redeclare
BESMod.Systems.Hydraulical.Control.Components.ThermostaticValveController.ThermostaticValvePIControlled
valCtrl,
redeclare model DHWHysteresis =
BESMod.Systems.Hydraulical.Control.Components.BivalentOnOffControllers.PartParallelBivalent
(
TCutOff=parameterStudy.TCutOff,
TBiv=parameterStudy.TBiv,
TOda_nominal=systemParameters.TOda_nominal,
TRoom=systemParameters.TSetZone_nominal[1],
QDem_flow_nominal=systemParameters.QBui_flow_nominal[1],
QHP_flow_cutOff=parameterStudy.QHP_flow_cutOff),
redeclare model BuildingHysteresis =
BESMod.Systems.Hydraulical.Control.Components.BivalentOnOffControllers.PartParallelBivalent
(
TCutOff=parameterStudy.TCutOff,
TBiv=parameterStudy.TBiv,
TOda_nominal=systemParameters.TOda_nominal,
TRoom=systemParameters.TSetZone_nominal[1],
QDem_flow_nominal=systemParameters.QBui_flow_nominal[1],
QHP_flow_cutOff=parameterStudy.QHP_flow_cutOff),
useSGReady=true,
useExtSGSig=false,
redeclare
BESMod.Systems.Hydraulical.Control.RecordsCollection.BasicHeatPumpPI
parPIDHeaPum,
redeclare
BESMod.Systems.Hydraulical.Control.RecordsCollection.DefaultSafetyControl
safetyControl),
redeclare BESMod.Systems.Hydraulical.Distribution.BuildingOnly
distribution(nParallelDem=1),
redeclare Systems.Hydraulical.Transfer.IdealValveRadiator transfer(
redeclare
BESMod.Systems.Hydraulical.Transfer.RecordsCollection.RadiatorTransferData
parRad,
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover parPum,
redeclare
BESMod.Systems.Hydraulical.Transfer.RecordsCollection.SteelRadiatorStandardPressureLossData
parTra)),
redeclare Systems.Demand.DHW.StandardProfiles DHW(
redeclare BESMod.Systems.Demand.DHW.RecordsCollection.ProfileM DHWProfile,
redeclare BESMod.Systems.RecordsCollection.Movers.DefaultMover parPum,
redeclare BESMod.Systems.Demand.DHW.TappingProfiles.calcmFlowEquStatic
calcmFlow),
redeclare Systems.UserProfiles.TEASERProfiles userProfiles,
redeclare AachenSystem systemParameters(use_ventilation=false, use_dhw=
false),
redeclare ParametersToChange parameterStudy,
redeclare final package MediumDHW = AixLib.Media.Water,
redeclare final package MediumZone = AixLib.Media.Air,
redeclare final package MediumHyd = AixLib.Media.Water,
redeclare BESMod.Systems.Ventilation.NoVentilation ventilation);

extends Modelica.Icons.Example;

annotation (experiment(
StopTime=86400,
Interval=600,
__Dymola_Algorithm="Dassl"));
end BESNoDHW;
20 changes: 20 additions & 0 deletions BESMod/Examples/DesignOptimization/ParametersToChange.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
within BESMod.Examples.DesignOptimization;
record ParametersToChange
extends Systems.RecordsCollection.ParameterStudy.ParameterStudyBaseDefinition;
// 1. Add parameters like this (WITH Evaluate=false)!
// parameter Modelica.SIunits.Volume V=0.5 annotation(Evaluate=false);
// 2. Overwrite the default parameter in the system simulation
// via the graphical interface, resulting in e.g.
// Distribution.parameters.V = parameterStudy.V

parameter Modelica.Units.SI.Temperature TCutOff=263.15 "Cut off temperature"
annotation (Evaluate=false);
parameter Modelica.Units.SI.Temperature TBiv=268.15 "Bivalence temperature"
annotation (Evaluate=false);
parameter Real VPerQFlow=23.5 "Litre of storage volume per kilowatt thermal power demand"
annotation(Evaluate=false);
parameter Modelica.Units.SI.HeatFlowRate QHP_flow_cutOff=3000
annotation (Evaluate=false);
parameter Modelica.Units.SI.HeatFlowRate QHP_flow_biv=4000
annotation (Evaluate=false);
end ParametersToChange;
4 changes: 4 additions & 0 deletions BESMod/Examples/DesignOptimization/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
within BESMod.Examples;
package DesignOptimization "This use case shows the use of BESMod for design optimization"
extends Modelica.Icons.ExamplesPackage;
end DesignOptimization;
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
BES
ParametersToChange
BESNoDHW
AachenSystem
ParametersToChange
Loading

0 comments on commit adaffe7

Please sign in to comment.