Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue1494: fix missing parameter bindings #1504

Merged
merged 5 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions AixLib/Electrical/Machines/PVInverterRMS.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
within AixLib.Electrical.Machines;
model PVInverterRMS "Inverter model including system management"

parameter Modelica.Units.SI.Power uMax2
parameter Modelica.Units.SI.Power uMax2=3800
"Upper limits of input signals (MaxOutputPower)";
Modelica.Blocks.Interfaces.RealOutput PVPowerRmsW(
final quantity="Power",
Expand Down Expand Up @@ -66,9 +66,6 @@ equation
Line(
points={{-48,-34},{55,-34}},
color={0,0,0})}),
experiment(
StopTime=1,
StartTime=0),
Documentation(revisions="<html><ul>
<li>
<i>October 11, 2016</i> by Tobias Blacha:<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ partial model PartialReversibleVapourCompressionMachine
parameter Boolean use_autoCalc=false
"Enable automatic estimation of volumes and mass flows?"
annotation(choices(checkBox=true), Dialog(descriptionLabel=true));
parameter Modelica.Units.SI.Power Q_useNominal(start=0)
parameter Modelica.Units.SI.Power Q_useNominal=0
"Nominal usable heat flow of the vapour compression machine (HP: Heating; Chiller: Cooling)"
annotation (Dialog(enable=use_autoCalc));
parameter Real scalingFactor=1 "Scaling-factor of vapour compression machine";
Expand Down Expand Up @@ -76,13 +76,13 @@ partial model PartialReversibleVapourCompressionMachine
group="Heat Losses",
tab="Condenser",
enable=use_conCap));
parameter Modelica.Units.SI.ThermalConductance GConOut
parameter Modelica.Units.SI.ThermalConductance GConOut=0
"Constant parameter for heat transfer to the ambient. Represents a sum of thermal resistances such as conductance, insulation and natural convection. If you want to simulate a condenser with additional dry mass but without external heat losses, set the value to zero"
annotation (Evaluate=true, Dialog(
group="Heat Losses",
tab="Condenser",
enable=use_conCap));
parameter Modelica.Units.SI.ThermalConductance GConIns
parameter Modelica.Units.SI.ThermalConductance GConIns=0
"Constant parameter for heat transfer to heat exchangers capacity. Represents a sum of thermal resistances such as forced convection and conduction inside of the capacity"
annotation (Evaluate=true, Dialog(
group="Heat Losses",
Expand Down Expand Up @@ -117,13 +117,13 @@ partial model PartialReversibleVapourCompressionMachine
group="Heat Losses",
tab="Evaporator",
enable=use_evaCap));
parameter Modelica.Units.SI.ThermalConductance GEvaOut
parameter Modelica.Units.SI.ThermalConductance GEvaOut=0
"Constant parameter for heat transfer to the ambient. Represents a sum of thermal resistances such as conductance, insulation and natural convection. If you want to simulate a evaporator with additional dry mass but without external heat losses, set the value to zero"
annotation (Evaluate=true, Dialog(
group="Heat Losses",
tab="Evaporator",
enable=use_evaCap));
parameter Modelica.Units.SI.ThermalConductance GEvaIns
parameter Modelica.Units.SI.ThermalConductance GEvaIns=0
"Constant parameter for heat transfer to heat exchangers capacity. Represents a sum of thermal resistances such as forced convection and conduction inside of the capacity"
annotation (Evaluate=true, Dialog(
group="Heat Losses",
Expand Down Expand Up @@ -788,7 +788,7 @@ equation
<ol>
<li>
<a href=
\"AixLib.Fluid.HeatPumps.BaseClasses.InnerCycle\">InnerCycle</a>
\"AixLib.Fluid.HeatPumps.BaseClasses.InnerCycle_HeatPump\">InnerCycle</a>
(Black Box): Here, the user can use between several input models or
just easily create his own, modular black box model. Please look at
the model description for more info.
Expand Down
2 changes: 1 addition & 1 deletion AixLib/Obsolete/Year2021/Electrical/PVSystem.mo
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ package PVSystem
model PVInverterRMS "Inverter model including system management"
extends AixLib.Obsolete.BaseClasses.ObsoleteModel;

parameter Modelica.Units.SI.Power uMax2
parameter Modelica.Units.SI.Power uMax2=3800
"Upper limits of input signals (MaxOutputPower)";
Modelica.Blocks.Interfaces.RealOutput PVPowerRmsW(
final quantity="Power",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ model Chiller "Base model of FastHVAC Chiller"
group="Heat Losses",
tab="Condenser",
enable=use_ConCap));
parameter Modelica.Units.SI.ThermalConductance GConIns
parameter Modelica.Units.SI.ThermalConductance GConIns=0
"Constant thermal conductance of condenser material" annotation (Evaluate=
true, Dialog(
group="Heat Losses",
Expand Down Expand Up @@ -101,7 +101,7 @@ model Chiller "Base model of FastHVAC Chiller"
group="Heat Losses",
tab="Evaporator",
enable=use_EvaCap));
parameter Modelica.Units.SI.ThermalConductance GEvaIns
parameter Modelica.Units.SI.ThermalConductance GEvaIns=0
"Constant thermal conductance of Evaporator material" annotation (Evaluate=
true, Dialog(
group="Heat Losses",
Expand Down Expand Up @@ -226,12 +226,6 @@ model Chiller "Base model of FastHVAC Chiller"
extent={{6,-6},{-6,6}},
rotation=90,
origin={16,-52})));
Modelica.Blocks.Interfaces.RealInput iceFac_in if not useBusConnectorOnly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this change, this should not impact OM

