diff --git a/AixLib/ThermalZones/ReducedOrder/Multizone/BaseClasses/MultizonePostProcessing.mo b/AixLib/ThermalZones/ReducedOrder/Multizone/BaseClasses/MultizonePostProcessing.mo index 2ac1d14666..5102897c64 100644 --- a/AixLib/ThermalZones/ReducedOrder/Multizone/BaseClasses/MultizonePostProcessing.mo +++ b/AixLib/ThermalZones/ReducedOrder/Multizone/BaseClasses/MultizonePostProcessing.mo @@ -1,4 +1,4 @@ -within AixLib.ThermalZones.ReducedOrder.Multizone.BaseClasses; +within AixLib.ThermalZones.ReducedOrder.Multizone.BaseClasses; model MultizonePostProcessing "Calculates and outputs values of interest for multizone model" parameter Modelica.SIunits.Volume VAir @@ -169,6 +169,22 @@ model MultizonePostProcessing VAir) if calc_rel_humidity "Average relative humidity of all zones" annotation (Placement(transformation(extent={{58,48},{74,64}}))); + Modelica.Blocks.Interfaces.RealOutput QIntGains[numZones,3]( + final quantity="Energy", + final unit="J", + displayUnit="kWh") + "Heat gains based on internal gains for each zone from persons, machines, and light" + annotation (Placement(transformation(extent={{100,-122},{120,-102}}), + iconTransformation(extent={{100,-130},{120,-110}}))); + Modelica.Blocks.Interfaces.RealInput QIntGains_flow[numZones,3](final + quantity="HeatFlowRate", final unit="W") + "Heat flow based on internal gains for each zone from persons, machines, and light" + annotation ( + Placement(transformation(extent={{-140,-140},{-100,-100}}), + iconTransformation(extent={{-140,-140},{-100,-100}}))); + Modelica.Blocks.Continuous.Integrator QIntGainCalc[numZones,3] + "Heat gain based on internal gains for each zone from persons, machines, and light" + annotation (Placement(transformation(extent={{58,-124},{74,-108}}))); equation connect(TAirAverageCalc.u, TAir) annotation (Line(points={{56.4,96},{56.4,100}, {-120,100}}, color={0,0,127})); @@ -237,9 +253,14 @@ equation {15.5,42},{15.5,56},{56.4,56}}, color={0,0,127})); connect(RelHumditiyMeanCalc.y, RelHumidityMean) annotation (Line(points={{74.8,56}, {88,56},{88,60},{110,60}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ + connect(QIntGains_flow, QIntGainCalc.u) annotation (Line(points={{-120,-120}, + {-32,-120},{-32,-116},{56.4,-116}}, color={0,0,127})); + connect(QIntGainCalc.y, QIntGains) annotation (Line(points={{74.8,-116},{92, + -116},{92,-112},{110,-112}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -120},{100,100}}), graphics={ Rectangle( - extent={{-100,100},{100,-100}}, + extent={{-100,100},{100,-120}}, lineColor={28,108,200}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), @@ -279,7 +300,8 @@ equation Ellipse(extent={{2,-64},{10,-70}}, lineColor={28,108,200}), Ellipse(extent={{12,-54},{20,-60}}, lineColor={28,108,200})}), Diagram( - coordinateSystem(preserveAspectRatio=false)), + coordinateSystem(preserveAspectRatio=false, extent={{-100,-120},{100, + 100}})), Documentation(info="

This model is used to simplify the post processing. It's purpose is to calculate and output common simulation information and KPI for diff --git a/AixLib/ThermalZones/ReducedOrder/Multizone/BaseClasses/PartialMultizone.mo b/AixLib/ThermalZones/ReducedOrder/Multizone/BaseClasses/PartialMultizone.mo index e5908f532c..a24412b127 100644 --- a/AixLib/ThermalZones/ReducedOrder/Multizone/BaseClasses/PartialMultizone.mo +++ b/AixLib/ThermalZones/ReducedOrder/Multizone/BaseClasses/PartialMultizone.mo @@ -176,12 +176,22 @@ partial model PartialMultizone "Partial model for multizone models" annotation ( Placement(transformation(extent={{100,-70},{120,-50}}),iconTransformation( extent={{80,-100},{100,-80}}))); + Modelica.Blocks.Interfaces.RealOutput QIntGains_flow[numZones,3](final + quantity="HeatFlowRate", final unit="W") if ASurTot > 0 or VAir > 0 + "Heat flow based on internal gains for each zone from persons, machines, and light" + annotation (Placement(transformation(extent={{100,-90},{ + 120,-70}}), iconTransformation(extent={{80,-100},{100,-80}}))); equation // if ASurTot or VAir < 0 PHeater and PCooler are set to dummy value zero if not (ASurTot > 0 or VAir > 0) then PHeater[:] = fill(0, numZones); PCooler[:] = fill(0, numZones); + else + for i in 1:numZones loop + connect(zone[i].QIntGains_flow, QIntGains_flow[i, :]); + end for; end if; + // if ideal heating and/or cooling is set by seperate values if (ASurTot > 0 or VAir > 0) and not recOrSep then if Heater_on then diff --git a/AixLib/ThermalZones/ReducedOrder/ThermalZone/ThermalZone.mo b/AixLib/ThermalZones/ReducedOrder/ThermalZone/ThermalZone.mo index 82f7755a2e..17dfc9e852 100644 --- a/AixLib/ThermalZones/ReducedOrder/ThermalZone/ThermalZone.mo +++ b/AixLib/ThermalZones/ReducedOrder/ThermalZone/ThermalZone.mo @@ -304,6 +304,20 @@ model ThermalZone "Thermal zone containing moisture balance" "Mass fraction of co2 in ROM in kg_CO2/ kg_TotalAir" annotation (Placement(transformation(extent={{-8,-74},{10,-60}}))); + BoundaryConditions.SolarIrradiation.DiffusePerez HDifTilRoof[zoneParam.nOrientationsRoof]( + each final outSkyCon=false, + each final outGroCon=false, + each final lat=zoneParam.lat, + final azi=zoneParam.aziRoof, + final til=zoneParam.tiltRoof) + "Calculates diffuse solar radiation on titled surface for roof" + annotation (Placement(transformation(extent={{-84,61},{-68,77}}))); + Modelica.Blocks.Interfaces.RealOutput QIntGains_flow[3](each final quantity="HeatFlowRate", + each final unit="W") if ATot > 0 + "Heat flow based on internal gains from persons, machines, and light" + annotation ( + Placement(transformation(extent={{100,-50},{120,-30}}), + iconTransformation(extent={{100,-50},{120,-30}}))); // protected: ThermalZone protected Modelica.Blocks.Sources.Constant hConRoof(final k=(zoneParam.hConRoofOut + zoneParam.hRadRoof)*zoneParam.ARoof) @@ -382,15 +396,22 @@ protected (ATot > 0 or zoneParam.VAir > 0) and use_moisture_balance annotation (Placement(transformation(extent={{-70,-58},{-60,-42}}))); -public - BoundaryConditions.SolarIrradiation.DiffusePerez HDifTilRoof[zoneParam.nOrientationsRoof]( - each final outSkyCon=false, - each final outGroCon=false, - each final lat=zoneParam.lat, - final azi=zoneParam.aziRoof, - final til=zoneParam.tiltRoof) - "Calculates diffuse solar radiation on titled surface for roof" - annotation (Placement(transformation(extent={{-84,61},{-68,77}}))); + // protected: Outputs + Modelica.Blocks.Sources.RealExpression QIntGainsInternalDep_flow[3](y={-lights.convHeat.Q_flow + - lights.radHeat.Q_flow,-machinesSenHea.radHeat.Q_flow - + machinesSenHea.convHeat.Q_flow, -humanSenHeaDependent.radHeat.Q_flow - + humanSenHeaDependent.convHeat.Q_flow}) if ATot > 0 and internalGainsMode == 1 + annotation (Placement(transformation(extent={{94,-46},{98,-34}}))); + Modelica.Blocks.Sources.RealExpression QIntGainsInternalInd_flow[3](y={-lights.convHeat.Q_flow + - lights.radHeat.Q_flow,-machinesSenHea.radHeat.Q_flow - + machinesSenHea.convHeat.Q_flow, -humanSenHeaIndependent.radHeat.Q_flow - + humanSenHeaIndependent.convHeat.Q_flow}) if ATot > 0 and internalGainsMode == 2 + annotation (Placement(transformation(extent={{94,-46},{98,-34}}))); + Modelica.Blocks.Sources.RealExpression QIntGainsInternalTot_flow[3](y={-lights.convHeat.Q_flow + - lights.radHeat.Q_flow,-machinesSenHea.radHeat.Q_flow - + machinesSenHea.convHeat.Q_flow, -humanTotHeaDependent.radHeat.Q_flow - + humanTotHeaDependent.convHeat.Q_flow}) if ATot > 0 and internalGainsMode == 3 + annotation (Placement(transformation(extent={{94,-46},{98,-34}}))); Utilities.Psychrometrics.MixedHumidity mixedHumidity if (ATot > 0 or zoneParam.VAir > 0) and use_AirExchange and use_moisture_balance "Mixes humidity of infiltration flow and mechanical ventilation flow" @@ -721,6 +742,12 @@ equation index=-1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); + connect(QIntGainsInternalDep_flow.y, QIntGains_flow) annotation (Line(points={{98.2, + -40},{110,-40}}, color={0,0,127})); + connect(QIntGainsInternalInd_flow.y, QIntGains_flow) annotation (Line(points={{98.2, + -40},{110,-40}}, color={0,0,127})); + connect(QIntGainsInternalTot_flow.y, QIntGains_flow) annotation (Line(points={{98.2, + -40},{110,-40}}, color={0,0,127})); annotation (Documentation(revisions="