Skip to content

Commit

Permalink
Merge pull request #1412 from kldjonge/AvoidWarnings
Browse files Browse the repository at this point in the history
Fixes for #1402
  • Loading branch information
jelgerjansen authored Jan 31, 2025
2 parents c03a42d + 6ccbe0f commit af4c526
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion IDEAS/Airflow/Multizone/CrackOrOperableDoor.mo
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ model CrackOrOperableDoor
hOpe=hOpe,
dpCloRat=dpCloRat,
LClo=LClo,
vZer=vZer*MFtrans*rho_default)
vZer=MFtrans/(rho_default*doo.wOpe*doo.hOpe))
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(
Expand Down
17 changes: 12 additions & 5 deletions IDEAS/Buildings/Components/InternalWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,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
Expand Down Expand Up @@ -146,16 +146,23 @@ 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 sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None and IDEAS.Utilities.Math.Functions.isAngle(inc,0) then
assert(hAbs_floor_a<hAbs_floor_b, getInstanceName()+ " is a ceiling, but the floor of the zone at probsbus_b (hfloor="+String(hAbs_floor_b) +") does not lie below the floor of zone at probsbus_a (hfloor="+String(hAbs_floor_a) +"), this should be fixed",level=AssertionLevel.error);
elseif sim.interZonalAirFlowType <> 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;

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_a<hfloor_b, getInstanceName()+ "is a floor, 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(hasCavity == false or IDEAS.Utilities.Math.Functions.isAngle(incInt, IDEAS.Types.Tilt.Wall), "In " + getInstanceName() + ": Cavities are only supported for vertical walls, but inc=" + String(incInt) + ". The model is not accurate.", level = AssertionLevel.warning);
connect(layMul.port_b, propsBus_b.surfRad) annotation(
Line(points = {{-10, 0}, {-18, 0}, {-18, 20.1}, {-100.1, 20.1}}, color = {191, 0, 0}, smooth = Smooth.None));
connect(propsBus_b.surfCon, intCon_b.port_b) annotation(
Expand Down
2 changes: 1 addition & 1 deletion IDEAS/Buildings/Components/SlabOnGround.mo
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected
Placement(transformation(origin = {0, -4}, extent = {{-28, -76}, {-8, -56}})));

initial equation
QTra_design=UEqui*A*(TRefZon - weaBus.TGroundDes);
QTra_design=UEqui*A*(TRefZon - TdesGround.y);
equation
connect(TdesGround.u, weaBus.TGroundDes);
connect(periodicFlow.port, layMul.port_b) annotation (Line(points={{-20,22},{
Expand Down

0 comments on commit af4c526

Please sign in to comment.