"Input signal for icing factor"
annotation (Placement(transformation(
extent={{-16,-16},{16,16}},
rotation=90,
origin={-76,-136})));
Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature varTempOutEva
if use_EvaCap "Forces heat losses according to ambient temperature"
annotation (Placement(transformation(
Expand Down Expand Up @@ -381,12 +375,6 @@ equation
-16,-86},{-30,-86},{-30,-86.1},{-43.2,-86.1}}, color={176,0,0}));
connect(senT_b2.enthalpyPort_b, enthalpyPort_b1) annotation (Line(points={{-61,
-86.1},{-82,-86.1},{-82,-60},{-100,-60}}, color={176,0,0}));
connect(iceFac_in, sigBus.iceFacMeas) annotation (Line(points={{-76,-136},{-76,-43},
{-105,-43}}, color={0,0,127}), Text(
string="%second",
index=1,
extent={{-3,6},{-3,6}},
horizontalAlignment=TextAlignment.Right));
connect(innerCycle.QEva, realPassThroughnSetEva.u) annotation (Line(points={{0,
-30.7},{0,-40},{16,-40},{16,-44.8}}, color={0,0,127}));
connect(innerCycle.QEva, heatFlowIneEva.u) annotation (Line(points={{0,-30.7},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ model HeatPump "Base model of FastHVAC Heat Pump"
group="Heat Losses",
tab="Condenser",
enable=use_ConCap));
parameter Modelica.Units.SI.ThermalConductance GConIns
parameter Modelica.Units.SI.ThermalConductance GConIns=0
"Constant thermal conductance of condenser material" annotation (Evaluate=
true, Dialog(
group="Heat Losses",
Expand Down Expand Up @@ -103,7 +103,7 @@ model HeatPump "Base model of FastHVAC Heat Pump"
group="Heat Losses",
tab="Evaporator",
enable=use_EvaCap));
parameter Modelica.Units.SI.ThermalConductance GEvaIns
parameter Modelica.Units.SI.ThermalConductance GEvaIns=0
"Constant thermal conductance of Evaporator material" annotation (Evaluate=
true, Dialog(
group="Heat Losses",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ model PipeBase

parameter Integer nParallel(min=1)=1 "Number of identical parallel pipes"
annotation(Dialog(group="Geometry"));
parameter Modelica.Units.SI.Length length "Length of pipe"
parameter Modelica.Units.SI.Length length=0 "Length of pipe"
annotation (Dialog(group="Geometry"));

parameter AixLib.DataBase.Pipes.PipeBaseDataDefinition parameterPipe=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ model Chiller
annotation (Placement(transformation(extent={{46,-82},{34,-70}})));
Modelica.Blocks.Logical.LogicalSwitch logicalSwitch
annotation (Placement(transformation(extent={{10,-78},{0,-88}})));
Controls.Interfaces.VapourCompressionMachineControlBus sigBus1
annotation (Placement(transformation(extent={{18,-28},{30,-16}}),
iconTransformation(extent={{18,-28},{30,-16}})));
FWuellhorst marked this conversation as resolved.
Show resolved Hide resolved
equation
connect(dotm_sink.y, fluidSource.dotm) annotation (Line(points={{-77,-72},{-64,
-72},{-64,-36.6},{-48,-36.6}}, color={0,0,127}));
Expand All @@ -146,9 +149,6 @@ equation
annotation (Line(points={{-30,-33},{-5,-33},{-5,-15}}, color={176,0,0}));
connect(vessel_ev.enthalpyPort_a, chiller.enthalpyPort_b) annotation (Line(
points={{-27.3,57},{-20,57},{-20,18},{-5,18},{-5,11}}, color={176,0,0}));
connect(iceFac.y, chiller.iceFac_in) annotation (Line(points={{29.4,-12},{
26.75,-12},{26.75,-11.88},{21.1333,-11.88}},
color={0,0,127}));
connect(hysHeating.y,not2. u)
annotation (Line(points={{33.4,-76},{28.8,-76}}, color={255,0,255}));
connect(logicalSwitch.y,booleanToReal. u) annotation (Line(points={{-0.5,-83},
Expand All @@ -170,6 +170,17 @@ equation
-54},{12,-36},{5.4,-36},{5.4,-17.08}}, color={255,0,255}));
connect(chiller.nSet, booleanToReal.y) annotation (Line(points={{0.333333,-17.08},
{0.333333,-38},{-3,-38},{-3,-45.3}}, color={0,0,127}));
connect(chiller.sigBus, sigBus1) annotation (Line(
points={{8.2,-14.87},{8.2,-22},{24,-22}},
color={255,204,51},
thickness=0.5));
connect(iceFac.y, sigBus1.iceFacMea) annotation (Line(points={{29.6,-14},{
24.03,-14},{24.03,-21.97}},
color={0,0,127}), Text(
string="%second",
index=1,
extent={{6,3},{6,3}},
horizontalAlignment=TextAlignment.Left));
annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}), graphics={
Rectangle(
Expand Down
5 changes: 2 additions & 3 deletions AixLib/ThermalZones/HighOrder/Components/Walls/Wall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ parameter DataBase.Surfaces.RoughnessForHT.PolynomialCoefficients_ASHRAEHandbook

parameter Boolean withSunblind = false "enable support of sunblinding?" annotation(Dialog(tab = "Window", group="Sunblind", enable = outside and withWindow));
parameter Real Blinding = 0 "blinding factor: 0 means total blocking of solar irradiation" annotation(Dialog(tab = "Window", group="Sunblind", enable = withWindow and outside and withSunblind));
parameter Real LimitSolIrr if withWindow and outside and withSunblind
parameter Real LimitSolIrr=0
"Minimum specific total solar radiation in W/m2 for blinding becoming active (see also TOutAirLimit)"
annotation(Dialog(tab="Window", group="Sunblind", enable=withWindow and outside and withSunblind));
parameter Modelica.Units.SI.Temperature TOutAirLimit
if withWindow and outside and withSunblind
parameter Modelica.Units.SI.Temperature TOutAirLimit=288.15
"Temperature at which sunblind closes (see also LimitSolIrr)" annotation (
Dialog(tab="Window", group="Sunblind", enable=withWindow and outside and withSunblind));
//Parameter and module fow shadow model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ partial model PartialRoomFourWalls
annotation (Dialog(tab="Inner walls", group="Shortwave Radiation", enable=
use_shortWaveRadIn));

parameter Components.Types.selectorCoefficients absInnerWallSurf if use_shortWaveRadIn
parameter Components.Types.selectorCoefficients absInnerWallSurf
"Coefficients for interior solar absorptance of wall surface abs={0.6, 0.9, 0.1}"
annotation (Dialog(tab="Inner walls", group="Shortwave Radiation", enable=
use_shortWaveRadIn and not use_dynamicShortWaveRadMethod));

replaceable parameter
ThermalZones.HighOrder.Components.Types.PartialCoeffTable coeffTableSolDistrFractions if use_shortWaveRadIn
ThermalZones.HighOrder.Components.Types.PartialCoeffTable coeffTableSolDistrFractions
constrainedby
AixLib.ThermalZones.HighOrder.Components.Types.PartialCoeffTable(final abs=absInnerWallSurf)
"Record holding the values to reproduce the tables"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ partial model PartialCase "This is the base class from which the base cases will
final use_dynamicShortWaveRadMethod=false)
annotation(Placement(transformation(extent={{-27,8},{29,62}})));

Modelica.Blocks.Interfaces.RealOutput AnnualHeatingLoad "in kWh"
Modelica.Blocks.Interfaces.RealOutput AnnualHeatingLoad
if activeHeatingOutput "in kWh"
annotation (Placement(transformation(extent={{130,58},{150,78}})));
Modelica.Blocks.Interfaces.RealOutput AnnualCoolingLoad "in kWh"
Modelica.Blocks.Interfaces.RealOutput AnnualCoolingLoad
if activeCoolingOutput "in kWh"
annotation (Placement(transformation(extent={{130,42},{150,62}})));
Modelica.Blocks.Interfaces.RealOutput TransmittedSolarRadiation_room
"in kWh/m2"
Expand All @@ -94,10 +96,14 @@ partial model PartialCase "This is the base class from which the base cases will
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow
InternalGains_radiative
annotation (Placement(transformation(extent={{-97,-97},{-77,-77}})));
Modelica.Blocks.Continuous.Integrator integratorHeat annotation (Placement(transformation(extent={{72,62.5},{83,73.5}})));
Modelica.Blocks.Continuous.Integrator integratorCool annotation (Placement(transformation(extent={{72,46.5},{83,57.5}})));
Modelica.Blocks.Math.UnitConversions.To_kWh to_kWhHeat annotation (Placement(transformation(extent={{92,63},{102,73}})));
Modelica.Blocks.Math.UnitConversions.To_kWh to_kWhCool annotation (Placement(transformation(extent={{92,47},{102,57}})));
Modelica.Blocks.Continuous.Integrator integratorHeat if activeHeatingOutput
annotation (Placement(transformation(extent={{72,62.5},{83,73.5}})));
Modelica.Blocks.Continuous.Integrator integratorCool if activeCoolingOutput
annotation (Placement(transformation(extent={{72,46.5},{83,57.5}})));
Modelica.Blocks.Math.UnitConversions.To_kWh to_kWhHeat if activeHeatingOutput
annotation (Placement(transformation(extent={{92,63},{102,73}})));
Modelica.Blocks.Math.UnitConversions.To_kWh to_kWhCool if activeCoolingOutput
annotation (Placement(transformation(extent={{92,47},{102,57}})));
Modelica.Blocks.Math.Gain convectiveInternalGains(k=0.4) "Convective part"
annotation (Placement(transformation(extent={{-120,-72},{-110,-62}})));
Modelica.Blocks.Math.Gain radiativeInternalGains(k=0.6) "Radiative part"
Expand Down Expand Up @@ -132,7 +138,8 @@ partial model PartialCase "This is the base class from which the base cases will
annotation (choicesAllMatching=true);
replaceable model CorrSolarGainWin =
Components.WindowsDoors.BaseClasses.CorrectionSolarGain.CorG_ASHRAE140
constrainedby Components.WindowsDoors.BaseClasses.CorrectionSolarGain.PartialCorG
constrainedby
Components.WindowsDoors.BaseClasses.CorrectionSolarGain.PartialCorG
"Correction model for solar irradiance as transmitted radiation" annotation (choicesAllMatching=true);

parameter Modelica.Units.SI.Area Win_Area=12 "Window area ";
Expand All @@ -159,7 +166,10 @@ partial model PartialCase "This is the base class from which the base cases will
"Simulation time when block should check if model results lies in limit range"
annotation (Dialog(tab="Results check", group=
"Cooling load or min. temperature"));

parameter Boolean activeHeatingOutput=true
"Activates blocks connected with HeaterCoolerPI.heatingPower";
parameter Boolean activeCoolingOutput=true
"Activates blocks connected with HeaterCoolerPI.coolingPower";
Modelica.Blocks.Math.UnitConversions.To_degC to_degCRoomConvTemp annotation (Placement(transformation(extent={{92,31},{102,41}})));
Modelica.Blocks.Interfaces.RealOutput FreeFloatRoomTemperature annotation (Placement(transformation(extent={{130,26},{150,46}})));
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temperatureSensor annotation (Placement(transformation(extent={{72,30},{84,42}})));
Expand Down
14 changes: 6 additions & 8 deletions AixLib/ThermalZones/HighOrder/Validation/ASHRAE140/Case600.mo
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ model Case600
annotation (Placement(transformation(extent={{-38,-82},{-27,-71}})));
Modelica.Blocks.Sources.Constant TSet_Heater(final k=TsetHeater)
annotation (Placement(transformation(extent={{30,-81},{19,-70}})));
Modelica.Blocks.Sources.RealExpression HeatingPower(y=idealHeaterCooler.heatingPower)
annotation (Placement(transformation(extent={{43,58},{63,78}})));
Modelica.Blocks.Sources.RealExpression CoolingPower(y=idealHeaterCooler.coolingPower)
annotation (Placement(transformation(extent={{43,42},{63,62}})));
Modelica.Blocks.Math.UnitConversions.From_degC from_degC
annotation (Placement(transformation(extent={{-20,-82},{-9,-71}})));
Modelica.Blocks.Math.UnitConversions.From_degC from_degC1 annotation (
Expand All @@ -47,10 +43,6 @@ equation
annotation (Line(points={{18.45,-75.5},{13.1,-75.5}}, color={0,0,127}));
connect(from_degC1.y, idealHeaterCooler.setPointHeat) annotation (Line(points={{0.45,
-75.5},{-2.8,-75.5},{-2.8,-62.2}}, color={0,0,127}));
connect(HeatingPower.y, integratorHeat.u)
annotation (Line(points={{64,68},{70.9,68}}, color={0,0,127}));
connect(CoolingPower.y, integratorCool.u) annotation (Line(points={{64,52},{
68,52},{68,52},{70.9,52}}, color={0,0,127}));
connect(Room.AirExchangePort, AirExchangeRate.y) annotation (Line(points={{
-29.8,53.765},{-47,53.765},{-47,-33},{-20,-33},{-20,-49.5},{-24.35,
-49.5}}, color={0,0,127}));
Expand All @@ -60,6 +52,12 @@ equation
connect(to_kWhHeat.y, checkResultsAccordingToASHRAEHeatingOrTempMax.modelResults) annotation (Line(points={{102.5,68},{112,68},{112,-39},{94,-39},{94,-52.15},{97.95,-52.15}}, color={0,0,127}));
connect(to_kWhCool.y, checkResultsAccordingToASHRAECoolingOrTempMin.modelResults) annotation (Line(points={{102.5,52},{111,52},{111,-37},{93,-37},{93,-73.15},{97.95,-73.15}}, color={0,0,127}));
connect(Room.transShoWaveRadWin, integrator2.u) annotation (Line(points={{17.8,5.3},{17.8,-0.75},{74,-0.75}}, color={0,0,127}));
connect(idealHeaterCooler.heatingPower, integratorHeat.u) annotation (Line(
points={{5,-51},{31.05,-51},{31.05,-10.5},{55.05,-10.5},{55.05,68},{
70.9,68}}, color={0,0,127}));
connect(idealHeaterCooler.coolingPower, integratorCool.u) annotation (Line(
points={{5,-55.6},{36.05,-55.6},{36.05,-14.2},{60.05,-14.2},{60.05,52},
{70.9,52}}, color={0,0,127}));
annotation (
experiment(StopTime=31539600, Tolerance=1e-06),
__Dymola_Commands(file=
Expand Down
10 changes: 2 additions & 8 deletions AixLib/ThermalZones/HighOrder/Validation/ASHRAE140/Case600FF.mo
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ model Case600FF
dispTypeHeatOrTempMax="T Max",
tableCoolOrTempMin=[600,-18.8,-15.6],
tableHeatOrTempMax=[600,64.9,69.5],
activeCoolingOutput=false,
activeHeatingOutput=false,
Room(redeclare Components.Types.CoeffTableSouthWindow coeffTableSolDistrFractions));

Modelica.Blocks.Sources.RealExpression HeatingPower(y=0)
annotation (Placement(transformation(extent={{43,58},{63,78}})));
Modelica.Blocks.Sources.RealExpression CoolingPower(y=0)
annotation (Placement(transformation(extent={{43,42},{63,62}})));
Modelica.Blocks.Sources.Constant AirExchangeRate(final k=airExchange)
annotation (Placement(transformation(extent={{-38,-56},{-25,-43}})));

Expand All @@ -21,10 +19,6 @@ equation
connect(Room.AirExchangePort, AirExchangeRate.y) annotation (Line(points={{
-29.8,53.765},{-47,53.765},{-47,-37},{-17,-37},{-17,-49.5},{-24.35,
-49.5}}, color={0,0,127}));
connect(HeatingPower.y, integratorHeat.u)
annotation (Line(points={{64,68},{70.9,68}}, color={0,0,127}));
connect(CoolingPower.y, integratorCool.u) annotation (Line(points={{64,52},{
68,52},{68,52},{70.9,52}}, color={0,0,127}));
connect(to_degCRoomConvTemp.y, checkResultsAccordingToASHRAEHeatingOrTempMax.modelResults) annotation (Line(points={{102.5,36},{112,36},{112,-39},{92,-39},{92,-52.15},{97.95,-52.15}}, color={0,0,127}));
connect(to_degCRoomConvTemp.y, checkResultsAccordingToASHRAECoolingOrTempMin.modelResults) annotation (Line(points={{102.5,36},{111,36},{111,-38},{91,-38},{91,-73.15},{97.95,-73.15}}, color={0,0,127}));
connect(Room.transShoWaveRadWin, integrator2.u) annotation (Line(points={{17.8,5.3},{17.8,-0.75},{74,-0.75}}, color={0,0,127}));
Expand Down
Loading