diff --git a/IDEAS/Airflow/Multizone/ReversibleDensityColumn.mo b/IDEAS/Airflow/Multizone/ReversibleDensityColumn.mo new file mode 100644 index 0000000000..1a9f81f9e8 --- /dev/null +++ b/IDEAS/Airflow/Multizone/ReversibleDensityColumn.mo @@ -0,0 +1,44 @@ +within IDEAS.Airflow.Multizone; +model ReversibleDensityColumn + "Vertical shaft with no friction and no storage of heat and mass, reversible because it can handle negative column heights" + + extends IDEAS.Airflow.Multizone.MediumColumn( + h(min=-Modelica.Constants.inf), + final densitySelection = IDEAS.Airflow.Multizone.Types.densitySelection.fromBottom); + // by convention, port_b must be connected to a zone instead of a flow element + // h is allowed to be negative to accomodate for this convention + + annotation ( +Icon(graphics={ + Line( + points={{0,100},{0,-100},{0,-98}}), + Text(origin = {-126, 2},lineColor = {0, 0, 127}, extent = {{24, -78}, {106, -100}}, textString = "Zone/Amb"), + Text(origin = {-130, 4}, lineColor = {0, 0, 127}, extent = {{32, 104}, {98, 70}}, textString = "FlowElem"), + Text(lineColor = {0, 0, 127}, extent = {{36, 26}, {88, -10}}, textString = "h=%h"), + Rectangle(fillColor = {255, 0, 0}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-16, 80}, {16, -80}}), + Rectangle(visible = false, fillColor = {85, 170, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-16, 80}, {16, 0}}), + Rectangle(visible = false, fillColor = {85, 170, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-16, 80}, {16, 54}}), + Rectangle(fillColor = {85, 170, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-16, 0}, {16, -82}}), + Rectangle(visible = false, fillColor = {85, 170, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-16, -55}, {16, -80}})}), + defaultComponentName="col", + Documentation(info=" +

+This model describes the pressure difference of a vertical medium +column. It can be used to model the pressure difference caused by +stack effect. + +It is a variation on IDEAS.Airflow.Multizone.MediumColumn. + +

