diff --git a/IDEAS/Airflow/Multizone/BaseClasses/DoorDiscretized.mo b/IDEAS/Airflow/Multizone/BaseClasses/DoorDiscretized.mo index b0b0e4bdc..430d62003 100644 --- a/IDEAS/Airflow/Multizone/BaseClasses/DoorDiscretized.mo +++ b/IDEAS/Airflow/Multizone/BaseClasses/DoorDiscretized.mo @@ -18,7 +18,7 @@ partial model DoorDiscretized Modelica.Units.SI.Velocity vBot "Velocity at bottom of opening from A to B"; protected - parameter Modelica.Units.SI.Length dh=hOpe/nCom "Height of each compartment"; + parameter Modelica.Units.SI.Length dh=hOpeVert/nCom "Height of each compartment"; parameter Medium.ThermodynamicState sta_default=Medium.setState_pTX( T=Medium.T_default, diff --git a/IDEAS/Airflow/Multizone/BaseClasses/TwoWayFlowElementBuoyancy.mo b/IDEAS/Airflow/Multizone/BaseClasses/TwoWayFlowElementBuoyancy.mo index fb9c6364f..106f524eb 100644 --- a/IDEAS/Airflow/Multizone/BaseClasses/TwoWayFlowElementBuoyancy.mo +++ b/IDEAS/Airflow/Multizone/BaseClasses/TwoWayFlowElementBuoyancy.mo @@ -8,6 +8,9 @@ partial model TwoWayFlowElementBuoyancy parameter Modelica.Units.SI.Length hOpe=2.1 "Height of opening" annotation (Dialog(group="Geometry")); + parameter Modelica.Units.SI.Angle inc=Modelica.Constants.pi/2 "inclination angle (vertical=pi/2)"; + final parameter Modelica.Units.SI.Length hOpeVert=sin(inc)*hOpe "Height of opening projected to the vertical plane"; + parameter Modelica.Units.SI.Length hA=2.7/2 "Height of reference pressure zone A" annotation (Dialog(group="Geometry")); parameter Modelica.Units.SI.Length hB=2.7/2 diff --git a/IDEAS/Airflow/Multizone/CrackOrOperableDoor.mo b/IDEAS/Airflow/Multizone/CrackOrOperableDoor.mo index 1584fe4e0..129a1c58b 100644 --- a/IDEAS/Airflow/Multizone/CrackOrOperableDoor.mo +++ b/IDEAS/Airflow/Multizone/CrackOrOperableDoor.mo @@ -26,37 +26,40 @@ model CrackOrOperableDoor parameter BoundaryConditions.Types.InterZonalAirFlow interZonalAirFlowType "Interzonal air flow type"; - parameter Modelica.Units.SI.PressureDifference dpCloRat( - min=0, - displayUnit="Pa") = 50 "Pressure drop at rating condition of closed door" + final parameter Modelica.Units.SI.PressureDifference dpCloRat(displayUnit="Pa")=50 + "Pressure drop at rating condition of closed door" annotation (Dialog(group="Rating conditions")); - parameter Modelica.Units.SI.Length h_b1 "Height at port b1"; - parameter Modelica.Units.SI.Length h_b2 = 0 "Height at port b2"; - parameter Modelica.Units.SI.Length h_a1 = 0 "Height at port a1"; - parameter Modelica.Units.SI.Length h_a2 "Height at port a2"; + parameter Modelica.Units.SI.Length h_b1 "Height at port b1 (hasCavity=false)"; + parameter Modelica.Units.SI.Length h_b2 = 0 "Height at port b2(hasCavity=false)"; + parameter Modelica.Units.SI.Length h_a1 = 0 "Height at port a1(hasCavity=false)"; + parameter Modelica.Units.SI.Length h_a2 "Height at port a2(hasCavity=false)"; + + parameter SI.Length hA=(h_a1 + h_b2)/2 + "Height of reference pressure at port a1 for opening (hasCavity=true) model"; + parameter SI.Length hB=(h_a2 + h_b1)/2 + "Height of reference pressure at port b1 for opening (hasCavity=true) model"; - parameter Real CDCloRat(min=0, max=1)=1 + final parameter Real CDCloRat(min=0, max=1)=1 "Discharge coefficient at rating conditions of closed door" annotation (Dialog(group="Rating conditions")); parameter Modelica.Units.SI.Area A_q50 "Surface area for leakage computation (closed door)"; parameter Real q50(unit="m3/(h.m2)") "Surface air tightness"; - parameter Modelica.Units.SI.Area LClo(min=0) = q50*A_q50*1.2/3600 *(1.2/2/dpCloRat)^mClo/CDClo - "Effective leakage area of closed door" - annotation (Dialog(group="Closed door")); + final parameter Modelica.Units.SI.Area LClo(min=0) = ((q50*A_q50/3600)/(dpCloRat)^mClo)/(((dpCloRat)^(0.5-mClo))*sqrt(2/1.2041)) + "Effective leakage area of internal wall (when door is fully closed)" + annotation (Dialog(group="Crack or Closed door")); - parameter Real CDOpe=0.65 "Discharge coefficient of open door" + parameter Real CDOpe=0.78 "Discharge coefficient of open door" annotation (Dialog(group="Open door")); - parameter Real CDClo=0.65 "Discharge coefficient of closed door" - annotation (Dialog(group="Closed door")); + parameter Real mOpe = 0.5 "Flow exponent for door of open door" annotation (Dialog(group="Open door")); - parameter Real mClo= 0.65 "Flow exponent for crack of closed door" - annotation (Dialog(group="Closed door")); + parameter Real mClo= 0.65 "Flow exponent for crack or crack of closed door" + annotation (Dialog(group="Crack or Closed door")); - parameter Integer nCom=if abs(hOpe) IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts and useDoor and use_y), "In " +getInstanceName() + ": Cannot use a controllable door unless interZonalAirFlowType == TwoPorts."); diff --git a/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo b/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo index 286c2eb1e..6a13ee3e6 100644 --- a/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo +++ b/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo @@ -104,6 +104,9 @@ partial model PartialSimInfoManager annotation(Dialog(enable=interZonalAirFlowType<> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None or unify_n50,group="Interzonal airflow")); + parameter Boolean use_sim_Cs =true "if checked, the default Cs of each surface in the building is sim.Cs" + annotation(choices(checkBox=true),Dialog(group="Wind")); + 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) " diff --git a/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo b/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo index f3a1b6d0e..24c3a69a4 100644 --- a/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo +++ b/IDEAS/Buildings/Components/Interfaces/PartialSurface.mo @@ -103,9 +103,10 @@ partial model PartialSurface "Partial model for building envelope component" redeclare package Medium = Medium, h_a1=0.25*hVertical, h_b2=- 0.25*hVertical, - h_b1 = 0.75*hVertical + hRelSurfBot_a, - h_a2 = 0.25*hVertical + hRelSurfBot_a, - interZonalAirFlowType = sim.interZonalAirFlowType) if add_door and sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None annotation( + h_b1=-0.5*hzone_a + 0.75*hVertical + hRelSurfBot_a, + h_a2=-0.5*hzone_a + 0.25*hVertical + hRelSurfBot_a, + interZonalAirFlowType = sim.interZonalAirFlowType, + inc=inc) if add_door and sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None annotation ( Placement(visible = true, transformation(origin = {30, -52}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Blocks.Sources.RealExpression AExp(y = A) "Area expression" annotation( Placement(transformation(origin = {0, 20}, extent = {{-10, -10}, {10, 10}}))); diff --git a/IDEAS/Buildings/Components/Interfaces/RectangularZoneTemplateInterface.mo b/IDEAS/Buildings/Components/Interfaces/RectangularZoneTemplateInterface.mo index d12981620..58dea10ee 100644 --- a/IDEAS/Buildings/Components/Interfaces/RectangularZoneTemplateInterface.mo +++ b/IDEAS/Buildings/Components/Interfaces/RectangularZoneTemplateInterface.mo @@ -2,6 +2,7 @@ within IDEAS.Buildings.Components.Interfaces; partial model RectangularZoneTemplateInterface "Rectangular zone including walls, floor and ceiling" extends IDEAS.Buildings.Components.Interfaces.PartialZone( + redeclare replaceable package Medium = IDEAS.Media.Air, calculateViewFactor=false, final nSurf=indWinCei+nSurfExt, final V=A*h, diff --git a/IDEAS/Buildings/Components/InternalWall.mo b/IDEAS/Buildings/Components/InternalWall.mo index a4c78d563..4b62b1aec 100644 --- a/IDEAS/Buildings/Components/InternalWall.mo +++ b/IDEAS/Buildings/Components/InternalWall.mo @@ -11,14 +11,16 @@ model InternalWall "interior opaque wall between two zones" final QTra_design = U_value*A*(TRef_a - TRef_b), q50_zone(v50_surf = 0), crackOrOperableDoor( + h_a1=-0.5*hzone_b + 0.75*hVertical + hRelSurfBot_b, + h_b2=-0.5*hzone_b + 0.25*hVertical + hRelSurfBot_b, + hA=0.5*hzone_b - hRelSurfBot_b - hRelOpeBot_b, + hB=0.5*hzone_a - hRelSurfBot_a - hRelOpeBot_a, openDoorOnePort=true, useDoor=hasCavity, use_y=use_y_doo, wOpe=w, hOpe=h, - CDOpe=CD, - h_a1=-0.5*hzone_b + 0.25*hVertical + hRef_b, - h_b2=-0.5*hzone_b + 0.75*hVertical + hRef_b)); + CDOpe=CD)); //using custom q50 since this model is not an external component parameter Boolean linIntCon_b = sim.linIntCon "= true, if convective heat transfer should be linearised" annotation( @@ -39,6 +41,9 @@ model InternalWall "interior opaque wall between two zones" parameter Modelica.Units.SI.Length w = 1 "Width of (rectangular) cavity in wall" annotation(Dialog(enable=hasCavity,group="Cavity or open door")); + + parameter Modelica.Units.SI.Length hRelOpeBot_a=0 "Vertical distance at propsbus a between the bottom of the surface that contains an (operable) opening and the bottom of the opening" annotation(Dialog(group="Cavity or open door")); + parameter Modelica.Units.SI.Length hRelOpeBot_b=0 "Vertical distance at propsbus b between the bottom of the surface that contains an (operable) opening and the bottom of the opening" annotation(Dialog(group="Cavity or open door")); parameter Modelica.Units.SI.Acceleration g = Modelica.Constants.g_n "Gravity, for computation of buoyancy" annotation(Dialog(enable=hasCavity,group="Cavity or open door",tab="Advanced")); @@ -75,13 +80,17 @@ model InternalWall "interior opaque wall between two zones" annotation(Dialog(group="Cavity or open door",tab="Advanced")); final parameter Real hzone_b(fixed=false); final parameter Real hfloor_b(fixed=false); - parameter Real hRef_b=if IDEAS.Utilities.Math.Functions.isAngle(inc, Modelica.Constants.pi) then hzone_b else 0 + + + parameter Modelica.Units.SI.Length hRelSurfBot_b=if + IDEAS.Utilities.Math.Functions.isAngle(inc, IDEAS.Types.Tilt.Floor) + then hzone_b else 0 "Height above the zone floor at propsbus_b. Height where the surface starts. e.g. 0 for walls at floor level and floors. "; Modelica.Blocks.Interfaces.RealInput y_doo(min = 0, max = 1) if use_y_doo and useDooOpe "Control input for the door" annotation( Placement(visible = true, transformation(origin = {-80, 90}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-64, 88}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); protected - parameter Real Ope_hvert = sin(inc)*h "Vertical opening height, height of the surface projected to the vertical, 0 for openings in horizontal floors and ceilings" annotation( + parameter Real Ope_hvert = sin(inc)*h "Vertical opening height, height of the surface projected to the vertical, 0 for openings in horizontal floors and ceilings" annotation ( Dialog(enable=hasCavity,group="Cavity or open door")); final parameter Real U_value = 1/(1/8 + sum(constructionType.mats.R) + 1/8) "Wall U-value"; constant Real r = 287 "Gas constant"; diff --git a/IDEAS/Buildings/Components/OuterWall.mo b/IDEAS/Buildings/Components/OuterWall.mo index 1bea2b75d..4d8985719 100644 --- a/IDEAS/Buildings/Components/OuterWall.mo +++ b/IDEAS/Buildings/Components/OuterWall.mo @@ -64,6 +64,10 @@ model OuterWall "Opaque building envelope construction" parameter Boolean use_custom_Cs = false "if checked, Cs will be used instead of the default related to the interzonal airflow type " annotation(Evaluate=true, choices(checkBox=true),Dialog(enable=true,tab="Airflow", group="Wind Pressure")); + + parameter Boolean use_sim_Cs =sim.use_sim_Cs "if checked, the default Cs of each surface in the building is sim.Cs" + annotation(choices(checkBox=true),Dialog(enable=not use_custom_Cs,tab="Airflow", group="Wind Pressure")); + parameter Real Cs=sim.Cs "Wind speed modifier" annotation (Dialog(enable=use_custom_Cs,tab="Airflow", group="Wind Pressure")); @@ -104,11 +108,10 @@ protected final table=coeffsCp, final azi=aziInt, Cs=if not use_custom_Cs and sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts - then sim.Cs_coeff*(Habs^(2*sim.a)) - elseif not use_custom_Cs - then sim.Cs - else Cs, - Habs=Habs, + and not use_sim_Cs then sim.Cs_coeff*(Habs^(2*sim.a)) elseif not + use_custom_Cs then sim.Cs else Cs, + Habs=if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts + then Habs else sim.HPres, nPorts=if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort then 1 else 2) if sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None diff --git a/IDEAS/Buildings/Components/Validations/AirflowBoxModel.mo b/IDEAS/Buildings/Components/Validations/AirflowBoxModel.mo new file mode 100644 index 000000000..90cefce3e --- /dev/null +++ b/IDEAS/Buildings/Components/Validations/AirflowBoxModel.mo @@ -0,0 +1,118 @@ +within IDEAS.Buildings.Components.Validations; +model AirflowBoxModel + extends Modelica.Icons.Example; + + + Box_Sim Energy_Only(sim(interZonalAirFlowType=IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None)) annotation (Placement(transformation(rotation=0, extent={{-82,18},{-22,78}}))); + Box_Sim Energy_n50Corr(sim(interZonalAirFlowType=IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None, unify_n50=true)) annotation (Placement(transformation(rotation=0, + extent={{20,20},{80,80}}))); + Box_Sim IAQ_1port(sim(interZonalAirFlowType=IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort), winD( + use_trickle_vent=true, + m_flow_nominal=50*1.2041/3600, + dp_nominal=2)) annotation (Placement(transformation(rotation=0,extent={{-80,-80},{-20,-20}}))); + Box_Sim IAQ_2Port(sim(interZonalAirFlowType=IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts), + use_operable_window=true, + winD(crackOrOperableDoor(nCom=2), + use_trickle_vent=true, + m_flow_nominal=50*1.2041/3600, + dp_nominal=2), + winD_position(y=1), + Con(G=10000000), + Rad(G=10000000)) annotation (Placement(transformation(rotation=0, + extent={{20,-80},{80,-20}}))); +protected + model Box_Sim + inner BoundaryConditions.SimInfoManager sim(interZonalAirFlowType=IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts, + n50=1) + annotation (Placement(transformation(extent={{-100,80},{-80,100}}))); + parameter Boolean use_operable_window=false + "= true, to enable window control input"; + + RectangularZoneTemplate BoxModel( + T_start=291.15, + bouTypA=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypB=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypC=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypD=IDEAS.Buildings.Components.Interfaces.BoundaryType.External, + bouTypFlo=IDEAS.Buildings.Components.Interfaces.BoundaryType.BoundaryWall, + bouTypCei=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + nExtD=2, + hasWinC=true, + aziOpt=3, + l=5, + w=5, + h=5, + A_winA=2, + A_winB=2, + A_winC=2, + A_winD=2, + h_winA=2, + h_winB=2, + h_winC=2, + h_winD=2, + redeclare IDEAS.Buildings.Validation.Data.Constructions.LightRoof + conTypCei, + redeclare IDEAS.Buildings.Data.Constructions.FloorOnGround conTypFlo, + redeclare IDEAS.Buildings.Data.Glazing.Ins2Ar2020 glazingC, + redeclare IDEAS.Buildings.Data.Frames.AluminumInsulated fraTypC) + annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); + + Modelica.Thermal.HeatTransfer.Components.ThermalConductor Con(G=100000) + annotation (Placement(transformation(extent={{-40,52},{-20,72}}))); + Modelica.Thermal.HeatTransfer.Celsius.FixedTemperature fixedTemperature(T= + 18) annotation (Placement(transformation(extent={{20,40},{0,60}}))); + Modelica.Thermal.HeatTransfer.Components.ThermalConductor Rad(G=100000) + annotation (Placement(transformation(extent={{-40,26},{-20,46}}))); + OuterWall outD( + redeclare IDEAS.Buildings.Data.Constructions.CavityWall constructionType, + incOpt=1, + aziOpt=2, + A=23) annotation (Placement(transformation(extent={{-106,46},{-94,66}}))); + Window winD( + redeclare IDEAS.Buildings.Data.Glazing.Ins2Ar2020 glazing, + A=2, + hWin=2, + redeclare IDEAS.Buildings.Data.Frames.AluminumInsulated fraType, + use_operable_window=use_operable_window) + annotation (Placement(transformation(extent={{-106,22},{-94,42}}))); + Modelica.Blocks.Sources.RealExpression winD_position(y=0) if use_operable_window + annotation (Placement(transformation(extent={{-140,0},{-120,20}}))); + + equation + connect(BoxModel.gainCon, Con.port_a) annotation (Line(points={{-60,47},{ + -46,47},{-46,62},{-40,62}}, color={191,0,0})); + connect(fixedTemperature.port, Con.port_b) annotation (Line(points={{0,50}, + {-14,50},{-14,62},{-20,62}}, color={191,0,0})); + connect(BoxModel.gainRad, Rad.port_a) annotation (Line(points={{-60,44},{ + -46,44},{-46,36},{-40,36}}, color={191,0,0})); + connect(Rad.port_b, fixedTemperature.port) annotation (Line(points={{-20,36}, + {-14,36},{-14,50},{0,50}}, color={191,0,0})); + connect(outD.propsBus_a, BoxModel.proBusD[1]) annotation (Line( + points={{-95,58},{-88,58},{-88,42.5},{-79.6,42.5}}, + color={255,204,51}, + thickness=0.5)); + connect(winD.propsBus_a, BoxModel.proBusD[2]) annotation (Line( + points={{-95,34},{-88,34},{-88,43.5},{-79.6,43.5}}, + color={255,204,51}, + thickness=0.5)); + connect(winD_position.y, winD.y_window) + annotation (Line(points={{-119,10},{-102,10},{-102,22}}, color={0,0,127})); + annotation (Icon(graphics={Rectangle( + extent={{-60,60},{60,-60}}, + lineColor={28,108,200}, + fillColor={215,215,215}, + fillPattern=FillPattern.Solid), Text( + extent={{-100,-60},{98,-100}}, + textColor={28,108,200}, + textString="%name")})); + end Box_Sim; + annotation (experiment( + StopTime=1209600, + Interval=3600.00288, + Tolerance=1e-07, + __Dymola_fixedstepsize=15, + __Dymola_Algorithm="Dassl"), Documentation(info=" +This model runs the 4 possible interzonal airflow configurations of a simple box model. Temperature is kept constant at 18° degrees + +")); +end AirflowBoxModel; diff --git a/IDEAS/Buildings/Components/Validations/TwoStoreyBoxes.mo b/IDEAS/Buildings/Components/Validations/TwoStoreyBoxes.mo new file mode 100644 index 000000000..bee3f0adc --- /dev/null +++ b/IDEAS/Buildings/Components/Validations/TwoStoreyBoxes.mo @@ -0,0 +1,83 @@ +within IDEAS.Buildings.Components.Validations; +model TwoStoreyBoxes + extends Modelica.Icons.Example; + + inner BoundaryConditions.SimInfoManager sim(interZonalAirFlowType=IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts, + n50=1) + annotation (Placement(transformation(extent={{-100,80},{-80,100}}))); + + RectangularZoneTemplate Level( + hFloor=5, + T_start=291.15, + bouTypA=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypB=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypC=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypD=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypFlo=IDEAS.Buildings.Components.Interfaces.BoundaryType.InternalWall, + bouTypCei=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + aziOpt=3, + l=5, + w=5, + h=5, + A_winA=2, + h_winA=2, + redeclare Validation.Data.Constructions.LightRoof conTypCei, + redeclare IDEAS.Buildings.Data.Constructions.ConcreteSlab conTypFlo, + hasCavityFlo=true) + annotation (Placement(transformation(extent={{-40,20},{-20,40}}))); + + RectangularZoneTemplate Groundfloor( + T_start=291.15, + bouTypA=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypB=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypC=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypD=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, + bouTypFlo=IDEAS.Buildings.Components.Interfaces.BoundaryType.BoundaryWall, + bouTypCei=IDEAS.Buildings.Components.Interfaces.BoundaryType.External, + aziOpt=3, + l=5, + w=5, + h=5, + A_winA=2, + h_winA=2, + redeclare Validation.Data.Constructions.LightRoof conTypCei, + redeclare Data.Constructions.FloorOnGround conTypFlo) + annotation (Placement(transformation(extent={{-40,-40},{-20,-20}}))); + + Modelica.Thermal.HeatTransfer.Components.ThermalConductor Con[2](each G= + 100000) + annotation (Placement(transformation(extent={{0,32},{20,52}}))); + Modelica.Thermal.HeatTransfer.Celsius.FixedTemperature fixedTemperature[2](each T= + 18) + annotation (Placement(transformation(extent={{60,20},{40,40}}))); + Modelica.Thermal.HeatTransfer.Components.ThermalConductor Rad[2](each G= + 100000) + annotation (Placement(transformation(extent={{0,6},{20,26}}))); + + +equation + connect(Groundfloor.proBusCei, Level.proBusFlo) annotation (Line( + points={{-30.2,-24},{-30,-22},{-30,24}}, + color={255,204,51}, + thickness=0.5)); + connect(Level.gainCon, Con[1].port_a) annotation (Line(points={{-20,27},{-6,27}, + {-6,42},{0,42}}, color={191,0,0})); + connect(Groundfloor.gainCon, Con[2].port_a) annotation (Line(points={{-20,-33}, + {-20,-34},{-10,-34},{-10,28},{-6,28},{-6,42},{0,42}}, color={191,0,0})); + connect(Level.gainRad, Rad[1].port_a) annotation (Line(points={{-20,24},{-4,24}, + {-4,16},{0,16}}, color={191,0,0})); + connect(Groundfloor.gainRad, Rad[2].port_a) annotation (Line(points={{-20,-36}, + {-6,-36},{-6,16},{0,16}}, color={191,0,0})); + connect(fixedTemperature.port, Con.port_b) annotation (Line(points={{40,30},{26, + 30},{26,42},{20,42}}, color={191,0,0})); + connect(fixedTemperature.port, Rad.port_b) annotation (Line(points={{40,30},{26, + 30},{26,16},{20,16}}, color={191,0,0})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false)), + experiment( + StopTime=1209600, + Interval=3600.00288, + Tolerance=1e-12, + __Dymola_fixedstepsize=15, + __Dymola_Algorithm="Dassl")); +end TwoStoreyBoxes; diff --git a/IDEAS/Buildings/Components/Validations/package.order b/IDEAS/Buildings/Components/Validations/package.order index f7051baf8..bd3696e84 100644 --- a/IDEAS/Buildings/Components/Validations/package.order +++ b/IDEAS/Buildings/Components/Validations/package.order @@ -1,3 +1,5 @@ CeilingOrientationConsistency WindowEN673 WindowOrientations +AirflowBoxModel +TwoStoreyBoxes diff --git a/IDEAS/Buildings/Components/Window.mo b/IDEAS/Buildings/Components/Window.mo index 55818dade..ba5439632 100644 --- a/IDEAS/Buildings/Components/Window.mo +++ b/IDEAS/Buildings/Components/Window.mo @@ -26,12 +26,20 @@ model Window "Multipane window" linIntCon=true, checkCoatings=glazing.checkLowPerformanceGlazing), setArea(A=A*nWin), - hRelSurfBot_a=if IDEAS.Utilities.Math.Functions.isAngle(inc, IDEAS.Types.Tilt.Ceiling) then hzone_a else (hzone_a - hVertical)/2, + hRelSurfBot_a=if IDEAS.Utilities.Math.Functions.isAngle(inc, IDEAS.Types.Tilt.Ceiling) then hzone_a elseif IDEAS.Utilities.Math.Functions.isAngle(inc, IDEAS.Types.Tilt.Floor) then 0 else + (hzone_a - hVertical)/2, hVertical=if IDEAS.Utilities.Math.Functions.isAngle(inc, IDEAS.Types.Tilt.Floor) or IDEAS.Utilities.Math.Functions.isAngle(inc, IDEAS.Types.Tilt.Ceiling) then 0 else hWin, q50_zone(v50_surf=q50_internal*A), crackOrOperableDoor( + wOpe=A/hWin, + hOpe=hWin, + hA=0.5*hVertical, + hB=0.5*hzone_a - hRelSurfBot_a, openDoorOnePort=false, useDoor = use_operable_window)); + parameter Modelica.Units.SI.Length hWin(min=0.1) = max(0.1,sqrt(A)) + "Window height, including frame" + annotation (); parameter Boolean linExtCon=sim.linExtCon "= true, if exterior convective heat transfer should be linearised (uses average wind speed)" annotation(Dialog(tab="Convection")); @@ -103,6 +111,9 @@ model Window "Multipane window" "if checked, Cs will be used in stead of the default related to the interzonal airflow type " annotation(choices(checkBox=true),Dialog(enable=true,tab="Airflow", group="Wind Pressure")); + parameter Boolean use_sim_Cs =sim.use_sim_Cs "if checked, the default Cs of each surface in the building is sim.Cs" + annotation(choices(checkBox=true),Dialog(enable=not use_custom_Cs,tab="Airflow", group="Wind Pressure")); + parameter Real Cs=sim.Cs "Wind speed modifier" annotation (Dialog(enable=use_custom_Cs,tab="Airflow", group="Wind Pressure")); @@ -125,9 +136,10 @@ model Window "Multipane window" parameter Boolean use_trickle_vent_control = false "=true, to enable trickle vent control input" annotation(Dialog(group="Trickle vent", tab="Airflow", enable=use_trickle_vent)); - parameter Modelica.Units.SI.Length hWin(min=0.1) = max(0.1,sqrt(A)) - "Window height, including frame" - annotation(Dialog(tab="Advanced",group="Frame")); + parameter SI.Length hTrickleVent= hVertical+hRelSurfBot_a + "vertical distance between the floor of the zone (top) and the trickle vent" + annotation(Dialog(group="Trickle vent", tab="Airflow", enable=use_trickle_vent)); + parameter Modelica.Units.SI.Length briLen = 2*hWin + 2*A/hWin "Thermal bridge length, if present" annotation(Dialog(tab="Advanced",group="Frame")); @@ -146,7 +158,7 @@ model Window "Multipane window" use_y = use_trickle_vent_control) if use_trickle_vent and sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None "Trickle vent. Height assumed at the middle of the surface, i.e. at the reference pressure." - annotation (Placement(visible = true, transformation(origin = {0, -158}, extent = {{20, 88}, {40, 68}}, rotation = 0))); + annotation (Placement(visible = true, transformation(origin={6,-158}, extent = {{20, 88}, {40, 68}}, rotation = 0))); replaceable IDEAS.Buildings.Components.BaseClasses.RadiativeHeatTransfer.SwWindowResponse solWin( @@ -183,8 +195,19 @@ model Window "Multipane window" Modelica.Blocks.Sources.RealExpression y_window_trunc(y = max(0, min(1, y_window_internal))) "Truncated control signal" annotation ( Placement(visible = true, transformation(origin = {-10, -90}, extent = {{-10, 10}, {10, -10}}, rotation = 90))); - Airflow.Multizone.ReversibleDensityColumn col_trickle(redeclare package Medium = Medium, h=hVertical/2) if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts "Column for port trickle vent" annotation( + Airflow.Multizone.ReversibleDensityColumn col_trickle(redeclare package + Medium = Medium, h= + hTrickleVent - (hzone_a/2)) if use_trickle_vent and sim.interZonalAirFlowType + == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts "Column for port trickle vent" annotation ( Placement(transformation(origin = {112, -40}, extent = {{50, -10}, {70, 10}}, rotation = 180))); + Airflow.Multizone.ReversibleDensityColumn outside_trickleCol(redeclare package + Medium = Medium, h=hTrickleVent - (Habs_surf - hAbs_floor_a)) if + use_trickle_vent and sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts + "Column for connecting outside side of trickle vent" + annotation (Placement(visible=true, transformation( + origin={78,-92}, + extent={{-70,-10},{-50,10}}, + rotation=0))); protected Modelica.Blocks.Interfaces.RealInput y_window_internal; final parameter Real U_value=glazing.U_value*(1-frac)+fraType.U_value*frac @@ -226,11 +249,10 @@ protected IDEAS.Fluid.Sources.OutsideAir outsideAir( redeclare package Medium = Medium, Cs=if not use_custom_Cs and sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts - then sim.Cs_coeff*(Habs^(2*sim.a)) - elseif not use_custom_Cs - then sim.Cs - else Cs, - Habs=Habs, + and not use_sim_Cs then sim.Cs_coeff*(Habs^(2*sim.a)) elseif not + use_custom_Cs then sim.Cs else Cs, + Habs=if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts + then Habs else sim.HPres, final azi = aziInt, nPorts=if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort then (if use_trickle_vent then 2 else 1) else (if use_trickle_vent then 3 else 2), @@ -331,7 +353,8 @@ equation Line(points={{-42,-80},{-46,-80},{-46,-49.4895},{-57.5,-49.4895}}, color = {0, 0, 127})); connect(trickleVent.y, y_trickleVent) annotation ( - Line(points = {{30, -92}, {30, -120}}, color = {0, 0, 127})); + Line(points={{36,-92},{36,-106},{30,-106},{30,-120}}, + color = {0, 0, 127})); if sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None then connect(crackOrOperableDoor.port_a1, outsideAir.ports[1]) annotation ( Line(points={{20,-46},{16,-46},{16,-80},{-20,-80}}, color = {0, 127, 255})); @@ -340,20 +363,24 @@ equation connect(crackOrOperableDoor.port_b2, outsideAir.ports[2]) annotation ( Line(points={{20,-58},{16,-58},{16,-80},{-20,-80}}, color = {0, 127, 255})); end if; - connect(trickleVent.port_a, outsideAir.ports[if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts then 3 else 2]) annotation ( - Line(points = {{20, -80}, {-20, -80}}, color = {0, 127, 255})); + connect(outside_trickleCol.port_b, outsideAir.ports[if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts then 3 else 2]) annotation ( + Line(points={{18,-102},{18,-110},{6,-110},{6,-80},{-20,-80}}, + color = {0, 127, 255})); connect(y_window_trunc.y, solWin.y) annotation ( Line(points={{-10,-79},{-10,-58}}, color = {0, 0, 127})); connect(y_window_trunc.y, crackOrOperableDoor.y) annotation ( Line(points={{-10,-79},{-10,-68},{19,-68},{19,-52}}, color = {0, 0, 127})); if sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts then - connect(trickleVent.port_b, propsBusInt.port_1) annotation( - Line(points = {{40, -80}, {50, -80}, {50, 19.91}, {56.09, 19.91}}, color = {0, 127, 255})); + connect(trickleVent.port_b, propsBusInt.port_1) annotation ( + Line(points={{46,-80},{50,-80},{50,19.91},{56.09,19.91}}, color = {0, 127, 255})); end if; - connect(trickleVent.port_b, col_trickle.port_a) annotation( - Line(points = {{40, -80}, {52, -80}, {52, -50}}, color = {0, 127, 255})); - connect(col_trickle.port_b, propsBusInt.port_1) annotation( - Line(points = {{52, -30}, {56, -30}, {56, 20}}, color = {0, 127, 255})); + connect(trickleVent.port_b, col_trickle.port_a) annotation ( + Line(points={{46,-80},{52,-80},{52,-50}}, color = {0, 127, 255})); + connect(col_trickle.port_b, propsBusInt.port_1) annotation ( + Line(points={{52,-30},{56.09,-30},{56.09,19.91}}, + color = {0, 127, 255})); + connect(trickleVent.port_a, outside_trickleCol.port_a) + annotation (Line(points={{26,-80},{18,-80},{18,-82}}, color={0,127,255})); annotation ( Icon(coordinateSystem(preserveAspectRatio=true, extent={{-60,-100},{60,100}}), graphics={Rectangle(fillColor = {255, 255, 255}, pattern = LinePattern.None, @@ -559,4 +586,4 @@ Adjusted implementation for grouping of solar calculations. ")); -end Window; \ No newline at end of file +end Window; diff --git a/IDEAS/Examples/PPD12/Structure.mo b/IDEAS/Examples/PPD12/Structure.mo index a305784e4..8ee2b61c9 100644 --- a/IDEAS/Examples/PPD12/Structure.mo +++ b/IDEAS/Examples/PPD12/Structure.mo @@ -123,6 +123,7 @@ model Structure "Ppd 12 example model" redeclare package Medium = MediumAir, bouTypFlo=IDEAS.Buildings.Components.Interfaces.BoundaryType.SlabOnGround, bouTypCei=IDEAS.Buildings.Components.Interfaces.BoundaryType.External, + h_winC=1.74, redeclare IDEAS.Examples.PPD12.Data.TripleGlazing glazingC, A_winC=2.55*1.74, fracC=0.1, @@ -192,6 +193,7 @@ model Structure "Ppd 12 example model" aziA=east, redeclare package Medium = MediumAir, bouTypFlo=IDEAS.Buildings.Components.Interfaces.BoundaryType.SlabOnGround, + h_winA=2.3, redeclare IDEAS.Examples.PPD12.Data.TripleGlazing glazingC, A_winC=2.55*1.74, fracC=0.1, @@ -221,12 +223,14 @@ model Structure "Ppd 12 example model" annotation (Placement(transformation(extent={{-44,-66},{-24,-86}}))); IDEAS.Buildings.Components.RectangularZoneTemplate bedRoom1( + hFloor=hFloor0, aziA=east, bouTypC=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, bouTypD=IDEAS.Buildings.Components.Interfaces.BoundaryType.BoundaryWall, hasWinC=true, redeclare package Medium = MediumAir, bouTypCei=IDEAS.Buildings.Components.Interfaces.BoundaryType.External, + h_winC=1.9, redeclare IDEAS.Examples.PPD12.Data.TripleGlazing glazingC, redeclare IDEAS.Examples.PPD12.Data.OuterWall conTypC, redeclare IDEAS.Examples.PPD12.Data.CommonWall conTypD, @@ -247,10 +251,12 @@ model Structure "Ppd 12 example model" annotation (Placement(transformation(extent={{140,80},{120,60}}))); IDEAS.Buildings.Components.RectangularZoneTemplate bathRoom( + hFloor=hFloor0, aziA=east, bouTypD=IDEAS.Buildings.Components.Interfaces.BoundaryType.BoundaryWall, redeclare package Medium = MediumAir, bouTypCei=IDEAS.Buildings.Components.Interfaces.BoundaryType.External, + h_winA=1.99, redeclare IDEAS.Examples.PPD12.Data.CommonWall conTypD, bouTypA=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, hasWinA=true, @@ -274,6 +280,8 @@ model Structure "Ppd 12 example model" IDEAS.Buildings.Components.RectangularZoneTemplate stairWay( redeclare package Medium = MediumAir, + hFloor=hFloor0, + h_winA=1.69, redeclare IDEAS.Examples.PPD12.Data.OuterWall conTypA, redeclare IDEAS.Examples.PPD12.Data.TripleGlazing glazingA, redeclare IDEAS.Examples.PPD12.Data.CommonWall conTypB, @@ -299,6 +307,7 @@ model Structure "Ppd 12 example model" annotation (Placement(transformation(extent={{86,26},{66,6}}))); IDEAS.Buildings.Components.RectangularZoneTemplate bedRoom2( + hFloor=hFloor0 + hFloor1, aziA=east, bouTypC=IDEAS.Buildings.Components.Interfaces.BoundaryType.OuterWall, bouTypD=IDEAS.Buildings.Components.Interfaces.BoundaryType.BoundaryWall, @@ -328,6 +337,8 @@ model Structure "Ppd 12 example model" annotation (Placement(transformation(extent={{276,82},{256,62}}))); IDEAS.Buildings.Components.RectangularZoneTemplate bedRoom3( redeclare package Medium = MediumAir, + hFloor=hFloor0 + hFloor1, + h_winA=1.1, redeclare IDEAS.Examples.PPD12.Data.CommonWall conTypD, redeclare IDEAS.Examples.PPD12.Data.CommonWall conTypB, redeclare IDEAS.Examples.PPD12.Data.InteriorWall10 conTypA,