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

17 changes: 12 additions & 5 deletions 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=if use_T_in or use_T_fixed then U_value*A*(TRef_a - T_in_nom) else -Q_in_nom,
dT_nominal_a=-1,
add_cracks=false,
layMul(disableInitPortB=use_T_in or use_T_fixed, monLay(monLayDyn(each
Expand All @@ -15,20 +15,25 @@ model BoundaryWall "Opaque wall with optional prescribed heat flow rate or tempe
annotation(Dialog(group="Boundary conditions"));
parameter Modelica.Units.SI.Temperature T_fixed=294.15
"Fixed boundary temperature"
annotation (Dialog(group="Boundary conditions", enable=use_T_fixed));
annotation (Dialog(group="Boundary conditions",enable=use_T_fixed));
parameter Boolean use_T_in = false
"Get the boundary temperature from the input connector"
annotation(Dialog(group="Boundary conditions"));
parameter Modelica.Units.SI.Temperature T_in_nom=T_fixed
"Nominal boundary temperature, for calculation of design heat loss"
annotation (Dialog(group="Design power", tab="Advanced",enable=use_T_fixed or use_T_in));
parameter Boolean use_Q_in = false
"Get the boundary heat flux from the input connector"
annotation(Dialog(group="Boundary conditions"));

parameter Modelica.Units.SI.HeatFlowRate Q_in_nom=0
"Nominal boundary heat flux, for calculation of design heat loss (positive if entering the wall)"
annotation (Dialog(group="Design power", tab="Advanced", enable=use_Q_in));
Modelica.Blocks.Interfaces.RealInput T if use_T_in
"Input for boundary temperature" annotation (Placement(
transformation(extent={{-120,10},{-100,30}}),iconTransformation(extent={{-120,10},
{-100,30}})));
Modelica.Blocks.Interfaces.RealInput Q_flow if use_Q_in
"Input for boundary heat flow rate entering the wall" annotation (Placement(
"Input for boundary heat flow rate entering the wall (positive)" annotation (Placement(
transformation(extent={{-120,-30},{-100,-10}}),
iconTransformation(extent={{-120,
-30},{-100,-10}})));
Expand Down Expand Up @@ -169,7 +174,9 @@ to enable an input for a prescribed boundary condition temperature or heat flow
Alternatively, parameters <code>use_T_fixed</code> and <code>T_fixed</code> can be used
to specify a fixed boundary condition temperature.
It is not allowed to enabled multiple of these three options.
If all are disabled then an adiabatic boundary (<code>Q_flow=0</code>) is used.
If all are disabled then an adiabatic boundary (<code>Q_flow=0</code>) is used.</p>
Parameters <code>T_in_nom</code> and <code>Q_in_nom</code> are used for the calculation
of heat losses, when the temperature boundary condition and heat flow boundary condition are applied, respectively.
</p>
</html>", revisions="<html>
<ul>
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 TRefInt=291.15
"Reference temperature of zone on side of propsBusInt, for calculation of design heat load"
annotation (Dialog(group="Design heat load", tab="Advanced"));
final parameter Modelica.Units.SI.Power QInf_design=1012*1.204*V/3600*n50_int
/n50toAch*(273.15 + 21 - sim.Tdes)
/n50toAch*(TRefInt - 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*(TRef_a - 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*(TRef_a - sim.Tdes),
add_cracks=false,
dT_nominal_a=-3,
inc=IDEAS.Types.Tilt.Floor,
Expand Down
6 changes: 2 additions & 4 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)) *(TRef_a - 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 @@ -467,4 +465,4 @@ Adjusted implementation for grouping of solar calculations.
</li>
</ul>
</html>"));
end Window;
end Window;
Loading