+", + revisions=" + +")); +end ReversibleDensityColumn; \ No newline at end of file diff --git a/IDEAS/Airflow/Multizone/package.order b/IDEAS/Airflow/Multizone/package.order index cc28cc1a97..48ca090c6d 100644 --- a/IDEAS/Airflow/Multizone/package.order +++ b/IDEAS/Airflow/Multizone/package.order @@ -11,6 +11,7 @@ MediumColumnDynamic Orifice Point_m_flow Points_m_flow +ReversibleDensityColumn Table_V_flow Table_m_flow ZonalFlow_ACS diff --git a/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo b/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo index c39f8a65f0..97349dc705 100644 --- a/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo +++ b/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo @@ -103,15 +103,21 @@ partial model PartialSimInfoManager parameter Modelica.Units.SI.Length H=10 "Building or roof height" annotation (Dialog(group="Wind")); - parameter Real A0=0.6 "Local terrain constant. 0.6 for Suburban,0.35 for Urban and 1 for Unshielded (Ashrae 1993) " annotation(Dialog(group="Wind")); + parameter Real A0=0.6 "Local terrain constant. 0.6 for Suburban,0.35 for Urban and 1 for Unshielded (Ashrae 1993) " + annotation(Dialog(group="Wind")); parameter Real a=0.28 "Velocity profile exponent. 0.28 for Suburban, 0.4 for Urban and 0.15 for Unshielded (Ashrae 1993) " - annotation(Dialog(group="Wind")); - parameter Modelica.Units.SI.Length Hwin=10 + annotation(Dialog(group="Wind")); + parameter Modelica.Units.SI.Length Hwind=10 "Height above ground of meteorological wind speed measurement" annotation (Dialog(group="Wind")); - - parameter Real Cs= (A0*A0)*((H/Hwin)^(2*a)) "Wind speed modifier" - annotation(Dialog(group="Wind")); + parameter Real Cs_coeff = (A0*A0)*((1/Hwind)^(2*a)) "Multiplication factor for Habs" + annotation(Dialog(group="Wind")); + parameter Modelica.Units.SI.Length Hpres=1 "Height above ground of meteorological ambient pressure measurement" + annotation(Dialog(group="Wind")); + constant Modelica.Units.SI.Density rho_default = 1.2 "Default air density" + annotation(Dialog(group="Wind")); + + parameter Real Cs= Cs_coeff*(H^(2*a)) "Wind speed modifier" annotation(Dialog(group="Wind")); final parameter Integer numIncAndAziInBus = size(incAndAziInBus,1) diff --git a/IDEAS/BoundaryConditions/Validation/BESTEST/WD100.mo b/IDEAS/BoundaryConditions/Validation/BESTEST/WD100.mo index 876f2b19dc..d23b1e315b 100644 --- a/IDEAS/BoundaryConditions/Validation/BESTEST/WD100.mo +++ b/IDEAS/BoundaryConditions/Validation/BESTEST/WD100.mo @@ -1,4 +1,4 @@ -within IDEAS.BoundaryConditions.Validation.BESTEST; +within IDEAS.BoundaryConditions.Validation.BESTEST; model WD100 "Test model for BESTEST weather data: base case" extends Modelica.Icons.Example; diff --git a/IDEAS/Buildings/Components/BaseClasses/ConvectiveHeatTransfer/MonoLayerAir.mo b/IDEAS/Buildings/Components/BaseClasses/ConvectiveHeatTransfer/MonoLayerAir.mo index 9b3f8682ae..9a428e9026 100644 --- a/IDEAS/Buildings/Components/BaseClasses/ConvectiveHeatTransfer/MonoLayerAir.mo +++ b/IDEAS/Buildings/Components/BaseClasses/ConvectiveHeatTransfer/MonoLayerAir.mo @@ -64,7 +64,9 @@ model MonoLayerAir then 0.028154*Ra^0.41399 else 1+1.75967e-10*Ra^2.2984755) else 1 "Correlations from Hollands et al. and Wright et al."; - + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_emb "Internal port" + annotation (Placement(transformation(extent={{-10,90},{10,110}}))); + protected final parameter Boolean ceiling= IDEAS.Utilities.Math.Functions.isAngle(inc,IDEAS.Types.Tilt.Ceiling) @@ -83,16 +85,9 @@ protected abs(port_a.T-port_b.T))*coeffRa); Modelica.Units.SI.CoefficientOfHeatTransfer h=Nu*k/d; -public - Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_emb "Internal port" - annotation (Placement(transformation(extent={{-10,90},{10,110}}))); - equation - if not (ceiling or floor or vertical) then - assert(false, "Could not find suitable correlation for air cavity! Please - change the inclination to wall, ceiling or floor or remove the air layer.", + assert(ceiling or floor or vertical, "In " + getInstanceName() +": Could not find suitable correlation for air cavity in a wall. Results may be less accurate than expected.", level=AssertionLevel.warning); - end if; if checkCoating then assert(abs(epsLw_a - IDEAS.Buildings.Data.Constants.epsLw_glass) > 1e-5 diff --git a/IDEAS/Buildings/Components/BoundaryWall.mo b/IDEAS/Buildings/Components/BoundaryWall.mo index 8b440c7d94..0861c000a9 100644 --- a/IDEAS/Buildings/Components/BoundaryWall.mo +++ b/IDEAS/Buildings/Components/BoundaryWall.mo @@ -49,7 +49,7 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe Fluid.Sources.MassFlowSource_T boundary2( redeclare package Medium = Medium, nPorts=1, - final m_flow=0) + final m_flow=1e-10) if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts annotation (Placement(transformation(extent={{-28,-76},{-8,-56}}))); protected diff --git a/IDEAS/Buildings/Components/Examples/RectangularZoneTemplate.mo b/IDEAS/Buildings/Components/Examples/RectangularZoneTemplate.mo new file mode 100644 index 0000000000..7481d132b9 --- /dev/null +++ b/IDEAS/Buildings/Components/Examples/RectangularZoneTemplate.mo @@ -0,0 +1,62 @@ +within IDEAS.Buildings.Components.Examples; +model RectangularZoneTemplate + "This example illustrates the use of the RectangularZoneTemplate to model a room or building" + extends Modelica.Icons.Example; + inner BoundaryConditions.SimInfoManager sim + "Simulation information manager for climate data" + annotation (Placement(transformation(extent={{-100,80},{-80,100}}))); + + IDEAS.Buildings.Components.RectangularZoneTemplate Zone( + h=2.7, + redeclare replaceable package Medium = IDEAS.Media.Air, + T_start=293.15, + bouTypA=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypB=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypC=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypCei=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + hasWinCei=false, + redeclare IDEAS.Buildings.Validation.Data.Constructions.LightRoof conTypCei, + + bouTypFlo=IDEAS.Buildings.Components.Interfaces.BoundaryType.BoundaryWall, + redeclare IDEAS.Buildings.Validation.Data.Constructions.HeavyFloor + conTypFlo, + redeclare IDEAS.Buildings.Validation.Data.Constructions.HeavyWall conTypA, + redeclare IDEAS.Buildings.Validation.Data.Constructions.HeavyWall conTypB, + redeclare IDEAS.Buildings.Validation.Data.Constructions.HeavyWall conTypC, + redeclare IDEAS.Buildings.Validation.Data.Constructions.HeavyWall conTypD, + hasWinA=true, + fracA=0, + redeclare IDEAS.Buildings.Validation.Data.Glazing.GlaBesTest glazingA, + redeclare IDEAS.Buildings.Components.Shading.Interfaces.ShadingProperties + shaTypA, + hasWinB=false, + hasWinC=false, + hasWinD=false, + bouTypD=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + aziA=IDEAS.Types.Azimuth.S, + l=8, + w=6, + A_winA=12) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); + + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false)), + experiment( + StopTime=604800, + Tolerance=1e-006, + __Dymola_Algorithm="Lsodar"), + Documentation(info=" +

