diff --git a/IDEAS/Buildings/Components/InternalWall.mo b/IDEAS/Buildings/Components/InternalWall.mo index 8002eb5a7..ab13fc7a4 100644 --- a/IDEAS/Buildings/Components/InternalWall.mo +++ b/IDEAS/Buildings/Components/InternalWall.mo @@ -67,6 +67,8 @@ model InternalWall "interior opaque wall between two zones" parameter Boolean use_y_doo = false "=true, to enable controllable cavity (door) input" annotation(Dialog(enable=hasCavity,group="Cavity or open door",tab="Advanced")); + parameter Boolean CheckVH=true "Enable to not check vertical heights, if an internal floor or element is connected to the same zone at both sides this should be set to false" annotation(Dialog(group="Vertical height check",tab="Airflow")); + IDEAS.Buildings.Components.Interfaces.ZoneBus propsBus_b( redeclare final package Medium = Medium, numIncAndAziInBus=sim.numIncAndAziInBus, @@ -81,7 +83,7 @@ model InternalWall "interior opaque wall between two zones" "Discharge coefficient of cavity" annotation(Dialog(group="Cavity or open door",tab="Advanced")); final parameter Real hzone_b(fixed=false); - final parameter Real hfloor_b(fixed=false); + final parameter Real hAbs_floor_b(fixed=false); parameter Modelica.Units.SI.Length hRelSurfBot_b=if @@ -146,16 +148,30 @@ protected initial equation hzone_b = propsBus_b.hzone; - hfloor_b = propsBus_b.hfloor; + hAbs_floor_b = propsBus_b.hfloor; QTra_design=U_value*A*(TRefZon - TRef_b) "TRefZon is the reference temperature for heat loss calculations of the zone connected to propsbus_a, TRef_b is the reference temperature for heat loss calculations of the zone connected to propsBus_b"; + if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None and hasCavity == true then + assert(IDEAS.Utilities.Math.Functions.isAngle(incInt, IDEAS.Types.Tilt.Wall), "In " + getInstanceName() + ": Cavities without airflow are only supported for vertical walls, but inc=" + String(incInt) + ". The model is not accurate.", level = AssertionLevel.warning); + end if; + + if CheckVH and sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None and IDEAS.Utilities.Math.Functions.isAngle(inc,0) then + assert(hAbs_floor_a IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None and IDEAS.Utilities.Math.Functions.isAngle(inc,Modelica.Constants.pi) then + assert(hAbs_floor_a>hAbs_floor_b, getInstanceName()+ " is a floor, but the floor of the zone at probsbus_a (hfloor="+String(hAbs_floor_a) +") does not lie below the floor of zone at probsbus_b (hfloor="+String(hAbs_floor_b) +"), this should be fixed",level=AssertionLevel.error); + end if; + + if CheckVH and sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts then + assert(hAbs_floor_a+hRelSurfBot_a==hAbs_floor_b+hRelSurfBot_b,"The absolute height of internal wall "+ getInstanceName() +" does not match between both sides of the wall, check the input for hfloor and hzone of the corresponding zones. At propsbus_a the absolute surface starting height is "+String(hAbs_floor_a+hRelSurfBot_a)+"m while at propsbus_b the absolute surface starting height is "+String(hAbs_floor_b+hRelSurfBot_b)+"m",level=AssertionLevel.error); + assert(hAbs_floor_a+hRelSurfBot_a+hRelOpeBot_a==hAbs_floor_b+hRelSurfBot_b+hRelOpeBot_b,"The absolute height of the large cavity in internal wall "+ getInstanceName() +" does not match between both sides of the wall, check the input for hfloor and hzone of the corresponding zones. At propsbus_a the opening its absolute starting height is "+String(hAbs_floor_a+hRelSurfBot_a+hRelOpeBot_a)+"m while at propsbus_b the opening its absolute starting height is "+String(hAbs_floor_b+hRelSurfBot_b+hRelOpeBot_b)+"m",level=AssertionLevel.error); + end if; + + assert(CheckVH and sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts,"Vertical height check was disabled for "+getInstanceName()+" but InterZonalAirFlow.TwoPorts is active",AssertionLevel.warning); + equation connect(constOne.y, crackOrOperableDoor.y); -//assert(IDEAS.Utilities.Math.Functions.isAngle(inc,0) and hAbs_floor_a>hfloor_b, getInstanceName()+ "is a ceiling, but the floor of the zone at probsbus_b lies above the floor of zone at probsbus_a, this is probably a mistake",level=AssertionLevel.warning); -//assert(IDEAS.Utilities.Math.Functions.isAngle(inc,Modelica.Constants.pi) and hAbs_floor_aA excludes the surface area of the cavi ", revisions = "