diff --git a/IBPSA/Resources/ReferenceResults/Dymola/IBPSA_ThermalZones_ReducedOrder_Examples_SimpleRoomTwoElementsNonConstantTGround.txt b/IBPSA/Resources/ReferenceResults/Dymola/IBPSA_ThermalZones_ReducedOrder_Examples_SimpleRoomTwoElementsNonConstantTGround.txt new file mode 100644 index 0000000000..00558d83d5 --- /dev/null +++ b/IBPSA/Resources/ReferenceResults/Dymola/IBPSA_ThermalZones_ReducedOrder_Examples_SimpleRoomTwoElementsNonConstantTGround.txt @@ -0,0 +1,14 @@ +last-generated=2023-09-14 +statistics-initialization= +{ + "linear": "5" +} +statistics-simulation= +{ + "linear": "0, 3, 0", + "nonlinear": " ", + "number of continuous time states": "4", + "numerical Jacobians": "0" +} +time=[0e+00, 3.1536e+07] +eqAirTemp.TEqAir=[2.789571533203125e+02, 2.813718017578125e+02, 2.7872587890625e+02, 2.807901184082031e+02, 2.835259521484375e+02, 2.823024597167969e+02, 2.827985473632813e+02, 2.822135131835938e+02, 2.784553283691406e+02, 2.797283508300781e+02, 2.843675231933594e+02, 2.796825317382812e+02, 2.830658447265625e+02, 2.863615112304688e+02, 2.829901916503906e+02, 2.81193115234375e+02, 2.834943542480469e+02, 2.822643676757813e+02, 2.849333984375e+02, 2.8688466796875e+02, 2.813687744140625e+02, 2.854065185546875e+02, 2.824746765136719e+02, 2.820121215820312e+02, 2.881613098144531e+02, 2.850013122558594e+02, 2.823730773925781e+02, 2.873432434082031e+02, 2.857710876464844e+02, 2.85406591796875e+02, 2.900100402832031e+02, 2.826182189941406e+02, 2.84790185546875e+02, 2.966639404296875e+02, 2.837040283203125e+02, 2.864047241210938e+02, 2.959377624511719e+02, 2.883143005371094e+02, 2.897021667480469e+02, 2.957674682617188e+02, 2.864564819335938e+02, 2.896947265625e+02, 2.955205017089844e+02, 2.871305236816406e+02, 2.91426025390625e+02, 2.9104345703125e+02, 2.86251953125e+02, 2.90456201171875e+02, 2.876586730957031e+02, 2.879760803222656e+02, 2.924863586425781e+02, 2.866445068359375e+02, 2.888368591308594e+02, 2.952922973632812e+02, 2.882718566894531e+02, 2.897318420410156e+02, 2.960734008789062e+02, 2.874204406738281e+02, 2.916609802246094e+02, 2.970692016601562e+02, 2.87395751953125e+02, 2.934731872558594e+02, 2.889349975585938e+02, 2.884504028320313e+02, 2.923549438476563e+02, 2.880719299316406e+02, 2.882120971679688e+02, 2.9177724609375e+02, 2.858329772949219e+02, 2.879469116210938e+02, 2.915469055175781e+02, 2.855946655273438e+02, 2.865959594726563e+02, 2.939826416015625e+02, 2.875797424316406e+02, 2.867238159179688e+02, 2.938005920410156e+02, 2.847250549316406e+02, 2.881406921386719e+02, 2.924451721191406e+02, 2.846399841308594e+02, 2.869987976074219e+02, 2.848623596191406e+02, 2.824324584960938e+02, 2.857318481445312e+02, 2.833520812988281e+02, 2.841896728515625e+02, 2.867588134765625e+02, 2.826075927734375e+02, 2.824429504394531e+02, 2.851797180175781e+02, 2.797426086425781e+02, 2.819598083496094e+02, 2.841822814941406e+02, 2.791549987792969e+02, 2.806098937988281e+02, 2.82980029296875e+02, 2.807776794433594e+02, 2.813313049316406e+02, 2.808358093261719e+02, 2.823453063964844e+02] diff --git a/IBPSA/Resources/Scripts/Dymola/ThermalZones/ReducedOrder/Examples/SimpleRoomTwoElementsNonConstantTGround.mos b/IBPSA/Resources/Scripts/Dymola/ThermalZones/ReducedOrder/Examples/SimpleRoomTwoElementsNonConstantTGround.mos new file mode 100644 index 0000000000..d9cef8cf7f --- /dev/null +++ b/IBPSA/Resources/Scripts/Dymola/ThermalZones/ReducedOrder/Examples/SimpleRoomTwoElementsNonConstantTGround.mos @@ -0,0 +1,12 @@ +simulateModel("IBPSA.ThermalZones.ReducedOrder.Examples.SimpleRoomTwoElementsNonConstantTGround", tolerance=1e-6, stopTime=3.1536e+007, numberOfIntervals=0, outputInterval=3600, method="CVode", resultFile="SimpleRoomTwoElementsNonConstantTGround"); +createPlot(id = 1, + position = {55, 50, 697, 502}, + x = "time", + y = {"eqAirTemp.TEqAir"}, + autoscale = true, + autoerase = true, + autoreplot = true, + grid = true, + color = true, + leftTitleType = 1, + bottomTitleType = 1); diff --git a/IBPSA/ThermalZones/ReducedOrder/EquivalentAirTemperature/BaseClasses/PartialVDI6007.mo b/IBPSA/ThermalZones/ReducedOrder/EquivalentAirTemperature/BaseClasses/PartialVDI6007.mo index f83dc4253f..c49578f4ee 100644 --- a/IBPSA/ThermalZones/ReducedOrder/EquivalentAirTemperature/BaseClasses/PartialVDI6007.mo +++ b/IBPSA/ThermalZones/ReducedOrder/EquivalentAirTemperature/BaseClasses/PartialVDI6007.mo @@ -10,7 +10,8 @@ partial model PartialVDI6007 parameter Real wfGro(unit="1") "Weight factor of the ground (0 if not considered)"; parameter Modelica.Units.SI.Temperature TGro - "Temperature of the ground in contact with floor plate"; + "Constant temperature of the ground in contact with floor plate" + annotation(Dialog(enable=not TGroundFromInput)); parameter Modelica.Units.SI.CoefficientOfHeatTransfer hConWallOut "Exterior walls convective coefficient of heat transfer (outdoor)"; parameter Modelica.Units.SI.CoefficientOfHeatTransfer hRad @@ -18,6 +19,9 @@ partial model PartialVDI6007 parameter Boolean withLongwave=true "Set to true to include longwave radiation exchange" annotation(choices(checkBox = true)); + parameter Boolean TGroundFromInput=false + "Set to true to use TGro_in input connector instead of TGro constant" + annotation(choices(checkBox = true)); Modelica.Units.SI.Temperature TEqWall[n] "Equivalent wall temperature"; Modelica.Units.SI.Temperature TEqWin[n] "Equivalent window temperature"; @@ -61,6 +65,24 @@ partial model PartialVDI6007 extent={{-20,-20},{20,20}}, rotation=-90, origin={0,120}))); + Modelica.Blocks.Interfaces.RealInput TGro_in( + final quantity="ThermodynamicTemperature", + final unit="K", + displayUnit="degC") if TGroundFromInput + "Temperature of the ground in contact with floor plate" + annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=90, + origin={0,-120}))); + +protected + SourceSelector TGroSouSel(final useInput=TGroundFromInput, p=TGro) + "Input selector for ground temperature" annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={8,-40}))); initial equation assert(noEvent(abs(sum(wfWall) + sum(wfWin) + wfGro) > 0.1), @@ -80,6 +102,8 @@ equation TEqWall=TDryBul.+delTEqSW; end if; + connect(TGro_in, TGroSouSel.uCon) + annotation (Line(points={{0,-120},{0,-51}}, color={0,0,127})); annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ @@ -120,6 +144,12 @@ equation revisions="