Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue1337_Changing T_setpoint in PartialZone and PartialSurface for Heat Losses Calculation #1380

2 changes: 1 addition & 1 deletion IDEAS/Buildings/Components/BoundaryWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe
final custom_q50=0,
final use_custom_q50=true,
final nWin=1,
QTra_design=U_value*A*(273.15 + 21 - TRef_a),
QTra_design=U_value*A*(TSet - TRef_a),
dT_nominal_a=-1,
add_cracks=false,
layMul(disableInitPortB=use_T_in or use_T_fixed, monLay(monLayDyn(each
Expand Down
4 changes: 4 additions & 0 deletions IDEAS/Buildings/Components/Interfaces/PartialSurface.mo
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ partial model PartialSurface "Partial model for building envelope component"
parameter Modelica.Units.SI.Temperature TRef_a=291.15
"Reference temperature of zone on side of propsBus_a, for calculation of design heat loss"
annotation (Dialog(group="Design power", tab="Advanced"));
jelgerjansen marked this conversation as resolved.
Show resolved Hide resolved
parameter Modelica.Units.SI.Temperature TSet=273.15+21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe TZonSet, TSetDes(, or TZonSetDes) might be slightly clearer (redundant if we use TRef_a).

Furthermore, if you set a temperature parameter, please use 293.15 instead of 273.15+21, because the dialog pane of the components typically displays temperatures in °C, which leads to (273.15 + 21) - 273.15 in your implementation (Dymola doesn't automatically computes this, I think because of the brackets' instead of 21.

"Reference temperature setpoint of zone (in K), for calculation of design heat loss"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to mention the (in K) part as Modelica always uses SI units (thus Kelvin). It's true that you can change the displayUnit to °C, but internally Modelica always uses Kelvin.

annotation (Dialog(group="Design power", tab="Advanced"));

parameter Boolean linIntCon_a=sim.linIntCon
"= true, if convective heat transfer should be linearised"
annotation (Dialog(tab="Convection"));
Expand Down
5 changes: 4 additions & 1 deletion IDEAS/Buildings/Components/Interfaces/PartialZone.mo
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ model PartialZone "Building zone model"
parameter Boolean calculateViewFactor = false
"Explicit calculation of view factors: works well only for rectangular zones!"
annotation(Dialog(tab="Advanced", group="Radiative heat exchange"));
parameter Modelica.Units.SI.Temperature TSet=273.15+21
"Reference temperature setpoint of zone (in K), for calculation of design heat loss";

final parameter Modelica.Units.SI.Power QInf_design=1012*1.204*V/3600*n50_int
/n50toAch*(273.15 + 21 - sim.Tdes)
/n50toAch*(TSet - sim.Tdes)
"Design heat losses from infiltration at reference outdoor temperature";
final parameter Modelica.Units.SI.Power QRH_design=A*fRH
"Additional power required to compensate for the effects of intermittent heating";
Expand Down
2 changes: 1 addition & 1 deletion IDEAS/Buildings/Components/OuterWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected
"Outside air model"
annotation (Placement(transformation(extent={{-100,-60},{-80,-40}})));
initial equation
QTra_design =U_value*A*(273.15 + 21 - Tdes.y);
QTra_design =U_value*A*(TSet - Tdes.y);

equation
if hasBuildingShade then
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 @@ -4,7 +4,7 @@ model SlabOnGround "opaque floor on ground slab"
custom_q50=0,
final use_custom_q50=true,
final nWin=1,
QTra_design=UEqui*A*(273.15 + 21 - sim.Tdes),
QTra_design=UEqui*A*(TSet - sim.Tdes),
add_cracks=false,
dT_nominal_a=-3,
inc=IDEAS.Types.Tilt.Floor,
Expand Down
11 changes: 5 additions & 6 deletions IDEAS/Buildings/Components/Window.mo
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ model Window "Multipane window"
Modelica.Blocks.Interfaces.RealInput Ctrl if controlled
"Control signal between 0 and 1, i.e. 1 is fully closed" annotation (
Placement(visible = true,transformation(

origin={-50,-110},extent={{20,-20},{-20,20}},
rotation=-90), iconTransformation(

origin={-40,-100},extent={{10,-10},{-10,10}},
rotation=-90)));

Expand Down Expand Up @@ -190,7 +188,7 @@ protected
"Outside air model"
annotation (Placement(transformation(extent={{-40,-100},{-20,-80}})));
initial equation
QTra_design = (U_value*A + (if fraType.briTyp.present then fraType.briTyp.G else 0)) *(273.15 + 21 - Tdes.y);
QTra_design = (U_value*A + (if fraType.briTyp.present then fraType.briTyp.G else 0)) *(TSet - Tdes.y);

assert(not use_trickle_vent or sim.interZonalAirFlowType <> IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None,
"In " + getInstanceName() + ": Trickle vents can only be enabled when sim.interZonalAirFlowType is not None.");
Expand Down Expand Up @@ -271,8 +269,9 @@ equation
connect(shaType.hForcedConExt, radSolData.hForcedConExt) annotation (
Line(points={{-68.5,-32.7043},{-76,-32.7043},{-76,-62.2},{-79.4,-62.2}},
color = {0, 0, 127}));
connect(outsideAir.TDryBul_in, shaType.TDryBul) annotation(
Line(points = {{-42, -90}, {-46, -90}, {-46, -48}, {-58, -48}}, color = {0, 0, 127}));
connect(outsideAir.TDryBul_in, shaType.TDryBul) annotation (
Line(points={{-42,-90},{-46,-90},{-46,-49.4895},{-57.5,-49.4895}},
color = {0, 0, 127}));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a GUI change which seems unintended. Could you change it back to the original one?
If this doesn't work in Dymola, you can use a text editor as well to only change the desired code.

annotation (
Icon(coordinateSystem(preserveAspectRatio=true, extent={{-60,-100},{60,100}}),
graphics={Rectangle(fillColor = {255, 255, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-50, -90}, {50, 100}}),
Expand Down Expand Up @@ -467,4 +466,4 @@ Adjusted implementation for grouping of solar calculations.
</li>
</ul>
</html>"));
end Window;
end Window;
Loading