+This example illustrates the use of the RectangularZoneTemplate to model a room or building. +

+", revisions=" + +"), + __Dymola_Commands(file(inherit=true) = "Resources/Scripts/Dymola/Buildings/Components/Examples/RectangularZoneTemplate.mos" + "Simulate and Plot")); +end RectangularZoneTemplate; diff --git a/IDEAS/Buildings/Components/Examples/RectangularZoneTemplateOnePort.mo b/IDEAS/Buildings/Components/Examples/RectangularZoneTemplateOnePort.mo new file mode 100644 index 0000000000..d1026eb9b1 --- /dev/null +++ b/IDEAS/Buildings/Components/Examples/RectangularZoneTemplateOnePort.mo @@ -0,0 +1,27 @@ +within IDEAS.Buildings.Components.Examples; +model RectangularZoneTemplateOnePort + "Example that compares a zone with internal wall and without internal wall" + extends Modelica.Icons.Example; + extends IDEAS.Buildings.Components.Examples.RectangularZoneTemplate(sim( + interZonalAirFlowType=IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort)); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false)), + experiment( + StopTime=604800, + Tolerance=1e-006, + __Dymola_Algorithm="Lsodar"), + Documentation(info=" +

+This example illustrates the use of the RectangularZoneTemplate to model a room or building with the OnePort interzonal airflow implementation activated +

+", revisions=" + +"), + __Dymola_Commands(file(inherit=true) = "Resources/Scripts/Dymola/Buildings/Components/Examples/RectangularZoneTemplateOnePort.mos" + "Simulate and Plot")); +end RectangularZoneTemplateOnePort; diff --git a/IDEAS/Buildings/Components/Examples/RectangularZoneTemplateTwoPort.mo b/IDEAS/Buildings/Components/Examples/RectangularZoneTemplateTwoPort.mo new file mode 100644 index 0000000000..6f767b745b --- /dev/null +++ b/IDEAS/Buildings/Components/Examples/RectangularZoneTemplateTwoPort.mo @@ -0,0 +1,27 @@ +within IDEAS.Buildings.Components.Examples; +model RectangularZoneTemplateTwoPort + "Example that compares a zone with internal wall and without internal wall" + extends Modelica.Icons.Example; + extends IDEAS.Buildings.Components.Examples.RectangularZoneTemplate( sim( + interZonalAirFlowType=IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts)); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false)), + experiment( + StopTime=604800, + Tolerance=1e-006, + __Dymola_Algorithm="Lsodar"), + Documentation(info=" +

+This example illustrates the use of the RectangularZoneTemplate to model a room or building with the TwoPort interzonal airflow implementation activated +

