diff --git a/IDEAS/Airflow/Multizone/BaseClasses/DoorDiscretized.mo b/IDEAS/Airflow/Multizone/BaseClasses/DoorDiscretized.mo index b0b0e4bdcd..d6a29efe78 100644 --- a/IDEAS/Airflow/Multizone/BaseClasses/DoorDiscretized.mo +++ b/IDEAS/Airflow/Multizone/BaseClasses/DoorDiscretized.mo @@ -17,9 +17,9 @@ partial model DoorDiscretized Modelica.Units.SI.Velocity vTop "Velocity at top of opening from A to B"; 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"; + input Modelica.Units.SI.Length dh=hOpe/nCom "Height of each compartment"; +protected parameter Medium.ThermodynamicState sta_default=Medium.setState_pTX( T=Medium.T_default, p=Medium.p_default, @@ -28,11 +28,11 @@ protected parameter Modelica.Units.SI.Density rho_default=Medium.density(sta_default) "Density, used to compute fluid volume"; - parameter Real hAg[nCom](each unit="m2/s2")= + input Real hAg[nCom](each unit="m2/s2")= {Modelica.Constants.g_n*(hA - (i - 0.5)*dh) for i in 1:nCom} "Product g*h_i for each compartment"; - parameter Real hBg[nCom](each unit="m2/s2")= + input Real hBg[nCom](each unit="m2/s2")= {Modelica.Constants.g_n*(hB - (i - 0.5)*dh) for i in 1:nCom} "Product g*h_i for each compartment"; Modelica.Units.SI.AbsolutePressure pA[nCom](each nominal=101325) @@ -118,6 +118,10 @@ using the model for a door that can be open or closed. revisions="
dh
and changed prefixes of dh
,hAg
and hBg
to input
. This is for #1935.
+CD
from
diff --git a/IDEAS/Airflow/Multizone/CrackOrOperableDoor.mo b/IDEAS/Airflow/Multizone/CrackOrOperableDoor.mo
new file mode 100644
index 0000000000..9a0b7d28e0
--- /dev/null
+++ b/IDEAS/Airflow/Multizone/CrackOrOperableDoor.mo
@@ -0,0 +1,237 @@
+within IDEAS.Airflow.Multizone;
+model CrackOrOperableDoor
+ "Infiltration or large opening model used for the embeded airflow implementation in IDEAS.Buildings.Components"
+ extends IDEAS.Fluid.Interfaces.PartialFourPortInterface(
+ redeclare final package Medium1 = Medium,
+ redeclare final package Medium2 = Medium,
+ final allowFlowReversal1=true,
+ final allowFlowReversal2=true,
+ final m1_flow_nominal=10/3600*rho_default,
+ final m2_flow_nominal=m1_flow_nominal,
+ final m1_flow_small=1E-4*abs(m1_flow_nominal),
+ final m2_flow_small=1E-4*abs(m2_flow_nominal));
+ extends IDEAS.Airflow.Multizone.BaseClasses.ErrorControl(forceErrorControlOnFlow=true); //force error control on flow rates
+
+ replaceable package Medium =
+ Modelica.Media.Interfaces.PartialMedium "Medium in the component"
+ annotation (choices(
+ choice(redeclare package Medium = IDEAS.Media.Air "Moist air")));
+
+ parameter Modelica.Units.SI.Velocity vZer=0.001
+ "Minimum velocity to prevent zero flow. Recommended: 0.001";
+ parameter Modelica.Units.SI.Length wOpe=0.9 "Width of opening"
+ annotation (Dialog(group="Geometry"));
+ parameter Modelica.Units.SI.Length hOpe=2.1 "Height of opening"
+ annotation (Dialog(group="Geometry"));
+
+ parameter BoundaryConditions.Types.InterZonalAirFlow interZonalAirFlowType
+ "Interzonal air flow type";
+ 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 (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";
+
+ 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";
+
+ final parameter Modelica.Units.SI.Area LClo(min=0) = ((q50*A_q50/3600)/(dpCloRat)^mClo)/(((dpCloRat)^(0.5-mClo))*sqrt(2/rho_default))
+ "Effective leakage area of internal wall (when door is fully closed)"
+ annotation (Dialog(group="Crack or Closed door"));
+
+ parameter Real CDOpe=0.78 "Discharge coefficient of open door"
+ annotation (Dialog(group="Open 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 or crack of closed door"
+ annotation (Dialog(group="Crack or Closed door"));
+
+ parameter Integer nCom=if abs(hOpe*sin(inc)) < 0.01 then 2 else max(2,integer(abs(hOpe*sin(inc))/4)) "Number of compartments for the discretization";
+
+ parameter Boolean useDoor = false "=true, to use operable door instead of a crack";
+ parameter Boolean use_y = true "=true, to use control input";
+ parameter Boolean openDoorOnePort = false "Sets whether a door is open or closed in one port configuration";
+
+ parameter Modelica.Units.SI.PressureDifference dp_turbulent(
+ min=0,
+ displayUnit="Pa") = 0.01
+ "Pressure difference where laminar and turbulent flow relation coincide. Recommended: 0.01";
+
+ parameter Modelica.Units.SI.PressureDifference dp_turbulent_ope(min=0,displayUnit="Pa") = (MFtrans/(rho_default*(CDOpe * hOpe*wOpe * sqrt(2/rho_default))))^(1/mOpe)
+ if useDoor and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts "Pressure difference where laminar and turbulent flow relation coincide for large cavities";
+ parameter Modelica.Units.SI.MassFlowRate MFtrans=(hOpe*wOpe)*VItrans*REtrans/DOpe if useDoor and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts "Recommended massflowrate used for reguralisation";
+ parameter Modelica.Units.SI.Length DOpe=4*hOpe*wOpe/(2*hOpe+2*wOpe) if useDoor and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts "Estimated hydraulic diameter of the opening - 4*A/Perimeter";
+ constant Modelica.Units.SI.ReynoldsNumber REtrans=30 if useDoor and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts "Assumed Reynolds number at transition";
+ constant Modelica.Units.SI.DynamicViscosity VItrans=0.0000181625 if useDoor and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts "Assumed dynamic viscosity of air at transition";
+
+ final parameter Medium.ThermodynamicState state_default=Medium.setState_pTX(
+ T=Medium.T_default,
+ p=Medium.p_default,
+ X=Medium.X_default[1:Medium.nXi]) "Medium state at default values";
+ final parameter Modelica.Units.SI.Density rho_default=Medium.density(state=state_default) "Medium default density";
+
+
+
+ Modelica.Blocks.Interfaces.RealInput y(min=0, max=1, unit="1") if useDoor and use_y
+ "Opening signal, 0=closed, 1=open"
+ annotation (Placement(transformation(extent={{-120,-10},{-100,10}}), iconTransformation(extent={{-120,-10},{-100,10}})));
+ IDEAS.Airflow.Multizone.Point_m_flow point_m_flow1(
+ redeclare package Medium = Medium,
+ dpMea_nominal = dpCloRat,
+ forceErrorControlOnFlow=true,
+ mMea_flow_nominal=if openDoorOnePort and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort
+ then wOpe*hOpe*rho_default*CDCloRat*(2*dpCloRat/rho_default)^mClo else (if
+ interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
+ then 0.5 else 1)*(q50/3600*rho_default)*A_q50,
+ m = if openDoorOnePort and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort then mOpe else mClo,
+ useDefaultProperties = false) if not useDoor or (useDoor and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort) "Pressure drop equation" annotation (
+ Placement(visible = true, transformation(origin = {0, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
+ IDEAS.Airflow.Multizone.MediumColumnReversible col_b1(redeclare package
+ Medium = Medium, h=h_b1) if interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
+ and not useDoor "Column for port b1" annotation (Placement(visible=true,
+ transformation(
+ origin={0,70},
+ extent={{50,-10},{70,10}},
+ rotation=0)));
+ IDEAS.Airflow.Multizone.MediumColumnReversible col_a1(redeclare package
+ Medium = Medium, h=h_a1) if interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
+ and not useDoor "Column for port a1" annotation (Placement(visible=true,
+ transformation(
+ origin={0,70},
+ extent={{-70,-10},{-50,10}},
+ rotation=0)));
+ IDEAS.Airflow.Multizone.MediumColumnReversible col_b2(redeclare package
+ Medium = Medium, h=h_b2) if interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
+ and not useDoor "Column for port b2" annotation (Placement(visible=true,
+ transformation(
+ origin={0,-50},
+ extent={{-70,-10},{-50,10}},
+ rotation=0)));
+ IDEAS.Airflow.Multizone.MediumColumnReversible col_a2(redeclare package
+ Medium = Medium, h=h_a2) if interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
+ and not useDoor "Column for port a2" annotation (Placement(visible=true,
+ transformation(
+ origin={0,-50},
+ extent={{50,-10},{70,10}},
+ rotation=0)));
+ IDEAS.Airflow.Multizone.Point_m_flow point_m_flow2(
+ redeclare package Medium = Medium,
+ dpMea_nominal = dpCloRat,
+ forceErrorControlOnFlow=true,
+ m = mClo,
+ mMea_flow_nominal = (q50/3600*rho_default)*A_q50*0.5,
+ useDefaultProperties = false) if not useDoor and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts "Pressure drop equation" annotation (
+ Placement(visible = true, transformation(origin = {0, -60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
+ IDEAS.Airflow.Multizone.DoorDiscretizedOperable doo(
+ final dh=doo.hOpe*sin(inc)/nCom,
+ redeclare package Medium = Medium,
+ final hA=hA,
+ final hB=hB,
+ dp_turbulent=dp_turbulent_ope,
+ nCom=nCom,
+ CDOpe=CDOpe,
+ CDClo=CDCloRat,
+ mOpe=mOpe,
+ mClo=mClo,
+ CDCloRat=CDCloRat,
+ wOpe=wOpe,
+ hOpe=hOpe,
+ dpCloRat=dpCloRat,
+ LClo=LClo,
+ vZer=vZer*MFtrans*rho_default)
+ if useDoor and interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts annotation (
+ Placement(visible = true, transformation(origin={-2,0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
+ IDEAS.Fluid.Sources.Boundary_pT bou(
+ redeclare package Medium = Medium,
+ nPorts = 2)
+ if interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
+ "Sets absolute pressure when the ports are not connected externally" annotation (
+ Placement(visible = true, transformation(origin = {0, -90}, extent = {{-10, 10}, {10, -10}}, rotation = 90)));
+ Modelica.Blocks.Sources.Constant constOne(final k=1)
+ if not use_y
+ "Door constantly opened" annotation (
+ Placement(visible = true, transformation(origin = {-54, -14}, extent = {{-6, -6}, {6, 6}}, rotation = 0)));
+
+ parameter SI.Angle inc=Modelica.Constants.pi/2
+ "inclination angle (vertical=pi/2)";
+initial equation
+ assert( not (interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts and useDoor and use_y),
+ "In " +getInstanceName() + ": Cannot use a controllable door unless interZonalAirFlowType == TwoPorts.");
+
+equation
+ connect(col_a1.port_a, point_m_flow1.port_a) annotation (
+ Line(points = {{-60, 80}, {-60, 84}, {-20, 84}, {-20, 60}, {-10, 60}}, color = {0, 127, 255}));
+ connect(col_b1.port_a, point_m_flow1.port_b) annotation (
+ Line(points = {{60, 80}, {60, 84}, {20, 84}, {20, 60}, {10, 60}}, color = {0, 127, 255}));
+ connect(col_b2.port_a, point_m_flow2.port_a) annotation (
+ Line(points = {{-60, -40}, {-60, -36}, {-20, -36}, {-20, -60}, {-10, -60}}, color = {0, 127, 255}));
+ connect(col_a2.port_a, point_m_flow2.port_b) annotation (
+ Line(points = {{60, -40}, {60, -36}, {20, -36}, {20, -60}, {10, -60}}, color = {0, 127, 255}));
+ connect(col_b2.port_b, port_b2) annotation (
+ Line(points = {{-60, -60}, {-100, -60}}, color = {0, 127, 255}));
+ connect(col_a2.port_b, port_a2) annotation (
+ Line(points = {{60, -60}, {100, -60}}, color = {0, 127, 255}));
+ connect(col_b1.port_b, port_b1) annotation (
+ Line(points = {{60, 60}, {100, 60}}, color = {0, 127, 255}));
+ connect(col_a1.port_b, port_a1) annotation (
+ Line(points = {{-60, 60}, {-100, 60}}, color = {0, 127, 255}));
+ connect(y, doo.y) annotation (
+ Line(points={{-110,0},{-13,0}}, color = {0, 0, 127}));
+ connect(bou.ports[1], port_a2) annotation (
+ Line(points={{-1,-80},{100,-80},{100,-60}}, color = {0, 127, 255}));
+ if interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts then
+ connect(point_m_flow1.port_a, port_a1) annotation (
+ Line(points = {{-10, 60}, {-100, 60}}, color = {0, 127, 255}));
+ connect(point_m_flow1.port_b, port_b1) annotation (
+ Line(points = {{10, 60}, {100, 60}}, color = {0, 127, 255}));
+ end if;
+ connect(constOne.y, doo.y) annotation (
+ Line(points={{-47.4,-14},{-32,-14},{-32,0},{-13,0}}, color = {0, 0, 127}));
+ connect(bou.ports[2], port_b2) annotation (
+ Line(points={{1,-80},{-100,-80},{-100,-60}}, color = {0, 127, 255}));
+ connect(doo.port_a1, port_a1) annotation (
+ Line(points={{-12,6},{-30,6},{-30,60},{-100,60}}, color = {0, 127, 255}));
+ connect(doo.port_b1, port_b1) annotation (
+ Line(points={{8,6},{30,6},{30,60},{100,60}}, color = {0, 127, 255}));
+ connect(doo.port_b2, port_b2) annotation (
+ Line(points={{-12,-6},{-20,-6},{-20,-34},{-100,-34},{-100,-60}}, color = {0, 127, 255}));
+ connect(doo.port_a2, port_a2) annotation (
+ Line(points={{8,-6},{20,-6},{20,-34},{100,-34},{100,-60}}, color = {0, 127, 255}));
+
+annotation(Documentation(info="
++This models an open/closed door depending on the number of available fluid ports. +
++When only one port is available then an orrifice equation is used to approximate the closed door. +There is no support for open doors when using only a single fluid port. +
+", +revisions=" ++This model illustrates the use of the models + +IDEAS.Airflow.Multizone.Table_V_flow, +which is an analytic alternative to the table implementation of + +IDEAS.Airflow.Multizone.Table_m_flow for modelling self regulating inlet vents. +
+", revisions=" ++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=" +m_flow_nominal
at a pressure difference of dp_nominal
.
For negative pressure differences the mass flow rate is not limited.
++An optional control input can be enabled, which reduces the flow rate for the same +pressure difference, but which does not affect the maximum flow rate. +
", revisions="Differences in assumptions for density calculations linked to stack-effect airflow (internally for door component, external via density columns for orifice) can result in different pressure differences over the opening (10e-3). However, for large horizontal openings this can result in important differences in volume flow results. This example shows how two similar openings with other underlying modelling assumptions lead to noticeable differences in massflowrate.
+"), + Icon(coordinateSystem(extent={{-100,-100},{100,100}}))); +end LargeHorizontalOpening; diff --git a/IDEAS/Airflow/Multizone/Validation/package.order b/IDEAS/Airflow/Multizone/Validation/package.order index 3b0f6df5f3..afb70eafd3 100644 --- a/IDEAS/Airflow/Multizone/Validation/package.order +++ b/IDEAS/Airflow/Multizone/Validation/package.order @@ -1,4 +1,5 @@ DoorOpenClosed +LargeHorizontalOpening OneWayFlow OpenDoorBuoyancyDynamic OpenDoorBuoyancyPressureDynamic diff --git a/IDEAS/Airflow/Multizone/package.order b/IDEAS/Airflow/Multizone/package.order index cc28cc1a97..07a26438fe 100644 --- a/IDEAS/Airflow/Multizone/package.order +++ b/IDEAS/Airflow/Multizone/package.order @@ -1,6 +1,7 @@ UsersGuide Coefficient_V_flow Coefficient_m_flow +CrackOrOperableDoor DoorDiscretizedOpen DoorDiscretizedOperable DoorOpen @@ -8,15 +9,16 @@ DoorOperable EffectiveAirLeakageArea MediumColumn MediumColumnDynamic +MediumColumnReversible Orifice Point_m_flow Points_m_flow Table_V_flow Table_m_flow +TrickleVent ZonalFlow_ACS ZonalFlow_m_flow Types Examples Validation BaseClasses -TrickleVent diff --git a/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo b/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo index c39f8a65f0..aa0fd11797 100644 --- a/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo +++ b/IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo @@ -43,7 +43,10 @@ partial model PartialSimInfoManager parameter Boolean openSystemConservationOfEnergy=false "Compute conservation of energy for open system" annotation (Evaluate=true, Dialog(tab="Conservation of energy", enable=computeConservationOfEnergy)); - + final parameter Boolean use_port_1 = interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None + "Whether port_1 of the propsbus connector should be used"; + final parameter Boolean use_port_2 = interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts + "Whether port_2 of the propsbus connector should be used"; parameter Boolean lineariseDymola=false "Linearises building model equations for Dymola linearisation approach" annotation (Dialog(tab="Linearisation")); parameter Boolean lineariseJModelica=false "Linearises building model equations for optimisations in JModelica" @@ -101,18 +104,23 @@ 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) " 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 Modelica.Units.SI.Length HPres=1 "Height above ground of meteorological atmospheric pressure measurement" annotation (Dialog(group="Wind")); + parameter Real Cs_coeff = (A0*A0)*((1/Hwind)^(2*a)) "Multiplication factor for Habs" + annotation(Dialog(group="Wind")); - parameter Real Cs= (A0*A0)*((H/Hwin)^(2*a)) "Wind speed modifier" - 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) "Number of pre-computed azimuth"; @@ -576,6 +584,18 @@ equation