+", revisions=" + +"), + __Dymola_Commands(file(inherit=true) = "Resources/Scripts/Dymola/Buildings/Components/Examples/RectangularZoneTemplateTwoPort.mos" + "Simulate and Plot")); +end RectangularZoneTemplateTwoPort; diff --git a/IDEAS/Buildings/Components/Examples/WallUnitTest.mo b/IDEAS/Buildings/Components/Examples/WallUnitTest.mo index b9e3747d81..94f3331763 100644 --- a/IDEAS/Buildings/Components/Examples/WallUnitTest.mo +++ b/IDEAS/Buildings/Components/Examples/WallUnitTest.mo @@ -1,7 +1,9 @@ within IDEAS.Buildings.Components.Examples; model WallUnitTest "Unit test for verifying results for all wall components" + package Medium = IDEAS.Media.Air; extends Modelica.Icons.Example; BoundaryWall boundaryWall( + redeclare package Medium=Medium, redeclare Data.Constructions.CavityWall constructionType, inc=IDEAS.Types.Tilt.Wall, azi=IDEAS.Types.Azimuth.S, @@ -9,6 +11,7 @@ model WallUnitTest "Unit test for verifying results for all wall components" use_T_in=true) "Boundary wall example" annotation (Placement(transformation(extent={{-36,60},{-26,80}}))); InternalWall internalWall( + redeclare package Medium=Medium, inc=IDEAS.Types.Tilt.Wall, azi=IDEAS.Types.Azimuth.S, A=2, @@ -17,6 +20,7 @@ model WallUnitTest "Unit test for verifying results for all wall components" "Internal wall example" annotation (Placement(transformation(extent={{-36,20},{-24,40}}))); OuterWall outerWall( + redeclare package Medium=Medium, inc=IDEAS.Types.Tilt.Wall, azi=IDEAS.Types.Azimuth.S, A=2, @@ -24,28 +28,27 @@ model WallUnitTest "Unit test for verifying results for all wall components" "Outer wall example" annotation (Placement(transformation(extent={{-36,-20},{-26,0}}))); SlabOnGround slabOnGround( + redeclare package Medium=Medium, inc=IDEAS.Types.Tilt.Floor, azi=IDEAS.Types.Azimuth.S, A=2, redeclare Validation.Data.Constructions.HeavyFloor constructionType) "Slab on ground example" annotation (Placement(transformation(extent={{-36,-60},{-26,-40}}))); -public - inner BoundaryConditions.SimInfoManager sim - annotation (Placement(transformation(extent={{-100,80},{-80,100}}))); -public + inner BoundaryConditions.SimInfoManager sim(interZonalAirFlowType = IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts) annotation( + Placement(transformation(extent = {{-100, 80}, {-80, 100}}))); Modelica.Blocks.Sources.Constant Tconst(k=300) "Constant temperature boundary condition" annotation (Placement(transformation(extent={{-80,60},{-60,80}}))); - Interfaces.DummyConnection dummyConnection(isZone=true) + Interfaces.DummyConnection dummyConnection(redeclare package Medium=Medium, isZone=true) annotation (Placement(transformation(extent={{20,60},{0,80}}))); - Interfaces.DummyConnection dummyConnection1(isZone=true) + Interfaces.DummyConnection dummyConnection1(redeclare package Medium=Medium, isZone=true) annotation (Placement(transformation(extent={{20,20},{0,40}}))); - Interfaces.DummyConnection dummyConnection2(isZone=true) + Interfaces.DummyConnection dummyConnection2(redeclare package Medium=Medium, isZone=true) annotation (Placement(transformation(extent={{20,-20},{0,0}}))); - Interfaces.DummyConnection dummyConnection3(isZone=true) + Interfaces.DummyConnection dummyConnection3(redeclare package Medium=Medium, isZone=true) annotation (Placement(transformation(extent={{20,-60},{0,-40}}))); - Interfaces.DummyConnection dummyConnection4(isZone=true) + Interfaces.DummyConnection dummyConnection4(redeclare package Medium=Medium, isZone=true) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); equation connect(Tconst.y, boundaryWall.T) annotation (Line(points={{-59,70},{-48,70}, @@ -89,6 +92,10 @@ For windows see other examples. ", revisions="